开发者工具版本:1.06.2401020
操作系统:Windows10
我在使用如下代码调用云函数并使用CDN传输文件:
wx.cloud.callFunction({
name: 'quickstartFunctions',
data: {
type: 'getAnswer',
img: wx.cloud.CDN({
type: 'filePath',
filePath: url,
}),
question: inputContent
},
......
使用开发者工具的模拟器会报错:
[云函数] [getAnswer] 调用失败 Error: cloud.callFunction:fail undefined . uploadToCommonCDN:fail parse cdn resp buffer error Error: unrecognized resp object key type undefined
at nr (WASubContext.js?t=wechat&s=1725808408075&v=2.20.1:2)
at rr (WASubContext.js?t=wechat&s=1725808408075&v=2.20.1:2)
at WASubContext.js?t=wechat&s=1725808408075&v=2.20.1:2
at Generator.throw (<anonymous>)
at n (WASubContext.js?t=wechat&s=1725808408075&v=2.20.1:2)
at l (WASubContext.js?t=wechat&s=1725808408075&v=2.20.1:2)
下面是网络请求报错信息:
Request URL: http://CDN
Request Headers:
Provisional headers are shown
Request Payload:
{filePath: "http://tmp/rdxFGzk3uahOd78b4287975f056a796186c9d5cae708.jpg"}
filePath: "http://tmp/rdxFGzk3uahOd78b4287975f056a796186c9d5cae708.jpg"
但是在真机中运行却是正常的,麻烦问下是什么问题?
我遇到了同样问题,windows开发者模拟器报错
Error: cloud.callFunction:fail undefined . uploadToCommonCDN:fail parse cdn resp buffer error Error: unrecognized resp object key type undefined
真机正常
我也遇到了
Error: cloud.callFunction:fail undefined . uploadToCommonCDN:fail parse cdn resp buffer error Error: unrecognized resp object key type undefined
真机和线上是正常的