-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS issue with Ledger #1996
Comments
@Adamj1232 @aaronbarnardsound @leightkt can you please help with this issue? |
@Adamj1232 @aaronbarnardsound @leightkt @charlie-kim Wondering if theres been an update. We're seeing this exact error too. |
@charlie-kim I am unable to reproduce with our examples. Can you try removing a couple of the init options down to only the |
@Adamj1232 I am not sure how you were able to run with just
Allowed Domains for walletconnect project is set using Also, I talked to ledger support. They have no idea what |
Hey @charlie-kim @Adamj1232 @hnbt, The call to 'https://proxyseg.api.live.ledger.com//v1/projects/XXX/settings' was made by the ledger-connect-kit and was used by the segment library in there to route analytics data. It was documented here In the latest version of this connect-kit (starting at 1.1.11), the whole analytics part of the package was removed to remove potential attack vectors. It thus removes the need to setup any CSP, and should fix those CORS issues. Note that for security reasons, the connect-kit-loader is now deprecated and only loads the connect-kit version 1.1.8. To that end, I've opened a PR that uses the latest (1.1.12) connect-kit directly from the package manager and removes the use of the connect-kit-loader |
Thanks @Wozacosta for your input. I should try when the PR is merged. |
Current Behavior
The app crashes with CORS error when I try to connect with Ledger desktop or mobile app. Connecting with ledger via Metamask works fine.
Access to fetch at 'https://proxyseg.api.live.ledger.com//v1/projects/XXX/settings' from origin 'https://YYY.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
GET https://proxyseg.api.live.ledger.com//v1/projects/XXX/settings net::ERR_FAILED 404 (Not Found)
{context: 'client'}
'User rejected'
{context: 'client'}
Error: No matching key. history: ZZZZ
Project identifier(XXX in the example above) is different from WalletConnect project ID. I am not sure where XXX is coming from. I couldn't find any concept of "project" in ledger live document.
I did set
Allowed Domains
in WalletConnect config. And the domain is also verified.Expected Behavior
Sign in successfully without crash.
Steps To Reproduce
What package is effected by this issue?
@web3-onboard/ledger
Is this a build or a runtime issue?
Runtime
Package Version
2.5.2
Node Version
18.12.0
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Anything else?
Mobile login also crashes.
Sanity Check
The text was updated successfully, but these errors were encountered: