按照 官方ci文档 调用 getDevSourceMap 方法,控制台输出如下报错:
(node:40494) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sourcemap_list' of undefined
at Promise (/Users/xxx/Desktop/xxapp/node_modules/_miniprogram-ci@1.0.72@miniprogram-ci/dist/utils/sourcemap/getDevSourceMap.js:41:30)
at processTicksAndRejections (internal/process/task_queues.js:86:5) 2.7s
(node:40494) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) 2.7s
(node:40494) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 2.7s
在源码 getDevSourceMap.js 中打印日志,发现请求 https://servicewechat.com/wxa/ci/get_dev_sourcemap 的回包是:
{"errCode":-1,"errMsg":"inner download source map fail with errcode: -80407, errmsg: "}
注:
- miniprogram-ci版本1.0.72
- 在macos和linux上运行,都是这个报错
@社区技术运营专员-CJiang 使用 ci buildNpm 后 upload 再 downloadSourceMap,报错:
appid: wx22ba106979af59dd
时间点:2020-12-17 10:00
miniprogram-ci 版本:1.0.94
机器人:1
错误信息:
{ errCode: -1, errMsg:'inner download source map fail with errcode: -80407, errmsg: ' } (node:94767) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sourcemap_list' of undefined at Promise (/Users/circle/code/xxx/node_modules/miniprogram-ci/dist/utils/sourcemap/getDevSourceMap.js:46:26) at process._tickCallback (internal/process/next_tick.js:68:7) (node:94767) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:94767) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我这边也碰到了
其实你的日志已经说得很明显了,promise 里有未捕捉的错误,导致 process 退出,我目前这么处理的,最终还是要官方解决后更新~~
process.on('unhandledRejection', (reason, promise) => { console.log('======Unhandled Rejection:', reason, promise); });
appid: wxd18d0e7f7784a6c4
2020-09-17 16:04 左右
(node:30094) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sourcemap_list' of undefined
at Promise (/Users/Apple/mpupload/node_modules/_miniprogram-ci@1.0.79@miniprogram-ci/dist/utils/sourcemap/getDevSourceMap.js:1:1241)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:30094) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30094) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
麻烦看看呢
已内部反馈,多谢~
你好,麻烦提供一下appid。ci上传代码的机器人,和上传的时间点。