- 如何解决获取手机号码发于服务器解密时偶尔失败问题?
button组件中,获取手机号,发送于后台解密时偶尔失败,在体验与开发环境下无此问题,只有线上正式环境出现过。 错误日志如下: javax.crypto.BadPaddingException: pad block corrupted at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$BufferedGenericBlockCipher.doFinal(Unknown Source) at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Cipher.java:2165)
2021-11-25 - 手机号码解密偶尔错误是什么原因?
button组件、微信版本:8.0.11、在获取手机号码发送自后台服务解密时候报错,但不是每次都出现,至少在开发测试中没出现过,只是在线上正式版中偶尔出现。 错误日志如下: javax.crypto.BadPaddingException: pad block corrupted at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$BufferedGenericBlockCipher.doFinal(Unknown Source) at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Cipher.java:2165)
2021-11-25 - 如何解决调用onCameraFrame报错?
const listener = context.onCameraFrame()的时候报如下错,导致listener没跑进去 (in promise) MiniProgramError {"errMsg":"start:fail onCameraFrame is not supported on your device"} 基础版本:2.21.0,微信版本:8.0.16,手机型号:iPhone 12 pro,系统版本:iOS 15.0.2 wx.initFaceDetect({ success: res => { console.log(res) const context = wx.createCameraContext() const listener = context.onCameraFrame((frame) => { //这里直接报错 console.log(frame.data instanceof ArrayBuffer, frame.width, frame.height) //没有到这一步 wx.faceDetect({ frameBuffer: frame.data, width: frame.width, height: frame.height, enablePoint: true, enableConf: true, enableAngle: true, enableMultiFace: true, success: (faceData) => { console.log(faceData) let face = faceData.faceInfo[0] if (faceData.x == -1 || faceData.y == -1) { this.tipsText = '检测不到人脸' } if (faceData.faceInfo.length > 1) { this.tipsText = '请保证只有一人做认证' } else { if (face.angleArray.pitch >= 0.1 || face.angleArray.roll >= 0.1 || face.angleArray.yaw >= 0.1) { this.tipsText = '请平视摄像头' } else if (face.confArray.global <= 0.8 || face.confArray.leftEye <= 0.8 || face.confArray.mouth <= 0.8 || face.confArray.nose <= 0.8 || face.confArray.rightEye <= 0.8) { this.tipsText = '请勿遮挡五官' } else { this.tipsText = '人脸认证成功' // 这里可以写自己的逻辑了 } } }, fail: (err) => { console.log(err) if (err.x == -1 || err.y == -1) { this.tipsText = '检测不到人脸' } else { this.tipsText = '网络错误,请退出页面重试' } } }) }) listener.start() }, fail: res => { console.log(res) } })
2021-11-17 - 小程序内嵌微信开放标签的H5,此H5能否打开本地APP呢?
看到过某些文档,可在网页中使用“微信开放标签”跳转对应的移动应用,那小程序加载这个网页,可不可以打开移动应用呢?
2021-03-11