-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
SSR Function Works in Mozilla but Not in Chrome #51814
Comments
Are you using PWA? like |
Check cookie settings. Chrome is more strict in rejecting cookies then Firefox. |
yeah, i'm using next-pwa. but the issue was related to the attribute of cookie settings, as mentioned by @ebo-bpi. |
That's right. thanks for your hint. |
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you. |
This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding! |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Data fetching (gS(S)P, getInitialProps)
Link to the code that reproduces this issue or a replay of the bug
hope the description be enough.
To Reproduce
To Reproduce:
Navigate to the payment page in my Next.js application.
Initiate a payment and get redirected to the bank page.
Complete the payment process on the bank page.
After the payment is completed, you should be redirected back to my Next.js application's destination page.
On the destination page, the SSR function should retrieve and display certain information.
Describe the Bug
Hello there
I'm facing an issue with my Next.js project involving server-side rendering (SSR). In my application, I have a payment flow where the user is redirected to a bank page for payment. Upon returning to my page, I rely on an SSR function to retrieve and display some information.
The problem is that the SSR function works as expected in Mozilla, but it doesn't seem to work properly in Chrome and gets no data in SSR. if i reload the page in returning page data is present and everything is ok. I have tried clearing the cache and checking network requests, but the issue persists. I'm wondering if there might be any browser-specific behavior or compatibility issues causing this discrepancy.
Could anyone provide guidance on how to troubleshoot and fix this issue? I would greatly appreciate any insights or suggestions.
SSR request in returning page is as follow:
export async function getServerSideProps(context: any) {
const { transactionId } = context.params;
const { token } = context.req.cookies;
return await GETSSR(
bankTransaction(transactionId, ServiceType),
token
).then((e) => {
return { props: { result: e.result } };
});
}
after reloading the returning page the data is present and everything is ok.
Expected Behavior
Expected behavior:
The SSR function retrieves and displays the expected information on the destination page consistently across different browsers.
Actual behavior:
The SSR function works as expected in Mozilla, but doesn't work correctly in Chrome.
When returning to the destination page in Chrome, the SSR function fails to retrieve and display the expected information.
If reload the page in the destination page the expected data is present.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: