remix-run / grunge-stack

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.
https://remix.run/stacks
MIT License
438 stars 95 forks source link

401 Unauthorized at localhost. Clerk error integration #178

Closed cavaco-jeronimovallelunga closed 2 months ago

cavaco-jeronimovallelunga commented 11 months ago

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

smorimoto commented 11 months ago

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

smorimoto commented 11 months ago

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

alrightsure commented 8 months ago

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.

scottmuangsrichan commented 8 months ago

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 ?

stormynight9 commented 8 months ago

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

scottmuangsrichan commented 8 months ago

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

stormynight9 commented 8 months ago

@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

scottmuangsrichan commented 8 months ago

@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.

rootsrk commented 7 months ago

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

scottmuangsrichan commented 7 months ago

@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.

MichaelDeBoey commented 2 months ago

Closing as this seems to be a Clerk issue instead of a grunge-stack issue