定时器触发,函数云调用发送一次性订阅消息一直报参数错误失败?
发布于 7 年前 作者 li62 4685 次浏览 来自 问答

IDE版本

看了一个帖子,专门还把云函数 env专门指定为生产环境,都没有用

cloud.init({

// API 调用都保持和云函数当前所在环境一致

env: “**********”

})

调用日志

START RequestId: 01a44b14-1976-11ea-b356-52540054168a

Event RequestId: 01a44b14-1976-11ea-b356-52540054168a

2019-12-08T04:48:41.302Z 01a44b14-1976-11ea-b356-52540054168a { event: { key1: 'test value 1', key2: 'test value 2' },

msg: 'incoming' }

2019-12-08T04:48:41.302Z 01a44b14-1976-11ea-b356-52540054168a { date: '2019-12-08', offset: -0 }

2019-12-08T04:48:41.341Z 01a44b14-1976-11ea-b356-52540054168a { messages: { 'oVf4K42YBjULgg-Xh4kIoUTajpr4': 6 } }

2019-12-08T04:48:41.341Z 01a44b14-1976-11ea-b356-52540054168a { param:

{ touser: 'oVf4K42YBjULgg-Xh4kIoUTajpr4',

page: '/pages/index/index',

data: { thing1: [Object], time2: [Object] },

templateId: 'Ir2BQI_PFU7Z61Buy8MWPdoQ11ykToGnvgoboV4d4SQ' } }

2019-12-08T04:48:41.378Z 01a44b14-1976-11ea-b356-52540054168a { error:

{ Error: errCode: -501007 invalid parameters | errMsg: subscribeMessage.send:fail Invalid request param

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

at Object.<anonymous> (/var/user/node_modules/wx-server-sdk/index.js:432:35)

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: -501007,

errMsg: 'subscribeMessage.send:fail Invalid request param' },

msg: 'error' }


END RequestId: 01a44b14-1976-11ea-b356-52540054168a

Report RequestId: 01a44b14-1976-11ea-b356-52540054168a Duration:77ms Memory:256MB MaxMemoryUsed:48.152344MB

2 回复

那文档怎么有。。

调用的完整参数麻烦提供下以及具体时间

回到顶部