platforms icon indicating copy to clipboard operation
platforms copied to clipboard

New Blog posts by user showing as error 500

Open masonc-dev opened this issue 10 months ago • 9 comments

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

masonc-dev avatar Oct 25 '23 19:10 masonc-dev

Same here!

aleplusplus avatar Oct 31 '23 23:10 aleplusplus

Was there any resolution to this? I get this intermittently on localhost when adding an image to new posts.

bradledford avatar Nov 01 '23 19:11 bradledford

Can you please provide steps to reproduce this? Thank you!

steven-tey avatar Nov 14 '23 19:11 steven-tey

@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 () at eE (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:131952) at eR (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:132395) at Timeout._onTimeout (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:129175) { page: '/babble..com/clp5gg0v20003jk08hb1tanco' } 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 () at eE (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:131952) at eR (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:132395) at Timeout._onTimeout (/var/task/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:129175) { page: '/babble..com/clp5gg0v20003jk08hb1tanco' } Error: Runtime exited with error: exit status 1 Runtime.ExitError

focusonyoursite avatar Nov 19 '23 12:11 focusonyoursite

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".

rqdewise avatar Nov 24 '23 03:11 rqdewise

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. 截屏2023-11-26 23 19 05

wangqiaobook avatar Nov 26 '23 15:11 wangqiaobook

@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.

rqdewise avatar Nov 26 '23 15:11 rqdewise

@wangqiaobook thank you!! this saved me hours

belindamo avatar Jan 05 '24 02:01 belindamo

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)?

mworks-proj avatar May 07 '24 03:05 mworks-proj