收藏
回答

本地存储大小限制为0、本地存储无故清空

框架类型 问题类型 终端类型 操作系统 微信版本 基础库版本
小程序 Bug 客户端 6.6.6 1.9.98

最近遇到好多次本地存储突然清空的情况,很大概率排除了自身业务代码的原因,于是开始在代码中加入了部分log来记录此类问题,以下是2个案例,(数据记录的分别是wx.getSystemInfoSync()和wx.getStorageInfoSync()获取的数据)发现limitSize: 0 (正常不应该是10240么)


案例1

{"screenWidth":360,"pixelRatio":3,"system":"Android 5.1","benchmarkLevel":7,"windowWidth":360,"brand":"Meizu","screenHeight":640,"version":"6.6.6","fontSizeSetting":16,"language":"zh_CN","windowHeight":570,"model":"m3 note","platform":"android","SDKVersion":"2.0.9"}


{"keys":[],"currentSize":0,"limitSize":0}


案例2

{"screenWidth":360,"benchmarkLevel":8,"windowHeight":608,"screenHeight":680,"language":"zh_CN","version":"6.6.7","system":"Android 8.0.0","fontSizeSetting":18,"pixelRatio":3,"model":"HWI-AL00","statusBarHeight":24,"brand":"HUAWEI","windowWidth":360,"platform":"android","SDKVersion":"2.0.9"}


{"limitSize":0,"keys":[],"currentSize":0}

回答关注问题邀请回答
收藏

1 个回答

  • Special
    Special
    2018-06-13

    你好,这个确实是我们 Android 客户端的偶现 BUG,我们下个版本修复,目前建议通过 getStorageInfo 异步接口获取

    2018-06-13
    赞同 1
    回复 2
    • Herman
      Herman
      2018-07-17

      这个bug的修复情况如何?

      2018-07-17
      1
      回复
    • 小宋
      小宋
      2018-10-23

      这个bug的修复情况如何

      2018-10-23
      回复
登录 后发表内容