- wx.createTCPSocket() 导致微信闪退?
基础库版本2.24.5。微信版本8.0.22和8.0.23。 在微信中重新打开带有TCP功能的开发版和体验版小程序,都会闪退。怎么解决?
2022-06-10 - APP-SERVICE-SDK:setStorageSync:fail writ
问题: 微信公众平台的运营中心错误查询 有很多次报错 APP-SERVICE-SDK:setStorageSync:fail,请问这是什么原因呢? 错误: APP-SERVICE-SDK:setStorageSync:fail write DB data fail;at App getUserSystemInfo function construct@[native code] rt@https://lib/WAService.js:1:281340 n@https://lib/WAService.js:1:281702 n@https://lib/WAService.js:1:493361 setStorageSync@https://lib/WAService.js:1:494351 https://lib/WAService.js:1:495735 https://lib/WAService.js:1:496335 https://lib/WAService.js:1:323260 https://lib/WAService.js:1:712493 https://lib/WAService.js:1:712589 https://lib/WAService.js:1:281981 getUserSystemInfo@https://app.js:183:8 https://lib/WAService.js:1:942569 wxFirst@https://app.js:194:10 https://lib/WAService.js:1:942569 success@https://app.js:144:16 https://lib/WAService.js:1:712307 https://lib/WAService.js:1:101845 g@https://lib/WAService.js:1:276440 We@https://lib/WAService.js:1:276615 https://lib/WAService.js:1:278067 y@https://lib/WAService.js:1:1377 https://lib/WAService.js:1:1121 _@https://lib/WAService.js:1:1287 invoke@https://lib/WAService.js:1:117378 X@https://lib/WAService.js:1:270517 https://lib/WAService.js:1:278048 Fr@https://lib/WAService.js:1:362044 https://lib/WAService.js:1:323260 https://lib/WAService.js:1:712493 https://lib/WAService.js:1:712589 https://lib/WAService.js:1:281981 handleVersion@https://app.js:133:8 https://lib/WAService.js:1:942569 onLaunch@https://app.js:88:10 https://lib/WAService.js:1:942010 e@https://lib/WAService.js:1:942896 https://lib/WAService.js:1:943086 https://lib/WAService.js:1:931969 https://app.js:8:1 require@https://lib/WAService.js:1:971779 global code@https://usr/app-service.js:3311:17 所涉及到的代码: [代码]// 获取用户设备信息[代码][代码] [代码][代码]getUserSystemInfo() {[代码][代码] [代码][代码]let ISIPHONEX_ETC = [代码][代码]false[代码][代码];[代码][代码] [代码][代码]let deviceBrand = [代码][代码]''[代码][代码];[代码][代码] [代码][代码]try[代码] [代码]{[代码][代码] [代码][代码]let res = wx.getSystemInfoSync();[代码][代码] [代码][代码]let brand = res.brand;[代码][代码] [代码][代码]let model = res.model;[代码] [代码] [代码][代码]deviceBrand = brand;[代码][代码] [代码][代码]// iPhone X 及以上机型兼容[代码][代码] [代码][代码]if[代码] [代码](brand == [代码][代码]'iPhone'[代码] [代码]|| brand == [代码][代码]'devtools'[代码][代码]) {[代码][代码] [代码][代码]if[代码] [代码](brand == [代码][代码]'devtools'[代码] [代码]&& model == [代码][代码]'iPhone X'[代码][代码]) {[代码][代码] [代码][代码]model = [代码][代码]'unknown<iPhone10,6>'[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]if[代码] [代码](model.search([代码][代码]'unknown'[代码][代码]) != -1) {[代码][代码] [代码][代码]let strStart = model.indexOf([代码][代码]'<'[代码][代码]);[代码][代码] [代码][代码]let strEnd = model.indexOf([代码][代码]','[代码][代码]);[代码][代码] [代码][代码]model = model.substring(strStart, strEnd).split([代码][代码]'<iPhone'[代码][代码])[1] * 1;[代码][代码] [代码][代码]ISIPHONEX_ETC = model > 9 ? [代码][代码]true[代码] [代码]: [代码][代码]false[代码][代码];[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]ISIPHONEX_ETC = model.search([代码][代码]'iPhone X'[代码][代码]) != -1 ? [代码][代码]true[代码] [代码]: [代码][代码]false[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]} [代码][代码]catch[代码] [代码](e) {[代码][代码] [代码][代码]console.log(e);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]wx.setStorageSync([代码][代码]'systemInfo'[代码][代码], {[代码][代码] [代码][代码]ISIPHONEX_ETC,[代码][代码] [代码][代码]ISIPHONEX_NUM: 53,[代码][代码] [代码][代码]brand: deviceBrand[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}[代码]
2019-03-11