tangly1024 / NotionNext

使用 NextJS + Notion API 实现的,支持多种部署方案的静态博客,无需服务器、零门槛搭建网站,为Notion和所有创作者设计。 (A static blog built with NextJS and Notion API, supporting multiple deployment options. No server required, zero threshold to set up a website. Designed for Notion and all creators.)

Home Page:https://tangly1024.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

【502】部署后偶发性502错误

dragon-fish opened this issue · comments

描述bug

RT,有时候是整个页面 502,有时候是某个 API 调用时 502。

image

检查 Next.js Functions 日志发现如下报错,供参考:

ERROR  Invoke Error 	{"errorType":"TypeError","errorMessage":"Cannot convert argument to a ByteString because the character at index 13 has a value of 28909 which is greater than 255.","stack":["TypeError: Cannot convert argument to a ByteString because the character at index 13 has a value of 28909 which is greater than 255.","    at webidl.converters.ByteString (node:internal/deps/undici/undici:1985:17)","    at _Headers.set (node:internal/deps/undici/undici:3344:35)","    at setCacheTagsHeaders (file:///var/task/.netlify/dist/run/headers.js:183:13)","    at file:///var/task/.netlify/dist/run/handlers/server.js:3165:5","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","    at async server_default (file:///var/task/.netlify/dist/run/handlers/server.js:3137:10)","    at async file:///var/task/___netlify-server-handler.mjs:31:24","    at async Module.handler (file:///var/task/___netlify-server-handler.mjs:19:27)","    at async Runtime.handler (file:///var/task/___netlify-bootstrap.mjs:2:26296)","    at async Runtime.handleOnceStreaming (file:///var/runtime/index.mjs:1206:26)"]}

Trace:

TypeError: Cannot convert argument to a ByteString because the character at index 13 has a value of 28909 which is greater than 255.
    at webidl.converters.ByteString (node:internal/deps/undici/undici:1985:17)
    at _Headers.set (node:internal/deps/undici/undici:3344:35)
    at setCacheTagsHeaders (file:///var/task/.netlify/dist/run/headers.js:183:13)
    at file:///var/task/.netlify/dist/run/handlers/server.js:3165:5
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async server_default (file:///var/task/.netlify/dist/run/handlers/server.js:3137:10)
    at async file:///var/task/___netlify-server-handler.mjs:31:24
    at async Module.handler (file:///var/task/___netlify-server-handler.mjs:19:27)
    at async Runtime.handler (file:///var/task/___netlify-bootstrap.mjs:2:26296)
    at async Runtime.handleOnceStreaming (file:///var/runtime/index.mjs:1206:26)

期望的正常结果

正常访问

复现步骤

环境

  • 【必填】NotionNext版本 4.6.1
  • 【必填】主题 heo
  • 【必填】部署方案 netlify
  • 【可选】操作系统: all
  • 【可选】浏览器 Edge, Safari

补充说明

同样遇到这个问题