开发工具、云函数测试都能调用成功且有日志,iPhone真机云函数调用失败,无日志
- 当前 Bug 的表现(可附上截图) 环境:iOS 12.0, 微信版本号:6.7.3 云函数: [代码]const rp = require([代码][代码]'request-promise'[代码][代码]);[代码] [代码]exports.main = (event, context) => {[代码][代码] [代码][代码]const result = rp({[代码][代码] [代码][代码]method: [代码][代码]'POST'[代码][代码],[代码][代码] [代码][代码]url: [代码][代码]'somePath/doSth'[代码][代码] [代码][代码]}).then([代码][代码]function[代码][代码](body) {[代码][代码] [代码][代码]return[代码] [代码]body[代码][代码] [代码][代码]})[代码][代码] [代码][代码].[代码][代码]catch[代码][代码]([代码][代码]function[代码][代码](err) {[代码][代码] [代码][代码]return[代码] [代码]err[代码][代码] [代码][代码]});[代码][代码] [代码][代码]return[代码] [代码]result[代码][代码]}[代码]调用: [代码]wx.cloud.callFunction({[代码][代码] [代码][代码]name: [代码][代码]'cloudFunc'[代码][代码],[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]imageInfo: res.data[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]doSth()[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: err => {[代码][代码] [代码][代码]console.error([代码][代码]'[云函数] 调用失败'[代码][代码],err)[代码][代码] [代码][代码]}[代码][代码]})[代码]响应时间未超过“网络请求的超时时间”的配置时间,且云函数的日志里面没有这些失败调用的记录[代码]{[代码][代码] [代码][代码]column:72695,[代码][代码] [代码][代码]errCode:-1,[代码][代码] [代码][代码]errMsg: [代码][代码]"cloud.callFunction: fail operateWXData:fail data no response; at cloud.callFunction api"[代码][代码],[代码][代码] [代码][代码]line:2,[代码][代码] [代码][代码]sourceURL:[代码][代码]"https://usr/app-service.js"[代码][代码] [代码][代码]}[代码] - 预期表现 调用成功。调用成功/失败,日志里面都有对应的记录