Skip to content

Conversation

jocmp
Copy link
Owner

@jocmp jocmp commented Jul 17, 2024

The "saveState" method on WebView will persistent the entire contents of the webview and info about the backstack. This can rack up megabytes worth of data. The bundle limit is about 500KB.

The fix is to only save the scroll-y position and rebuild the webview from other state. This prevents the bundle size from exceeding the max size of an integer.

Ref: https://developer.android.com/reference/android/os/TransactionTooLargeException

Link #179, Closes #184

The "saveState" method on WebView will persistent
the entire contents of the webview and info about
the backstack. This can rack up megabytes worth of data.
The bundle limit is about 500KB.

The fix is to only save the scroll-y position and
rebuild the webview from other state. This prevents
the bundle size from exceeding the max size of an integer.
@jocmp jocmp changed the title Fix webview save state bug Fix article background crashes Jul 17, 2024
@jocmp jocmp changed the title Fix article background crashes Fix bug causing background crashes Jul 17, 2024
@jocmp jocmp marked this pull request as ready for review July 17, 2024 22:43
@jocmp jocmp merged commit 97d6858 into main Jul 17, 2024
@jocmp jocmp deleted the jc/180/bundle-size branch July 17, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clear article on top-level filter nav
1 participant