-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Electron crash when switching protocols #27382
Comments
|
Commenting out the |
@zcbenz or @deepak1556 can you help? |
To dig a little farther, the failure comes from here - logging the failure reason string produces: |
Sorry missed this notification, this has to do with whether a process locked to a particular origin can navigate to another origin in the same process or different one safely. The above custom scheme is registered as a non standard scheme which means its origin is Chromium by default doesn't allow pages loaded over file to navigate to another page that has As from the user end, the custom scheme should be registered as standard scheme so that it obeys the process security policies and loads, add the following to
|
This ticket might be an opportunity to improve the documentation and help me and others avoid misconfiguring the When I first saw the documentation for registerSchemesAsPrivileged, I found it vague on certain points which lead me to believe that it might be optional altogether. Looking today at the privileges, I can now appreciate I need to set some of these flags to enabled, but the documentation doesn't explain the intended behavior/consequence if a flag is on or off. For example, if |
Duplicate of #28407 |
Preflight Checklist
Issue Details
Expected Behavior
I should be able to serve content from multiple protocols. i.e. using the standard
file://
as well as my custom protocolfoo://
.Actual Behavior
If I use
win.loadFile('index.html')
and stay withinfile://
, there is no crash.If I use
win.loadURL('foo://abc/deep.htm')
and stay withinfoo://
, there is no crash.If index.html has an href-link to
foo://....
then Electron crashes.To Reproduce
A very simple commit provided on the electron-quick-start: nkavian/electron-quick-start@7b49ad9
$ git clone git@github.com:nkavian/electron-quick-start.git $ cd electron-quick-start $ npm install $ npm start
The text was updated successfully, but these errors were encountered: