禁止fetch請求ER網域名稱自身
報錯資訊
@Fetch.fetch: fetch authority is same with origin authority, which is forbidden報錯原因
不允許在ER代碼內fetch請求ER網域名稱自身。例如ER網域名稱為 1.a.com,您可以在ER代碼內fetch請求1.a.com以外的網域名稱,但您不能fetch請求1.a.com自身。
禁止使用內部狀態代碼
報錯資訊
HttpBody.constructor: invalid status code報錯原因
596、597、598、599均屬於ER內部使用的響應狀態代碼,禁止您在代碼中主動返回這些狀態代碼。
ER主動斷開了串連
報錯資訊
io error@: io error(Connection reset by peer)報錯原因
ER執行的時間超過了CPU規格限制,ER主動中斷連線,ER虛擬機器被中止,系統會建置錯誤日誌。
2023 0306 16:39:39.611431 115939 JSThread-3() E @tag(JSError) @loc(src/js-instance-inl.h:366)]: <uid: debugger::I::79de2290-d3a3-4f89-81db-6c3ba779b8b2;event: fetch;host: ;path: /;auth: market.wapa.taobao.com;unique_id: ;pip: 127.0.0.1:46174;fetch_uuid: b5f59f33-8f9b-487d-be32-56e3c368f3f0;start_ts: 1678091979098;req: http;milestone: *-*---;><N/A><>: category: Fatal Error; caller: JSInstance; sub-reason: cpu time; description: N/A; message: the virtual machine has been forcebly terminated for user id 'debugger::I::79de2290-d3a3-4f89-81db-6c3ba779b8b2' due to its violation of resource constraints of system!解決方案
您需要調大CPU時間規格,例如從50 ms調整為100 ms。
沒有可用的proxy地址
報錯資訊
unhandled error(13485,13477)@: Error: io error@: no available fetch proxy address now\nstacktrace:\nN/A\n報錯原因1
您在cache.put中put的是以https開頭的URL,由於cacheAPI不支援https,您需要將https改成http。
報錯原因2
fetch請求的是一個非CDN的網域名稱,但是您設定了cdnProxy:true,您需要將fetch的網域名稱也接入CDN/DCDN,或者刪除cdnProxy:true配置。
串連斷開
報錯資訊
Error: unhandled error(13486,13505)@: Broken connection, unexpected EOF報錯原因
ER在接收上遊服務返回的資料時,上遊服務主動中斷連線。