expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
34.42k stars 5.51k forks source link

[docs] What happens when expo-updates run but receives action: `DEVICE_STORAGE_LOW` #19483

Closed jackkinsella closed 2 years ago

jackkinsella commented 2 years ago

Summary

I got the following exception report, seemingly related to expo-updates and wanted to ask how its occurrence might affect the user experience.

SQLiteFullException: database or disk is full (code 13 SQLITE_FULL)
    at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
    at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:707)
    at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:439)
    at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:403)
    at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:588)
    androidx.sqlite.db.framework.FrameworkSQLiteDatabase in endTransaction at line 94
    androidx.room.RoomDatabase in internalEndTransaction at line 594
    androidx.room.RoomDatabase in endTransaction at line 584
    expo.modules.updates.db.dao.UpdateDao_Impl in _updateUpdate at line 232
    expo.modules.updates.db.dao.UpdateDao in incrementSuccessfulLaunchCount at line 101
    expo.modules.updates.UpdatesController$initializeErrorRecovery$1 in         
    markSuccessfulLaunchForLaunchedUpdate$lambda-1 at line 351
    expo.modules.updates.UpdatesController$initializeErrorRecovery$1 in $r8$lambda$tN5IZPDe4VIzeWabKVZHpDqHKPs
    expo.modules.updates.UpdatesController$initializeErrorRecovery$1$$ExternalSyntheticLambda1 in run at line 
...

It was triggered by DEVICE_STORAGE_LOW on boot.

Does it: a. Only prevent that OTA update from downloading?; or b. Completely prevent the app from loading for that user?

Adding this to the docs would be great. And if there's anything we app-developers can do in user-space to assist the user in knowing they are low on memory, some pointers would be amazing. Thank you Expo team ❤️

Link to the related docs page

https://docs.expo.dev/versions/latest/sdk/updates/

Anything else?

No response

expo-bot commented 2 years ago

Thank you for filing this issue! This comment acknowledges we believe this may be a bug and there’s enough information to investigate it. However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

douglowder commented 2 years ago

@jackkinsella in fact, if you hit the above error, both (a) and (b) are true. We do not attempt to launch the app until it is actually stored in the DB, so if the store fails (as in this case), the launch will also fail.