Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uni-storage-keys 这个键怎么取消掉 #1155

Closed
BlueDancers opened this issue Dec 20, 2019 · 5 comments
Closed

uni-storage-keys 这个键怎么取消掉 #1155

BlueDancers opened this issue Dec 20, 2019 · 5 comments

Comments

@BlueDancers
Copy link

问题描述
在安卓APP的webview里面打开uniapp的h5页面,会出现这样的报错
chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'getItem' of null"
查看打包后的代码,猜测是因为webview的限制导致,导致在页面没加载出来之前会出现执行
localStorage.getItem("uni-storage-keys") 这样的代码导致的报错,但是这个代码并不知道如何取消

系统信息:

  • 发行平台: H5平台
  • uni-app版本
    uni-app v2.4.2
    uni-app cli v2.0.0-24220191115011
  • 设备信息 android

希望可以在webview里面正常使用

@zhetengbiji
Copy link
Collaborator

你的webview未启用localStorage导致,如果不启用会导致storage相关接口报错无法使用,相关文章安卓webview使用localStorage

@zhetengbiji
Copy link
Collaborator

针对storage接口的报错信息,后续将优化一下,使其看起来更直观。

@BlueDancers
Copy link
Author

我们知道这样的解决,但是webview是第三方合作商的app提供的,我方不方便让他们在做出协调,麻烦您考虑一下,我们项目之前版本使用taro开发的,可以正常使用的,但是我们团队觉得uniapp的h5表现形式更好,也完成了项目的移植,所以希望您考虑一下,我们对uniapp非常支持,但是这个问题不解决,我们可能无法使用uniapp了,希望官方协调一下

@Wangyaqi
Copy link
Contributor

关闭uni统计试试,https://ask.dcloud.net.cn/article/36303

@BlueDancers
Copy link
Author

嗯嗯,谢谢我再看看怎么解决这个吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants