stack icon indicating copy to clipboard operation
stack copied to clipboard

Account Settings Email Page Suspense Issue

Open ralfboltshauser opened this issue 2 years ago • 4 comments

In the Account Settings handler, when switching to the email tab, the nav is gone because a suspense boundary is triggered on level too high. (That's at least my assumption of how it looks)

ralfboltshauser avatar Nov 08 '24 17:11 ralfboltshauser

Do you want to work on this? @ralf-boltshauser

N2D4 avatar Nov 15 '24 12:11 N2D4

yes sure, currently I am actually debugging some bigger issue that actually might be related to stack-auth and be the fundament of this. I will come back later and maybe delete / merge this issue into the larger thing.

I figured out, that in stack-auth projects (need to confirm) when I execute a server action the loading.tsx is retriggered. Whereas in normal nextjs applications the loading.tsx only triggered in the first render and then afterwards it just updates the state.

As soon as I have narrowed down that thing I will update the issue and take a look at it!

ralfboltshauser avatar Nov 15 '24 13:11 ralfboltshauser

yes sure, currently I am actually debugging some bigger issue that actually might be related to stack-auth and be the fundament of this. I will come back later and maybe delete / merge this issue into the larger thing.

I figured out, that in stack-auth projects (need to confirm) when I execute a server action the loading.tsx is retriggered. Whereas in normal nextjs applications the loading.tsx only triggered in the first render and then afterwards it just updates the state.

As soon as I have narrowed down that thing I will update the issue and take a look at it!

This might be because of this https://github.com/vercel/next.js/issues/50163

Next.js 14 automatically refreshes the page when setting cookies in server actions. However, based on my testing, Next.js 15 doesn't seem to have this problem. So, if it is not too hard, you can upgrade to Next.js 15, and the problem should be solved. We will also probably try to come up with something to workaround this, like disabling cookies in server action.

fomalhautb avatar Nov 15 '24 13:11 fomalhautb

ahh I see thank you, I will give it a shot!

ralfboltshauser avatar Nov 15 '24 17:11 ralfboltshauser