Skip to content
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

How to resolve INCOMPATIBLE_EXTENSIONS error #198

Closed
mac3851 opened this issue Aug 30, 2021 · 5 comments
Closed

How to resolve INCOMPATIBLE_EXTENSIONS error #198

mac3851 opened this issue Aug 30, 2021 · 5 comments

Comments

@mac3851
Copy link

mac3851 commented Aug 30, 2021

✅ Prerequisites

  • [ * ] Did you perform a cursory search of open issues? Is this question already asked elsewhere?
  • [ * ] Are you reporting to the correct repository (magic-sdk)?

❓ Question

I'm using magic-sdk 4.4.2 and @magic-ext/oauth 0.9.0. When trying loginWithRedirect as described here, I',m receiving this error:

Uncaught Error: Magic SDK Error: [INCOMPATIBLE_EXTENSIONS] Some extensions are incompatible with `magic-sdk@4.4.2`:
  - Extension `oauth` supports version(s) `>=2.4.6`
    at new MagicSDKError (sdk-exceptions.js:17)
    at Object.exports.createIncompatibleExtensionsError (sdk-exceptions.js:138)
    at SDKBase.prepareExtensions (sdk.js:83)
    at new SDKBase (sdk.js:107)

I've tried to downgrade to magic-sdk 4.0.0 and oauth extension version to 0.7.0 (got the instructions from support), but id did not resolve the issue. I've also tried other versions.

🌎 Environment

Software Version(s)
magic-sdk 4.4.2
Browser Brave Version 1.26.74 Chromium: 91.0.4472.124 (Official Build) (64-bit)
yarn v1.21.1
Operating System Ubuntu 18.04.5 LTS
@smithki
Copy link
Contributor

smithki commented Aug 30, 2021

Can you provide a reproduction of the issue in CodeSandbox? I'm using this to quickly test the problem but cannot reproduce: https://codesandbox.io/s/condescending-star-nvnlm?file=/index.html

@mac3851
Copy link
Author

mac3851 commented Aug 30, 2021

Can you provide a reproduction of the issue in CodeSandbox? I'm using this to quickly test the problem but cannot reproduce: https://codesandbox.io/s/condescending-star-nvnlm?file=/index.html

I see you're using extensions: [new MagicOAuthExtension()] and the docs say: extensions: [new OAuthExtension()]. I'm using ClojureScript, I'll try to put it in sandbox.

@smithki
Copy link
Contributor

smithki commented Aug 30, 2021

I see you're using extensions: [new MagicOAuthExtension()] and the docs say: extensions: [new OAuthExtension()]. I'm using ClojureScript, I'll try to put it in sandbox.

Syntax differs slightly depending on whether you're consuming the SDK via CDN or NPM. When using our CDN, the extension class is prefixed with Magic* because it exists in the global namespace and we are aiming to prevent conflicts.

@smithki
Copy link
Contributor

smithki commented Sep 14, 2021

Took a deep dive into this issue and I believe it's related to an old cyclic dependency within the semver package. Apparently there's a known issue with bundling semver using Rollup that creates an unexpected behavior where semver.satisfies returns false always.

Related issues:

We are in the midst of a refactor that will bundle all Magic SDK dependencies together before publishing to NPM. I have run into this bug myself while implementing that change. I will try to resolve it for you from our side and ping this issue when the fix goes out (should be in v6.0.0).

@smithki
Copy link
Contributor

smithki commented Sep 14, 2021

Please give this a try with magic-sdk@6.0.1 and let me know how it works for you. If the issue remains unresolved please feel free to ping this thread and I'll re-open the issue.

@smithki smithki closed this as completed Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants