h5运行正常uniapp真机调式出现以下错误:
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught TypeError: Cannot read property 'getItem' of undefined
19:41:23.973 at (app-service.js:6028:39)
19:41:24.004 at (app-service.js:6743:3)
uniapp中没有cookie、session.storage. 改为
- uni.setStorageSync(KEY, DATA)
- uni.getStorage(OBJECT)
即可
uniapp在真机调试时遇到报错:'whitescreencausecreateinstanceContextfailed,尝试访问'getItem'属性时出现TypeError。问题在于uniapp中没有cookie和session.storage。解决方法是改用uni.setStorageSync和uni.getStorage进行本地存储操作。
1万+

被折叠的 条评论
为什么被折叠?



