-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
12.2.6-canary.10 displaying JSON in browser instead of building page html #40241
Comments
Some browser extensions (e.g. JSON viewer) might cause this issue. Can you verify it's not the case? (I.e. try opening the page in a different browser/incognito, making sure the extension is disabled). I cannot look at your deployment because it's password protected, but having a look at the code would be more useful anyway. Can you link your repository/reproduction, please? 🙏 |
Unfortunately it is all private and I do not have time to complete a reproduction today. I've never seen this happen before in my time using Next.js. Current stable of our site is running 12.2.5 with no issues. I'm seeing this happen in all browsers, private (no extensions) and regular. Seems to shift to JSON view if I do a hard refresh (cmd+shift+r) |
I could paste some files here if it helps? next.config.js
middleware.ts
These are the only files where I could see something causing this, although like I said, 12.2.5 works fine (as seen on https://www.gotrhythm.com) running these same files. |
Could you verify which Also, just to confirm:
So does this only happen when deployed, or in |
Experiencing this on edit: in the meantime, https://jarvis-edvwwdw43-jakejarvis.vercel.app/projects/ |
This reverts commit 02ec08d.
This issue still seems to occur with canary.11. |
@jakejarvis thanks for getting to this before I had a chance today! |
This unreverts #40328 as it wasn't the cause for #40241 like initially suspected and the actual fix has been included here as well with regression test. Fixes: #40241 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
Hi, this should now be patched in |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.15.0
npm: 8.5.5
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.2.6-canary.9
eslint-config-next: 12.2.6-canary.9
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
Firefox
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
When deploying to Vercel with the latest canary, visiting pages will sometimes flash the styled output and then display the page JSON in the browser:
Expected Behavior
Page shoudl rendered with styled HTML.
Link to reproduction
https://rhythm-marketing-git-update-next1226-gotrhythm.vercel.app/
To Reproduce
Standard Next.js setup with i18n and basic middleware rewrite usage.
The text was updated successfully, but these errors were encountered: