platforms
platforms copied to clipboard
New Blog posts by user showing as error 500
When a user makes a new post to there site it returns error 500 when they visit the new post. Everything else seems to work fine
Same here!
Was there any resolution to this? I get this intermittently on localhost when adding an image to new posts.
Can you please provide steps to reproduce this? Thank you!
@steven-tey I found this error in the vercel logs:
⨯ Page changed from static to dynamic at runtime /babble..com/clp5gg0v20003jk08hb1tanco, reason: headers
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error
at l (/var/task/.next/server/chunks/441.js:7:10073)
at d (/var/task/.next/server/chunks/753.js:1:1093)
at c (/var/task/.next/server/app/[domain]/[slug]/page.js:1:59254)
at em (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:128289)
at /var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:139989
at Object.toJSON (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:143567)
at stringify (
This also happened and still my problem.
Opening a post in any individual site would result to internal server error 500 only happens in production only. While, build error show "Error occurred prerendering page "./page".
When a user makes a new post to there site it returns error 500 when they visit the new post. Everything else seems to work fine
In this project, at the following address: /app/[domain]/[slug]/page.tsx
There is a function named generateStaticParams
in this file responsible for generating static pages. However, in the original code, there is a limitation that restricts the data retrieval to only subdomains with the name "demo" for generating static pages. As a result, static pages cannot be generated for subdomains created by users.
The solution is straightforward: remove or comment out the code segment responsible for this limitation.
@wangqiaobook Yes, I have done this part. In dev mode static pages are generated smoothly but in production generating static pages always result in error.
@wangqiaobook thank you!! this saved me hours
I've tried commenting out this snippet of code in both sections, however, with no luck. Production is still rendering 500 internal server error on clicking any site link/ stories. Can you share your complete file (use default domain name)?