调用templateMessage.send 的问题?
发布于 5 年前 作者 wxue 2900 次浏览 来自 官方Issues

WAService.js:1 Uncaught (in promise) Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 73534f91-e2d3-11e9-bd2f-525400dee61a, cloud function service error code -504002, error message errCode: -501001 resource system error | errMsg: openapi.templateMessage.send:fail source.on is not a function; at openapi.templateMessage.send api; ; at cloud.callFunction api; 

请问怎么解决这个问题,所有部署都按照官方的做了,也反复检查了还是解决不了问题

3 回复

抱歉是 wx-server-sdk 的问题,请升级下 wx-server-sdk 到最新版(1.2.2)再试试呢?

解决了,是环境ID的问题,

不要用env: cloud.DYNAMIC_CURRENT_ENV ,要用具体的环境id,

环境ID在这里找:云开发 - 云函数 - 设置

或者云开发窗口的标题也有,就是环境名称加一串随机字符

回到顶部