- 生成二维码并保存云存储中,uploadFile总报错,但报错信息看不懂
- 当前 Bug 的表现(可附上截图) 2019-06-05T14:54:51.897Z { Error: errCode: -1 unknown error | errMsg: uploadFile:fail TypeError: source.on is not a function; at uploadFile api; at new CloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6173:28) at returnAsCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6225:16) at Object.returnAsFinalCloudSDKError (/var/user/node_modules/wx-server-sdk/index.js:6239:13) at Cloud.<anonymous> (/var/user/node_modules/wx-server-sdk/index.js:2703:62) at step (/var/user/node_modules/tslib/tslib.js:133:27) - 预期表现 生成商家二维码并保存云存储中 - 复现路径 - 提供一个最简复现 Demo exports.main = async (event, context) => { try { let imgBuf = await cloud.openapi.wxacode.getUnlimited({ page: "pages/seller/seller", scene: "?sellerId=71f2cd945cb0b2e304fc61", width: 160, autoColor: false, lineColor: { "r": 87, "g": 134, "b": 100 }, isHyaline: true }) const result = await cloud.uploadFile({ cloudPath: '71f2cd945cb0b2e304fc6126353113**/code.png', fileContent: imgBuf }) return result } catch (err) { console.log(err) return err } }
2019-06-05 - 真机调试总报‘异步堆栈跟踪在32位平台上不可用’,请教怎样解决?
- 当前 Bug 的表现(可附上截图) internal/process/warning.js:18 (node:564) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled. 真机调试总报这样的warning,请教怎样解决?
2019-03-26 - canvasToTempFilePath报错illegal arguments
机型:HUAWEI nova 3e,微信版本:7.0.3 chooseLocalImage: function (e) { var that = this; let idx = e.currentTarget.dataset.idx //console.log(idx) wx.chooseImage({ count: 1, sizeType: ['original', 'compressed'], //尺寸 sourceType: ['album', 'camera'], //来源 success(res) { var _tempUrl = res.tempFilePaths[0]; that.data.rate = 2000000 / res.tempFiles[0].size //不超过2M //console.log(that.data.rate) wx.getImageInfo({ src: _tempUrl, success(res) { that.setData({ height: parseInt(that.data.width * res.height / res.width), imageCanvasshow: false }); const ctx = wx.createCanvasContext('imagecanvas'); let _width = that.data.width let _height = that.data.height ctx.drawImage(_tempUrl, 0, 0, _width, _height); ctx.draw() setTimeout(() => { that.drawLocalImageAfter(idx); }, 200); } }) }, fail: function () { // fail }, complete: function () { // complete } }) }, drawLocalImageAfter: function (idx) { try { var that = this; wx.canvasToTempFilePath({ quality: that.data.rate, width: that.data.width, heght: that.data.height, fileType: 'jpg', canvasId: 'imagecanvas', success: function (res) { var _url = that.data.sellerImageUrl _url[idx] = res.tempFilePath console.log(res.tempFilePath) console.log(_url); that.setData({ sellerImageUrl: _url, imageCanvasshow: true }); }, fail: function (err) { console.log(err); } }) } catch (err) { console.log(err) } }, 真机上调试时,第一次报canvasToTempFilePath:fail:illegal arguments,第二次正常,第三次报canvasToTempFilePath:fail:illegal arguments,第四次正常,以此类推,最近才开始出现这个问题,有谁知道为什么吗?
2019-03-07 - 读取存储管理中图片时,出现403的问题
- 当前 Bug 的表现(可附上截图) [图片] - 预期表现 最近,小程序读取存储管理中图片时,总是会出现其中一些图片无法读取,当将地址放到IE栏中读取却可以读取 - 复现路径 随机性出现,无法准确复现 - 提供一个最简复现 Demo js: this.data.imgurl = cloud://guorui-01.6775-guorui-01/ wxml: <image bindload="cusImageLoad" data-name="adimage" src="{{imgurl + item}}" style="width: {{imgsize.adimage.imageWidth}}; height: {{imgsize.adimage.imageHeight}}" lazy-load="true"></image>
2019-02-21 - 云函数到底能不能用request取得session_key?
- 当前 Bug 的表现(可附上截图) 云函数执行到request时,直接忽视,不返回,不知道是因为域名的问题还是怎回事 - 预期表现 - 复现路径 - 提供一个最简复现 Demo var request = require('request'); request({ url: 'https://api.weixin.qq.com/sns/jscode2session', data: { appid: _APPID, secret: _SECRET, js_code: _JSCODE, grant_type: 'authorization_code' }, method: 'GET', header: { 'content-type': 'application/json' }, // 设置请求的 header success: function (res) { console.log('sessionkey: ' + sessionkey) }, fail: function (err) { console.log(err); } })
2019-01-20