javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Session already exists error doesn't get forwarded so we can't handle it

Open y0hami opened this issue 3 years ago • 3 comments

  • [x] Review the documentation: https://docs.clerk.dev/
  • [x] Search for existing issues: https://github.com/clerkinc/javascript/issues
  • [x] Go through package changelog files.
  • [ ] Provide the Frontend API key from your application dashboard.

Package + Version

  • [ ] @clerk/clerk-js
  • [ ] @clerk/clerk-react
  • [x] @clerk/nextjs 3.6.1
  • [ ] @clerk/remix
  • [ ] @clerk/clerk-expo
  • [ ] @clerk/backend-core
  • [ ] @clerk/clerk-sdk-node
  • [ ] @clerk/edge
  • [ ] other:

Version:

3.6.1

Browser/OS

If applicable e.g. Chrome latest

Description

When trying to register a user while a session already exists the error thrown simply says "Error:"

To find out that the session already existed I had to view the request response in dev tools to see the payload error.

Simple fix is to just forward that error on so we can check for it.

image image

y0hami avatar May 11 '22 15:05 y0hami

Hi @hammy2899. Thanks for reporting this.

Can you please share a code snippet that reproduces the issue using the useSignIn hook?

SokratisVidros avatar May 13 '22 14:05 SokratisVidros

@SokratisVidros the blank error gets thrown on callback when using the <AuthenticateWithRedirectCallback /> component

So simply this page will cause the error

export const SSOCallback: NextPage = () => {
  return <AuthenticateWithRedirectCallback />
}

y0hami avatar May 13 '22 14:05 y0hami

Thanks @hammy2899. We are already working on a fix.

SokratisVidros avatar May 17 '22 21:05 SokratisVidros

This issue should be fixed with https://github.com/clerkinc/javascript/pull/790

dimkl avatar Feb 20 '23 14:02 dimkl