收藏
回答

云函数数据库保存时经常报错:-501001,如何是好?

db.collection(collection).doc(userInfo.uid).set({
    data: userInfo
}).then(e => {
    console.log(e)
}).catch(er => {
    console.log('云函数保存用户信息出错:', er)
})



2019-11-14T05:26:14.923Z  云函数保存用户信息出错: { Error: errCode: -501001 resource system error | errMsg: signature is expired;

at new CloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6395:28)

at Object.returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6447:16)

at Object.checkError (/var/user/node_modules/wx-server-sdk/index.js:1678:23)

at DocumentReference.<anonymous> (/var/user/node_modules/wx-server-sdk/index.js:1538:41)

at step (/var/user/node_modules/tslib/tslib.js:136:27)

at Object.next (/var/user/node_modules/tslib/tslib.js:117:57)

at fulfilled (/var/user/node_modules/tslib/tslib.js:107:62)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:188:7) errCode: -501001, errMsg: 'signature is expired; ' }


2019-11-14T05:49:16.209Z  云函数保存用户信息出错: { Error: errCode: -501001 resource system error | errMsg: signature is expired;

at new CloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6395:28)

at Object.returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6447:16)

at Object.checkError (/var/user/node_modules/wx-server-sdk/index.js:1678:23)

at DocumentReference.<anonymous> (/var/user/node_modules/wx-server-sdk/index.js:1538:41)

at step (/var/user/node_modules/tslib/tslib.js:136:27)

at Object.next (/var/user/node_modules/tslib/tslib.js:117:57)

at fulfilled (/var/user/node_modules/tslib/tslib.js:107:62)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:188:7) errCode: -501001, errMsg: 'signature is expired; ' }


2019-11-15T02:48:06.867Z  云函数保存用户信息出错: { Error: errCode: -501001 resource system error | errMsg: signature is expired;

at new CloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6395:28)

at Object.returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6447:16)

at Object.checkError (/var/user/node_modules/wx-server-sdk/index.js:1678:23)

at DocumentReference.<anonymous> (/var/user/node_modules/wx-server-sdk/index.js:1538:41)

at step (/var/user/node_modules/tslib/tslib.js:136:27)

at Object.next (/var/user/node_modules/tslib/tslib.js:117:57)

at fulfilled (/var/user/node_modules/tslib/tslib.js:107:62)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:188:7) errCode: -501001, errMsg: 'signature is expired; ' }


一点都不稳定嘛,怎么敢用?

没人处理解释,我就天天发。

最后一次编辑于  11-15
回答关注问题邀请回答
收藏

1 个回答

  • 李东bbsky
    李东bbsky
    11-14

    可能你是在云开发控制台弄的,或者开发者工具没有登录

    11-14
    赞同
    回复 1
    • 再见,电脑崽
      再见,电脑崽
      11-14
      不可能  完全随机发生的  这个问题是官方云函数不稳定导致。我确定我已登录。测试的时候也是偶然的,完全没规律。连续测10次至少出现2次。
      11-14
      回复
问题标签