-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Unexpected behavior after relaunch (macOS) #25576
Comments
Hi @justanotheranonymoususer Can you post the version you're using from here brave://version
|
@justanotheranonymoususer Thanks for reporting! I think all macOS relaunch code path should be like below
|
I actually thought about that, but I was afraid that the return value of |
I think that comment should be updated. AFAIK, sparkle doesn't install new update if there is already installed one. |
Description
There's an issue I saw several times on Mac with browser relaunch. If an update is available, and relaunch is triggered from a non-update-related flow, weird stuff is happening.
Steps to Reproduce
It's tricky to reproduce because you need to have a browser with a pending update. I'm not sure that the steps are precise but I believe it's something similar.
Actual result:
Things break. One time the browser crashed. Other time it launched but was just a blank window, without tabs or URL bar or anything at all.
Expected result:
Proper relaunch.
Reproduces how often:
Intermittent issue.
Brave version (brave://version info)
Latest Mac and latest Brave.
Version/Channel Information:
Didn't try but pretty sure it's not channel-specific.
Other Additional Information:
I'm pretty sure it's related to these changes:
I tried to contribute a fix but gave up. What I figured is that there are two ways to relaunch a browser: with Chromium functions and with code from Sparkle. The Chromium functions only work when no update is pending, and the Sparkle function only works when an update is pending. But Brave doesn't check whether an update is pending. Instead, it tries to guess, e.g. if you're on chrome://flag, chances are no update is pending. This assumption can often be incorrect.
What I tried to do is changing Sparkle's relaunch function to handle the case of no pending update and just return false instead of throwing an assert. Then, this code can be used in Brave (pseudo code):
But as I said, changing Sparkle and the Objective C code was too much for me.
Miscellaneous Information:
The text was updated successfully, but these errors were encountered: