-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 500 error (needs to bail out of prerendering at this point because it used cookies) #1850
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
const cookieStore = await cookies(); | ||
const cartId = cookieStore.get('cartId')?.value ?? null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, the reason we did this was to avoid the header from being dynamic for non-logged in users, thus resulting in worse performance. With PPR, we should be able to have just the cart count component be dynamic.
Does this change make every page that uses Header
(i.e., all pages) dynamic? Have we checked impact on performance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also note that PPR is experimental and "not ready for production use".
Marking this as a draft as we investigate the issue further. |
8da67e4
to
857bd7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if this is only happening in the Makeswift integration branch, apply the change on that branch until we can figure it out.
Cherry-picked and merged to |
Love love love @agurtovoy ❤️ |
What/Why?
Fix 500 cookies() error
Testing
Here are the screenshot logs of the integration branch vs the PR branch when I open the /home and /shop-all.
Integration branch:
PR branch: