ali-sdk / ali-oss

Aliyun OSS(Object Storage Service) JavaScript SDK for the Browser and Node.js
https://www.alibabacloud.com/help/doc-detail/52834.htm
MIT License
1.96k stars 577 forks source link

Error message:callback twice!!! #1313

Closed csorz closed 3 months ago

csorz commented 5 months ago

pages-multi-game-multi-game.pHFS6Hk3.js 这个脚本文件始终无法上传,出现报错callback twice!!!,100%复现。

pages-multi-game-multi-game.pHFS6Hk3.zip

当我把脚本文件内容清空时,可以上传成功。

参数:

{ source: 'unpackage/dist/build/web', target: 'oss://x:x@x.oss-cn-hangzhou.aliyuncs.com/x/app/multi-game/', headers: { 'Cache-Control': 'no-cache' }, timeout: 600000 }

错误信息:

[urllib:warn] [Tue Jun 25 2024 10:35:59 GMT+0800 (中国标准时间)] [2] [worker:19364] PUT http://域名/x/app/multi-game/assets/pages-multi-game-multi-game.pHFS6Hk3.js callback twice!!! [urllib:warn] [Tue Jun 25 2024 10:35:59 GMT+0800 (中国标准时间)] [2] [worker:19364] ResponseError: write ECONNRESET, PUT http://域名/x/app/multi-game/assets/pages-multi-game-multi-game.pHFS6Hk3.js -1 (connected: true, keepalive socket: true, agent status: {"createSocketCount":1,"createSocketErrorCount":0,"closeSocketCount":0,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":1,"freeSockets":{},"sockets":{"域名:80:":1},"requests":{}}, socketHandledRequests: 2, socketHandledResponses: 1) headers: {} stack: Error: write ECONNRESET at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\@ytfee\npm-yt-deploy\node_modules\ali-oss\lib\client.js:487 err = new Error(result.message); ^

Error [ResponseError]: write ECONNRESET, PUT http://域名/x/app/multi-game/assets/pages-multi-game-multi-game.pHFS6Hk3.js -1 (connected: true, keepalive socket: true, agent status: {"createSocketCount":1,"createSocketErrorCount":0,"closeSocketCount":0,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":1,"freeSockets":{},"sockets":{"域名:80:":1},"requests":{}}, socketHandledRequests: 2, socketHandledResponses: 1) headers: {} at Client.requestError (D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\@ytfee\npm-yt-deploy\node_modules\ali-oss\lib\client.js:487:13) at requestError.next () at onFulfilled (D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\co\index.js:65:19) at D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\co\index.js:54:5 at new Promise () at Client.co (D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\co\index.js:50:10) at Client.toPromise (D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\co\index.js:118:63) at next (D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\co\index.js:99:29) at onRejected (D:\Git_yt\ipub-uniapp\yt-digital-resources\node_modules\co\index.js:85:7) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: -1, code: 'ResponseError' }

victimsss commented 5 months ago

同样的情况,我这边做了一个测试,假如 bucket 设置自定义域名且配置了 cdn 加速,策略是 全球(不包含中国内地) 时,基本 都是上传超时且 callback twice

node: v18.20.2 ali-oss: 6.20.0