stack icon indicating copy to clipboard operation
stack copied to clipboard

Static page cannot load the user info starting from version 2.6.38

Open Chenalejandro opened this issue 1 year ago • 3 comments

Steps to reproduce:

  1. clone repo https://github.com/Chenalejandro/stackbug
  2. pnpm dev
  3. go to localhost:3000, click sign in and then enter the credentials to sign in

Expected: redirected back to the root page, where the user button will be shown Actual: redirect back to the root page, but the sign in button is still there

If we go to localhost:3000/nonstaticpage, we can see the user button because it is a dynamic page. The root page is static.

You can downgrade @stackframe/stack to 2.6.37 and confirm that you can see the user button even in a static page.

This bug happens in both dev and production.

I cannot make the page.tsx a client component (with "use client";) since my component is an async function that fetches some data and statically generate the page with that data.

Chenalejandro avatar Jan 01 '25 21:01 Chenalejandro

Update: Using pnpm patch to revert changes from these two commits fixed the issue: https://github.com/stack-auth/stack/commit/02fa7f7dfac4bf38c8083a72dcb0da6cab45001a https://github.com/stack-auth/stack/commit/9f73738d12f3c0acf16a75d48b83be1454a7d00d

Chenalejandro avatar Feb 03 '25 20:02 Chenalejandro

This should be fixed in the newest version

fomalhautb avatar May 12 '25 18:05 fomalhautb

I cannot find the pull request that fixes this issue. I tried running the latest version of stack with the reproduction repo, and the issue still exists.

Chenalejandro avatar May 13 '25 02:05 Chenalejandro