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

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

Closed
sentry-io bot opened this issue May 17, 2024 · 4 comments · Fixed by #10153
Closed

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

sentry-io bot opened this issue May 17, 2024 · 4 comments · Fixed by #10153
Assignees
Labels
area-Sentry Issue from Sentry regression-prod-7.21.0 Regression bug that was found in production in release 7.21.0 release-7.21.0 Issue or pull request that will be included in release 7.21.0 release-7.27.1 Issue or pull request that will be included in release 7.27.1 Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform type-bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented May 17, 2024

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.

  • getItem -> Attempt to access key in MMKV. Then fallback to getting key via AsyncStorage. Set item in MMKV if we're able to get the key successfully from AsyncStorage.
  • setItem -> Replace storage with MMKV
  • removeItem -> Also remove item from MMKV

Acceptance Criteria

  • App should function as it did before
  • New installs should not be interacting with MMKV instead of AsyncStorage
@NicolasMassart NicolasMassart added Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform release-7.21.0 Issue or pull request that will be included in release 7.21.0 regression-prod-7.21.0 Regression bug that was found in production in release 7.21.0 labels May 17, 2024
@metamaskbot metamaskbot changed the title Error: database or disk is full (code 13 SQLITE_FULL) [Sentry] Error: database or disk is full (code 13 SQLITE_FULL) May 20, 2024
@metamaskbot metamaskbot added type-bug Something isn't working area-Sentry Issue from Sentry labels May 20, 2024
@kylanhurt
Copy link
Contributor

@kylanhurt
Copy link
Contributor

kylanhurt commented Jun 11, 2024

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
Copy link
Contributor

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.

Screen.Recording.2024-06-13.at.5.13.28.PM.mov

@Cal-L
Copy link
Contributor

Cal-L commented Jun 18, 2024

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

@kylanhurt kylanhurt linked a pull request Jun 28, 2024 that will close this issue
7 tasks
@metamaskbot metamaskbot added the release-7.27.1 Issue or pull request that will be included in release 7.27.1 label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Sentry Issue from Sentry regression-prod-7.21.0 Regression bug that was found in production in release 7.21.0 release-7.21.0 Issue or pull request that will be included in release 7.21.0 release-7.27.1 Issue or pull request that will be included in release 7.27.1 Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform type-bug Something isn't working
Projects
Archived in project
Status: Fixed
Development

Successfully merging a pull request may close this issue.

4 participants