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

magic-sdk 9 and 10 do not work on Vercel (NextJS) deployments #396

Open
markibanez opened this issue Dec 2, 2022 · 1 comment
Open

magic-sdk 9 and 10 do not work on Vercel (NextJS) deployments #396

markibanez opened this issue Dec 2, 2022 · 1 comment

Comments

@markibanez
Copy link

🐛 Description

magic-sdk version 9 up works on local NextJS dev server. But when deployed to Vercel, it stops working. I had to downgrade to version 4.1.0 to get it to work.

🧩 Steps to Reproduce

  1. Create NextJS app
  2. Install magic-sdk 9.1.0 or newer
  3. Implement email/sms login
  4. Deploy to vercel
  5. Open vercel deployment
  6. It will be able to send you magic link via email or sms code, but after authentication, the app crashes
  7. Optionally, downgrade to 4.1.0
  8. Redeploy to vercel
  9. Should work as expected

🤔 Expected behavior

Code after authentication (getting did) should execute as it does on version 4.1.0

😮 Actual behavior

Code after authentication (clicking a magic link or submitting SMS code) is not executed

💻 Code Sample

Your example nextjs app can replicate the issue if you upgrade the magic-sdk package version to 9.1.0 or newer
(https://github.com/magiclabs/example-nextjs)

🌎 Environment

Software Version(s)
magic-sdk 9.1.0 or newer
Browser Chrome
@lommaj
Copy link

lommaj commented Feb 22, 2023

ok, I also ran into this - was using magic-sdk version ^13.3.0 and it worked fine locally.

once pushing to vercel I was getting an error with the SDK

n is not defined

I downgraded all the way to 1.0.1 because thats the version they use in their next js example and it works.

nextjs - with magic

which is pretty out of date I suppse.

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