Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure standard schemes are registered in nw service process #22867

Merged
merged 3 commits into from Apr 1, 2020

Conversation

deepak1556
Copy link
Member

@deepak1556 deepak1556 commented Mar 27, 2020

Description of Change

Crash in Network service process due to #20546 regressed after f5b9e49 .

This PR fixes by making a clear indication of how the schemes are registered in respective Browser, Renderer and Network process.

Identified while testing #20625 but ci logs in master also show the crash.

Checklist

Release Notes

Notes: fix crash in network service process when using protocol.registerSchemeAsPrivileged api

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 27, 2020
@deepak1556 deepak1556 requested review from nornagon, zcbenz and a team March 27, 2020 19:50
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a test?

@deepak1556
Copy link
Member Author

deepak1556 commented Mar 27, 2020

@nornagon thoughts on how to test this ? when this crash happens it doesn't seem to affect the resource loading on those custom schemes, so thats why existing test suites where passing. Only the service process goes on a loop restarting.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 28, 2020
@nornagon
Copy link
Member

nornagon commented Mar 31, 2020

@nornagon thoughts on how to test this ? when this crash happens it doesn't seem to affect the resource loading on those custom schemes, so thats why existing test suites where passing. Only the service process goes on a loop restarting.

Maybe I'm confused then... how is this change visible to the user?

@deepak1556
Copy link
Member Author

deepak1556 commented Mar 31, 2020

Just infinite logs from network service

[14085:0331/150914.566974:WARNING:pref_notifier_impl.cc(61)] Init observer found at shutdown.
[14085:0331/150914.568450:ERROR:validation_errors.cc(76)] Invalid message: VALIDATION_ERROR_DESERIALIZATION_FAILED (network.mojom.NetworkContext.1731934142 )

The registered scheme itself works fine, files are served over the protocol, renderer window.location object parses the host and other properties.

And just observed that shutdown of app isn't graceful. Let me see if I can write a test that verifies app shutdown when using this api.

@deepak1556
Copy link
Member Author

@nornagon added simple test, PTAL.

Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems weird to me that the network service would function fine but continually crash..? but OK.

spec-main/api-protocol-spec.ts Outdated Show resolved Hide resolved
spec-main/api-protocol-spec.ts Outdated Show resolved Hide resolved
Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>
@deepak1556
Copy link
Member Author

Failing test is unrelated, merging.

@deepak1556 deepak1556 merged commit bac1c7f into master Apr 1, 2020
@release-clerk
Copy link

release-clerk bot commented Apr 1, 2020

Release Notes Persisted

fix crash in network service process when using protocol.registerSchemeAsPrivileged api

@deepak1556 deepak1556 deleted the robo/fix_nw_process_crash branch April 1, 2020 02:33
@trop
Copy link
Contributor

trop bot commented Apr 1, 2020

I have automatically backported this PR to "9-x-y", please check out #22917

@sofianguy sofianguy added this to Fixed in 9.0.0-beta.13 in 9-x-y Apr 3, 2020
sentialx pushed a commit to sentialx/electron that referenced this pull request Apr 7, 2020
…ectron#22867)

* fix: ensure standard schemes are registered in nw service process

Refs electron#20546

* chore: add test

* chore: apply suggestions from code review

Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>

Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
9-x-y
Fixed in 9.0.0-beta.13
Development

Successfully merging this pull request may close these issues.

None yet

3 participants