fix(main): ignore ERR_ABORTED did-fail-load events in renderer recovery - #314
Open
HuangLeijiana wants to merge 1 commit into
Open
fix(main): ignore ERR_ABORTED did-fail-load events in renderer recovery#314HuangLeijiana wants to merge 1 commit into
HuangLeijiana wants to merge 1 commit into
Conversation
Programmatic navigation switches (restart, recovery page, Safe Mode toggle, second-instance reopen) stop the in-flight load before loading the next URL, which Electron reports as did-fail-load with the numeric net error ERR_ABORTED (-3). The recovery handler treated every such event as a renderer loss: it issued an extra webContents.reload() that raced the navigation it just started and consumed the shared 3-reload budget, so a genuine crash later hit the throttled branch and surfaced the 'stopped responding' recovery UI over a healthy runtime. openHarness already treats ERR_ABORTED as benign at the loadURL await site; mirror that here via a new isAbortedNavigationCode predicate and cover both the numeric-code and Error shapes with unit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Programmatic navigation switches (restart, recovery page, Safe Mode toggle, second-instance reopen) stop the in-flight load before loading the next URL, which Electron reports as did-fail-load with the numeric net error ERR_ABORTED (-3). The recovery handler treated every such event as a renderer loss: it issued an extra webContents.reload() that raced the navigation it just started and consumed the shared 3-reload budget, so a genuine crash later hit the throttled branch and surfaced the 'stopped responding' recovery UI over a healthy runtime.
openHarness already treats ERR_ABORTED as benign at the loadURL await site; mirror that here via a new isAbortedNavigationCode predicate and cover both the numeric-code and Error shapes with unit tests.