Android: a WebView renderer crash kills the host app process
I maintainer di solito rispondono entro 1 giorno
@dcalhoun ci sta già lavorando.
Dal 9/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Description
GutenbergView never overrides WebViewClient.onRenderProcessGone. When Android's WebView renderer process dies, the default behaviour is to kill the process hosting the WebView — so a renderer crash inside the editor takes the whole app down rather than just the editor.
iOS handles the equivalent case: controllerWebContentProcessDidTerminate resets readiness and reloads the web view, so the editor recovers in place.
$ grep -rn "onRenderProcessGone\|RenderProcessGoneDetail" android/Gutenberg/src/main/java/org/wordpress/gutenberg/
(no matches)
This is separate from the editor's JavaScript ErrorBoundary crash, which is handled in #638, #640 and #642. Those cover a React error that unmounts the editor while the renderer stays alive. This issue is the renderer process itself dying — out-of-memory being the most common cause on lower-end devices.
Step-by-step reproduction instructions
- Open the editor in the demo app or WordPress-Android.
- Terminate the renderer process for the editor's WebView. Either:
adb shell am kill <renderer process>— the sandboxed renderer appears as a child process of the app, or- navigate the WebView to
chrome://crashfromchrome://inspect.
- Observe the app process dies rather than the editor recovering.
Expected: the editor recovers, or at minimum reports an unusable editor to the host without terminating the app.
Suggested fix
Override onRenderProcessGone on the WebViewClient, return true to signal the crash was handled, and reuse the recovery path added in #642:
override fun onRenderProcessGone(view: WebView?, detail: RenderProcessGoneDetail?): Boolean {
isEditorLoaded = false
reloadEditor()
return true
}
Returning true is what prevents Android from killing the process. Note the WebView whose renderer died cannot be reused for rendering in all cases, so this may require recreating the WebView rather than reloading it — worth verifying against detail.didCrash() to distinguish a genuine crash from the system reclaiming memory.
Content recovery comes for free through LatestContentProvider, the same path reloadEditor() already uses.
Environment info
- GutenbergKit
trunk - Android — all versions;
onRenderProcessGoneis available from API 26 and the module'sminSdkis above that.
🤖 Generated with Claude Code
- Lingua principale
- JavaScript
- Stelle
- 29
- Fork
- 7
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wordpress-mobile/GutenbergKit
-
[Type] Bug [Type] Code Quality iOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
wordpress-mobile/GutenbergKit#668 ·
I maintainer di solito rispondono entro 1 giorno
-
[Type] Bug [Type] Performance iOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
wordpress-mobile/GutenbergKit#666 ·
I maintainer di solito rispondono entro 1 giorno
-
[Type] Bug iOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wordpress-mobile/GutenbergKit#664 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wordpress-mobile/GutenbergKit#522 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wordpress-mobile/GutenbergKit#443 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di wordpress-mobile/GutenbergKit
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
blamechris/chroxy#8579 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
modusensus/dsh-mneme#411 ·
-
Flaky (suspected): VideoTimelineEditor bed audio test sees 600px instead of 120px under CI loadAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Actions on ToastsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
XRPLF/xrpl-dev-portal#4000 ·
I maintainer di solito rispondono entro 1 giorno