本地存储(setStorageSync,getStorageSync)相关bug
发布于 6 年前 作者 tao61 11045 次浏览 来自 问答

小米手机MI 5(系统相关截图见最后)出现如下报错:

thirdScriptError
APP-SERVICE-SDK:setStorageSync:fail;at pages/entry page lifeCycleMethod onLoad function
Error: APP-SERVICE-SDK:setStorageSync:fail
    at new t (X5JavaBridge-4b749641b6a338c653d0085108b8dc11:6:24163)
    at c (X5JavaBridge-4b749641b6a338c653d0085108b8dc11:9:25751)
    at Object._.(anonymous function) [as setStorageSync] (X5JavaBridge-4b749641b6a338c653d0085108b8dc11:9:27294)
    at Object.<anonymous> (X5JavaBridge-4b749641b6a338c653d0085108b8dc11:5:28708)
    at Function.<anonymous> (X5JavaBridge-4b749641b6a338c653d0085108b8dc11:6:10957)
    at Object.<anonymous> (X5JavaBridge-4b749641b6a338c653d0085108b8dc11:6:17780)
    at Object.setStorageSync (X5JavaBridge-6579a36f7f861189c7c1daef6baef118:1750:48)
    at Entry.onLoad (X5JavaBridge-6579a36f7f861189c7c1daef6baef118:5196:32)
    at X5JavaBridge-6579a36f7f861189c7c1daef6baef118:2316:48
    at Array.forEach (native)

其他问题

1.此手机在__getStorageSync的时候会出现取某个字段多次才能取到__的情况,如

根据getStorageInfoSync获取到的数据如下

{"currentSize":2,"limitSize":10486,"keys":["X-Access-Token","env-version","home-count-all","home-count-new","home-count-star","myself"]}

但是使用getStorageSync取‘X-Access-Token’时取2次(程序记录了这个数据)才能取到

2.此手机出现了__getStorageInfoSync的时候limitSize不等于10240__的情况,以下是2条来自数据库的记录

  • {"currentSize":0,"limitSize":0,"keys":[]}
  • {"currentSize":3,"limitSize":10486,"keys":["X-Access-Token","all_clue_change","env-version","home-count-all","home-count-new","home-count-star","myself","new_clue_change"]}
5 回复

同样都问题,错误太多了。官方能不能出来说个话,定位下什么原因。

IOS真机存在同样问题,本地异步存储无法获取

缓存一直都挺好用的,还没出现过问题。

遇到同样的问题,最严重的还是iOS手机微信版本6.7.0

回到顶部