grunge-stack icon indicating copy to clipboard operation
grunge-stack copied to clipboard

401 Unauthorized at localhost. Clerk error integration

Open cavaco-jeronimovallelunga opened this issue 6 months ago • 10 comments

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

  1. Installing grunge-stack
  2. Integrate Clerk according to official documentation (https://clerk.com/docs/quickstarts/remix)
Screen Shot 2023-12-13 at 11 53 29

Expected Behavior

Redirect to the sign-in screen.

Actual Behavior

Infinite loop because of 401 Unauthorized

Once I comment out ErrorBoundary, the problem seems to go away. In other words, the ErrorBoundary may have a bug.

smorimoto avatar Dec 18 '23 06:12 smorimoto

So this issue should probably be opened in the Clerk repository.

smorimoto avatar Dec 18 '23 06:12 smorimoto

Did you end up solving this/opening the issue with Clerk? I tried searching their repo but didn't find it. I am having the same issue as well.

alrightsure avatar Mar 07 '24 19:03 alrightsure

Getting the same error. An infinite loop for GET request with a 401 error code. Commented out the ErrorBoundary now just getting a solid 401 on the page without the infinite loop.

Has anyone found any resources or solution to this issue ?

scottmuangsrichan avatar Mar 25 '24 21:03 scottmuangsrichan

I'm having the same issue here. Weird. However it works fine on a different browser.

stormynight9 avatar Mar 26 '24 15:03 stormynight9

Hmm what browser for you was causing the issue and what was the browser that happen to work for you?

scottmuangsrichan avatar Mar 26 '24 15:03 scottmuangsrichan

@scottmuangsrichan Didn't work on my current instance of Chrome but it does work on Edge.

I just added export const ErrorBoundary = ClerkErrorBoundary(); to my root.tsx and everything is working fine for now.

Skill issue on my part

stormynight9 avatar Mar 26 '24 15:03 stormynight9

@stormynight9 okay ya, unfortunately that line of code was the thing causing the error for me. So not sure what the work around is other than rip it out of the project and use a different auth provider.

scottmuangsrichan avatar Mar 26 '24 15:03 scottmuangsrichan

I am facing the same issue as well! Is there a workaround for this?

rootsrk avatar Apr 09 '24 11:04 rootsrk

@rootsrk haven't found a workaround yet. You can check with the Clerk Discord community and submit a request for help to see if anyone there has found a solution.

scottmuangsrichan avatar Apr 09 '24 23:04 scottmuangsrichan