在微信小程序人脸对比开发真机调试遇到的bug

BUG如下:

Error: errCode: -404012 polling exceed max timeout retry | errMsg: cloud.callFunction:fail polling exceed max timeout retry (callId: 1595740734620-0.6883674873465999) (trace: 13:18:54 start->13:19:10 timeout, retry->13:19:26 timeout, retry->13:19:42 timeout, abort); at cloud.callFunction api;

调用api接口超时,在找错的过程中,看见社区有人说可能是上传的图片过大了,于是试着修改照片的质量

const ctx = wx.createCameraContext()

    ctx.takePhoto({

      quality: ‘normal’,

      success: (res) => {

        this.setData({

          src: res.tempImagePath

        })

        let imgbase = wx.getFileSystemManager().readFileSync(res.tempImagePath, “base64”)//把照片转成base64格式

主要是把quality由原来的height改为normal了,之后就解决这个bug了!

网上对这个bug的讨论帖子不多,希望我的方法对大家有帮助!

本文地址:https://blog.csdn.net/LLZChen/article/details/107592572

(0)
上一篇 2022年3月22日
下一篇 2022年3月22日

相关推荐