qiniu / nodejs-sdk

Qiniu Resource (Cloud) Storage SDK for Node.js
586 stars 190 forks source link

Cannot read properties of undefined (reading 'needRetry') #434

Open yuyang1004 opened 1 month ago

yuyang1004 commented 1 month ago

上次失败,再次上传报错。node16时正常,但node18时报错。 /data/app/jenkins/jenkins_home/workspace/data-platform_prod/node_modules/qiniu/qiniu/storage/resume.js:146 return retryable && context.result.needRetry(); ^

TypeError: Cannot read properties of undefined (reading 'needRetry') at Retrier.onBeforeRetry (/data/app/jenkins/jenkins_home/workspace/data-platform_prod/node_modules/qiniu/qiniu/storage/resume.js:146:56) at /data/app/jenkins/jenkins_home/workspace/data-platform_prod/node_modules/qiniu/qiniu/retry/retrier.js:67:24 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.20.2

xlanghejianfeng commented 1 month ago

me too!!! TypeError: Cannot read properties of undefined (reading 'needRetry')

xlanghejianfeng commented 1 month ago

急急急!!!

lihsai0 commented 1 month ago

@yuyang1004 @xlanghejianfeng 能否提供一个复现的 DEMO?

yuyang1004 commented 1 month ago

@yuyang1004 @xlanghejianfeng 能否提供一个复现的 DEMO?

https://www.npmjs.com/package/@puhaha/vite-plugin-upload-oss

上传的时候可以断一下网络,网络正常的情况下不会报错,只有网络有波动需要重试的时候才会报错

yuyang1004 commented 1 month ago

@yuyang1004 @xlanghejianfeng 能否提供一个复现的 DEMO?

https://www.npmjs.com/package/@puhaha/vite-plugin-upload-oss

上传的时候可以断一下网络,网络正常的情况下不会报错,只有网络有波动需要重试的时候才会报错

用的是V2机制

yuyang1004 commented 1 month ago

@yuyang1004 @xlanghejianfeng 能否提供一个复现的 DEMO?

https://www.npmjs.com/package/@puhaha/vite-plugin-upload-oss

上传的时候可以断一下网络,网络正常的情况下不会报错,只有网络有波动需要重试的时候才会报错

用的是V2机制

liaoyu commented 2 weeks ago

+1, 在 node20 下且上传文件较多的场景,上传到海外 bucket 可稳定复现