podverse / podverse-rn

Podverse mobile app written in React Native for iOS, Android, and F-Droid
https://podverse.fm/about
GNU Affero General Public License v3.0
216 stars 36 forks source link

Android 6MB AsyncStorage limit causing disasters for users (move large data out of AsyncStorage and into app storage directory) #1611

Closed mitchdowney closed 1 year ago

mitchdowney commented 1 year ago

It appears this is happening on Android when a user is subscribed to custom RSS feeds that exceed the 6MB AsyncStorage limit:

Error: database or disk is full (code 13 SQLITE_FULL) at convertError (AsyncStorage.native.js:408:15) at AsyncStorage.native.js:401:57 at Array.map () at convertErrors (AsyncStorage.native.js:401:48) at AsyncStorage.native.js:122:22 at MessageQueue.invokeCallback (MessageQueue.js:465:13) at MessageQueue.js:127:12 at MessageQueue.guard (MessageQueue.js:370:9) at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126:10) at debuggerWorker.js:69:58

mitchdowney commented 1 year ago

This line appears to be the trouble-maker: https://github.com/podverse/podverse-rn/blob/5dbd022d09a454868ffd668dea0bcd7e8d30ffbf/src/services/parser.ts#L158

mitchdowney commented 1 year ago

Updated the title of this issue since reaching the 6MB limit on Android can cause all kinds of disasters for users. Basically whenever AsyncStorage is used for saving large amounts of data (like ADD_BY_RSS_PODCASTS and saving parsed downloaded podcast information locally for offline use).

mitchdowney commented 1 year ago

This should be fixed in v4.12.3