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
Preload scripts can run twice in the same process in different node environments #17576
Labels
3-1-x
4-2-x
5-0-x
bug 🪲
bug/regression ↩️
A new version of Electron broke something
status/confirmed
A maintainer reproduced the bug or agreed with the feature
Projects
Comments
MarshallOfSound
added
bug 🪲
bug/regression ↩️
A new version of Electron broke something
status/confirmed
A maintainer reproduced the bug or agreed with the feature
component/plznavigate
4-2-x
5-0-x
3-1-x
labels
Mar 27, 2019
MarshallOfSound
added a commit
that referenced
this issue
Mar 27, 2019
navigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes #17576
trop-bot
pushed a commit
to trop-bot/electron
that referenced
this issue
Mar 27, 2019
…vigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
trop-bot
pushed a commit
to trop-bot/electron
that referenced
this issue
Mar 27, 2019
…vigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
trop-bot
pushed a commit
to trop-bot/electron
that referenced
this issue
Mar 27, 2019
…vigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
trop-bot
pushed a commit
to trop-bot/electron
that referenced
this issue
Mar 28, 2019
…vigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
trop-bot
pushed a commit
to trop-bot/electron
that referenced
this issue
Mar 28, 2019
…vigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
trop-bot
pushed a commit
to trop-bot/electron
that referenced
this issue
Mar 28, 2019
…vigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
MarshallOfSound
pushed a commit
that referenced
this issue
Mar 28, 2019
…vigations (#17595) There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes #17576
MarshallOfSound
pushed a commit
that referenced
this issue
Mar 28, 2019
…vigations (#17596) There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes #17576
MarshallOfSound
pushed a commit
that referenced
this issue
Mar 28, 2019
…vigations (#17597) There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes #17576
@MarshallOfSound can you share more details? Why wasn't this an issue in Electron 2? |
kiku-jw
pushed a commit
to kiku-jw/electron
that referenced
this issue
May 16, 2019
…lectron#17577) navigations There is a race condition between DidCreateScriptContext and another navigation occuring in the main process. If the navigation occurs while the preload script is running, the same process is re-used. This ensures that any pending navigations are completely removed / ignored when we trigger a new navigation. Fixes electron#17576
Merging into #18397 as the long term solution to this 👍 |
4 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3-1-x
4-2-x
5-0-x
bug 🪲
bug/regression ↩️
A new version of Electron broke something
status/confirmed
A maintainer reproduced the bug or agreed with the feature
Issue Details
Expected Behavior
When navigations occur, a new process should be created for the navigation.
Actual Behavior
When a navigation occurs during a preloads scripts execution the same process is re-used as Chromium does not think the navigation has been committed yet. This causes a memory leak and all native node modules to break.
To Reproduce
Fiddle: https://gist.github.com/MarshallOfSound/c89aa0037c3da114d44aa3a2d1a0fc24
Screenshots
As you can see here there are three navigation loads, the second and the third one actually have the same process ID (and are running in the same process)
The text was updated successfully, but these errors were encountered: