MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.03k stars 1.06k forks source link

[Sentry] Error: database or disk is full (code 13 SQLITE_FULL) #9670

Open sentry-io[bot] opened 1 month ago

sentry-io[bot] commented 1 month ago

Sentry Issue: METAMASK-MOBILE-2CVQ

Error: database or disk is full (code 13 SQLITE_FULL)
  at convertError (app:///index.android.bundle:22:3)
  at anonymous (app:///index.android.bundle:22:3)
  at convertErrors (app:///index.android.bundle:22:3)
  at anonymous (app:///index.android.bundle:70:5)
  at anonymous (app:///index.android.bundle:183:11)
...
(5 additional frame(s) were not displayed)

Technical Details

In this iteration, we should migrate async-storage-wrapper.js to access MMKV instead of AsyncStorage since it doesn't have the limitations that AsyncStorage has. To do so, we should leverage getItem, setItem, and removeItem from the wrapper class to perform this migration. In each method.

Acceptance Criteria

kylanhurt commented 3 weeks ago

https://consensys.slack.com/archives/C04GLB755TK/p1717510646233199

kylanhurt commented 2 weeks ago

Testing on Android emulator (issue doesn't occur on iOS, and I was not able to test on physical Android device) did not show any critical degradation of functionality after this error has occurred.

kylanhurt commented 2 weeks ago

Cal and I have done some digging and since the AsyncStorage.setItem() method will error out once it hits the limit on Android, that means that it essentially destroys the app's ability to storage values in AsyncStorage. When this occurs, the app won't even get past the splash screen (doesn't even get to onboarding, see video). Our conclusion is that this shines on a larger issue, that our app needs to be able to still function when AsyncStorage fails, even if it functions in a degraded state.

https://github.com/MetaMask/metamask-mobile/assets/6249205/0742d45d-83b3-4d7e-b71f-6eec3103488e

Cal-L commented 1 week ago

Repurposing this ticket to ensure that app still works without Async storage