Interesting issue -- Log stream causes NextJS Edge runtime app to fail

This is kind of an intriguing one..... 1. App deploys fine via wrangler pages deploy .vercel/output/static 2. I can hit the side all is dandy... 3. Go to the deployment UI, go to the "Real-time logs" section, click "Begin Log Stream" 4. Log flows begin to appear -- but now every request is an HTTP 500 5. Even after ending the log stream, the worker appears to be in a broken state and continues to throw HTTP 500s 6. Wrangler tail does not show any useful error messages:
❯ pnpm wrangler pages deployment tail
⛅️ wrangler 3.48.0
-------------------
Select a project:
❯ nameplace
nameplace-trpc
No deployment specified. Using latest deployment for production environment.
Connected to deployment c1ae8c2d-324c-452c-a680-e2aa14b63721, waiting for logs...
GET https://c1ae8c2d.nameplace.pages.dev/places - Ok @ 4/9/2024, 6:04:20 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/favicon.ico - Ok @ 4/9/2024, 6:04:20 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/places - Ok @ 4/9/2024, 6:04:23 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/favicon.ico - Ok @ 4/9/2024, 6:04:24 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/places - Ok @ 4/9/2024, 6:04:24 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/favicon.ico - Ok @ 4/9/2024, 6:04:24 PM
(error) Error: internal error
❯ pnpm wrangler pages deployment tail
⛅️ wrangler 3.48.0
-------------------
Select a project:
❯ nameplace
nameplace-trpc
No deployment specified. Using latest deployment for production environment.
Connected to deployment c1ae8c2d-324c-452c-a680-e2aa14b63721, waiting for logs...
GET https://c1ae8c2d.nameplace.pages.dev/places - Ok @ 4/9/2024, 6:04:20 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/favicon.ico - Ok @ 4/9/2024, 6:04:20 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/places - Ok @ 4/9/2024, 6:04:23 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/favicon.ico - Ok @ 4/9/2024, 6:04:24 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/places - Ok @ 4/9/2024, 6:04:24 PM
(error) Error: internal error
GET https://c1ae8c2d.nameplace.pages.dev/favicon.ico - Ok @ 4/9/2024, 6:04:24 PM
(error) Error: internal error
The annoying bit is that without any code change a re-deployment ends up fixing the issue -- but I then have to wait for a full build/upload cycle (which is not that bad because of caching but still, my app is broken until I do this) dev: https://nameplace.pages.dev/ deployment id: 0877b232-f464-44fb-bd88-fa620eb21341 account id: f1087e918dcedfd9575e5e595a817813
4 Replies
Chaika
Chaika8mo ago
Do you have smart placement on? If so, sadly known issue we're hoping they address soon
jacobdr
jacobdrOP8mo ago
I do have smart placement on, Ill turn that off now. Just saw that being discussed on another thread in a quite different context Thanks for the quick response I need to re-deploy from the CLI to have that take effect, right?
Chaika
Chaika8mo ago
Yea changing smart placement would only take effect on the next deployment (cli, git, etc)
jacobdr
jacobdrOP8mo ago
Thanks a lot ill mark this as solved Ok that definitely resolved my issue
Want results from more Discord servers?
Add your server