Molunerfinn / PicGo

:rocket:A simple & beautiful tool for pictures uploading built by vue-cli-electron-builder
https://molunerfinn.com/PicGo/
MIT License
24.2k stars 2.24k forks source link

[Bug]: 又拍云报错:processTicksAndRejections (internal/process/task_queues #1212

Closed ma3252788 closed 10 months ago

ma3252788 commented 10 months ago

前置阅读 | Pre-reading

PicGo的版本 | PicGo Version

2.3.1

系统信息 | System Information

Mac(arm64)

问题重现 | Bug reproduce

我两个电脑的配置一模一样,直接复制的data文件,但是一个电脑可以正常上传,另一个报错。

我试了2.3.0和2.3.1,两者报错还不一样,真是奇怪。

更新:我发现偶尔能成功,我上传了一个dmg的30M的文件,刚刚突然可以了。但是就成功这一次,再上传就又不行了。

相关日志 | Logs

2.3.0报错:


2024-01-07 18:16:22 [PicGo INFO] Before transform 
2024-01-07 18:16:22 [PicGo INFO] Transforming... Current transformer is [path] 
2024-01-07 18:16:22 [PicGo INFO] Before upload 
2024-01-07 18:16:22 [PicGo INFO] beforeUploadPlugins: renameFn running 
2024-01-07 18:16:22 [PicGo INFO] Uploading... Current uploader is [upyun] 
2024-01-07 18:16:22 [PicGo WARN] failed 
2024-01-07 18:16:22 [PicGo ERROR] 
------Error Stack Begin------
SyntaxError: Unexpected token E in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.handle (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/picgo/dist/src/plugins/uploader/upyun.js:72:31)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
-------Error Stack End------- 
2024-01-07 18:16:22 [PicGo ERROR] 
------Error Stack Begin------
SyntaxError: Unexpected token E in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.handle (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/picgo/dist/src/plugins/uploader/upyun.js:72:31)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
-------Error Stack End------- 

2.3.1报错:


2024-01-07 18:22:23 [PicGo INFO] Before transform 
2024-01-07 18:22:23 [PicGo INFO] Transforming... Current transformer is [path] 
2024-01-07 18:22:23 [PicGo INFO] Before upload 
2024-01-07 18:22:23 [PicGo INFO] beforeUploadPlugins: renameFn running 
2024-01-07 18:22:23 [PicGo INFO] Uploading... Current uploader is [upyun] 
2024-01-07 18:22:23 [PicGo WARN] failed 
2024-01-07 18:22:23 [PicGo ERROR] {
  "method": "PUT",
  "url": "https://v0.api.upyun.com/machunjiepic/machunjie/iShot_2024-01-07_17.59.45.png",
  "statusCode": 0,
  "message": "read ECONNRESET",
  "stack": "Error: read ECONNRESET\n    at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)",
  "response": {
    "status": 0,
    "statusCode": 0,
    "body": ""
  }
} 
2024-01-07 18:22:23 [PicGo ERROR] {
  "method": "PUT",
  "url": "https://v0.api.upyun.com/machunjiepic/machunjie/iShot_2024-01-07_17.59.45.png",
  "statusCode": 0,
  "message": "read ECONNRESET",
  "stack": "Error: read ECONNRESET\n    at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)",
  "response": {
    "status": 0,
    "statusCode": 0,
    "body": ""
  }
Molunerfinn commented 10 months ago

2.3.0和2.3.1的配置文件有所不同 2.3.1的 picgo会做兼容处理。2.3.0的报错是说明你的配置文件或者相册文件不是合法的JSON格式。2.3.1的报错说明你的网络有问题 检查你的网络配置 比如代理之类的。