-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
[NEXT-1157] deploying NextJS 13 appDir
site to Digital Ocean App platform, Direct link opening doesn't work.
#49130
Comments
For now, i downgraded the next version to
|
Looks like there is bug in newer version of next. |
Is there a CDN involved? Got the same weird RSC payload like you did when we started using CDN on a project: |
One potential solution (for cloudfare) : #48569 (comment) |
Same issue here deploying to firebase, I thought it was a firebase issue but it seems to be a Upgrading to the latest canary version seemed to work yesterday, but the issue is back now somehow, so a CDN issue could make sense? |
@conor909 downgrade next version to 13.2, and check. |
Can you share a deployed url? My guess based on the description is that your hosting is set up wrong and is not passing |
I know my issue could be different, being on Firebase, but I've just deployed successfully using a local node I'm using |
@timneutkens not changed any settings on Digital Ocean app Platform. currently I downgraded next version to 13.2 and it works well on same. sorry I can't push my website with the latest version. One thing is sure I setted up the server correctly. |
I experienced the same issue with my Next.js 13 app when using Cloudflare in front of it. I realized that the problem is caused by the DigitalOcean App Platform's built-in Cloudflare, and since Cloudflare doesn't properly handle the Vary header by default it became clear that I have to switch. To resolve this, I had to move my deployment away from the DigitalOcean App Platform. I chose a pre-installed easypanel droplet and set it up with continuous deployment using webhooks, and now my app is now building the same way as it did on the App Platform. Thankfully, my Dockerfile made the transition smooth. With Cloudflare now in front of my droplet, I can ensure that everything works as expected using my custom worker. Ideally, Cloudflare would need to add an option to add cache rules that can consider response or request headers to then force Cloudflare to cache the response with a different cache key / cache URL. For reference, here is my Cloudflare worker code. I'd appreciate any suggestions for improvements, bug fixes, or more efficient solutions:
|
appDir
site to Digital Ocean App platform, Direct link opening doesn't work.appDir
site to Digital Ocean App platform, Direct link opening doesn't work.
Posted a reply here: #49140 (comment) |
👍 Thanks |
Did #50970 fix it? |
Should be fixed in #50970 indeed 👍 |
@roeean I've got a similar setup working but you need a custom CloudFront cache policy like: The |
@roeean please provide a reproduction in a new issue. We've added a query string parameter to the end of the request for the RSC payload so it's hard to say why you'd still see this without being able to investigate the application. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 Binaries: Node: 18.12.1 npm: 9.6.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.3.4 eslint-config-next: 13.3.4 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue
github.com/dhruvilxcode/eshop
To Reproduce
Deploy the NextJS site to Digital Ocean App Platform or any host.
then access the any sub page such as Login page by accessing URL directly, not by Link component (because that works well)
Describe the Bug
When i access url let's say Login page, by this domain.com/login/ then it's not loading, instead it showing this (refer to linked image).
Expected Behavior
A page should render by accessing it's URL.
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
Digital Ocean App Platform
NEXT-1157
The text was updated successfully, but these errors were encountered: