-
Notifications
You must be signed in to change notification settings - Fork 856
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
Fixed issues with loading the app from cold when deep linking #3201
Conversation
@amyblais This might be a case for a dot release for v5.10 - as the app is somewhat unusable when users get into this state. The server will load on v5.10, but the dropdown fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the chance to take a peek! One question below.
MainWindow.show(); | ||
ViewManager.handleDeepLink(deeplinkingUrl); | ||
} else { | ||
MainWindow.on(MAIN_WINDOW_CREATED, () => ViewManager.handleDeepLink(deeplinkingUrl)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any race conditions at play? (Could MainWindow
get created between our get
and on
registration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I went to go double-check, I found another instance where we're calling show()
before app.ready()
which is really not good.
However, other callers of this are also waiting for the ready
event, so as long as we're calling it after that there shouldn't be any race conditions as that's when we expect the window to be registered.
The ready
event docs if you're interested: https://www.electronjs.org/docs/latest/api/app#event-ready
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one small thing to verify.
Here are the test results below: Test Summary for Linux on commit d0355cbThe following known failed tests have been fixed on Linux: Test Summary for macOS on commit d0355cbThe following known failed tests have been fixed on macOS: |
Cherry pick is scheduled. |
* Fixed issues with loading the app from cold when deep linking * Don't call show() before the window is created on Windows (cherry picked from commit 1fe94eb)
…#3205) * Fixed issues with loading the app from cold when deep linking * Don't call show() before the window is created on Windows (cherry picked from commit 1fe94eb) Co-authored-by: Devin Binnie <[email protected]>
Summary
While working on #3200 I found an issue with deep linking when booting the app from cold. The application would fail to load the initial server, and the dropdown menu would also not load. This was caused by the main window creation call happening too early, before a bunch of other setup code could be run.
This PR fixes the issue by having the application wait for the main window to be created normally, before attempting to deep link.