这个问题我也遇到了,消息发出去了,但是报错 cloud function service error code -504002, error message TypeError: Do not know how to serialize a BigInt at JSON.stringify (<anonymous>) at callback (:55914/var/runtime/node12/CallbackContext.js:31) at :55914/var/runtime/node12/CallbackContext.js:81 at :55914/var/runtime/node12/Runtime.engine.js:237 at processTicksAndRejections (:55914/appservice/internal/process/task_queues.js:97); at cloud.callFunction api; at new u (VM857 WAService.js:2) at d (VM857 WAService.js:2) at f (VM857 WAService.js:2) at Function.success (VM857 WAService.js:2) at VM857 WAService.js:2 at x (VM857 WAService.js:2) at i.<anonymous> (VM857 WAService.js:2) at i.emit (VM857 WAService.js:2) at Ea (VM857 WAService.js:2)
subscribeMessage.send errCode: -504002报错?[图片]Error: cloud.callFunction:fail Error: errCode: -504002 functions execute fail | errMsg: TypeError: Do not know how to serialize a BigInt 调用订阅消息后测试消息可以发送成功,但是返回值报错Do not know how to serialize a BigInt,无法判断是否发送成功。 2022-05-01 解决方法:云函数的返回值不要返回result,直接返回result.errCode,就不会报错。原因是直接返回result被序列化导致报错(其实就是bug),所以返回result.errCode足以用于判断!
2022-03-16