buttondown / roadmap

Buttondown's public roadmap
53 stars 0 forks source link

Fix persistent Vercel failures on Marketing site #3483

Open smonette opened 1 month ago

smonette commented 1 month ago

Vercel seems to be frequently failing on the Marketing site

There are two flavors of error message:

It's not clear (to me) what causes this. I've noted that it happens:

To fix this I've:

Sample of the errors:

Prerendering

Error occurred prerendering page "/en/comparison-guides/static-form-endpoints". Read more: https://nextjs.org/docs/messages/prerender-error
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5472:19)
    at successSteps (node:internal/deps/undici/undici:5454:27)
    at fullyReadBody (node:internal/deps/undici/undici:4381:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async consumeBody (node:internal/deps/undici/undici:5463:7)
    at async Object.fetch (/vercel/path0/marketing/.next/server/chunks/7108.js:1:302)
    at async getStaticProps$1 (/vercel/path0/marketing/.next/server/pages/comparison-guides/[slug].js:1:507)
Error occurred prerendering page "/en/comparison-guides/esps". Read more: https://nextjs.org/docs/messages/prerender-error
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5472:19)
    at successSteps (node:internal/deps/undici/undici:5454:27)
    at fullyReadBody (node:internal/deps/undici/undici:4381:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async consumeBody (node:internal/deps/undici/undici:5463:7)
    at async Object.fetch (/vercel/path0/marketing/.next/server/chunks/7108.js:1:302)
    at async getStaticProps$1 (/vercel/path0/marketing/.next/server/pages/comparison-guides/[slug].js:1:507)

Google Fonts

FetchError: request to https://fonts.gstatic.com/s/sourceserif4/v8/vEFF2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6kCXr4Y3qwzSEi.woff2 failed, reason: 
    at ClientRequest.<anonymous> (/vercel/path0/marketing/node_modules/.pnpm/next@13.5.6_@babel+core@7.24.5_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/compiled/node-fetch/index.js:1:65756)
    at ClientRequest.emit (node:events:519:28)
    at ClientRequest.emit (node:domain:488:12)
    at emitErrorEvent (node:_http_client:108:11)
    at TLSSocket.socketErrorListener (node:_http_client:511:5)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket.emit (node:domain:488:12)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT'

Here's just errors in Vercel: https://vercel.com/buttondown/marketing/deployments?slug=app-future&slug=en-US&slug=buttondown&slug=marketing&slug=deployments&status=error

jmduke commented 1 month ago

I think the former issue is something @benborgers is uniquely qualified to opine on because it's opensheet-based errors. The latter sounds like it might be fixed by https://stackoverflow.com/questions/76478043/next-js-always-fail-at-downloading-fonts-from-google-fonts.

smonette commented 1 month ago

Example where the deploy worked on the PR, then failed on merge to production: https://vercel.com/buttondown/marketing/ER3zTuEicgnZcwTHHCPxbcmoZGkU?filter=errors