-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Import fails or hangs when Brave is already open #2503
Comments
The importer fails silently if it is run automatically, via @bsclifton I thought the b-l updater was responsible for preventing the case where b-l is still running when b-c is launched for the first time; does that condition not end up being enforced for some reason? |
@garrettr I suspect Muon Brave isn't quitting fast enough... We could (on the Brave Core side) build a delay in... or possibly check for the Brave process and have a timeout (like 10 seconds) where we wait for it to exit I can also look at the exit code and see if there's a way to terminate the process (even if uncleanly) Why is the lock file needed? Just to ensure the import doesn't get written over? (ex: data integrity) Or does it actually put file locks in place during import, which it wouldn't be able to acquire if Muon was open? edit: just noticed the comments in #2438 (comment) |
Only one browser process should be able to access a Chromium/Muon user data directory at a time; a lot of code relies on this assumption. When b-l is running, it obtains a lock for the user data directory; likewise, while the b-c importer is running, it (temporarily, briefly) obtains a lock for the user data directory. In both cases, we want to ensure:
Is there any reason not to handle this in the updater? |
Distilling some internal discussion: BackgroundBased on reports from users who've encountered this issue, our current hypothesis is that in some cases, Muon's profile lockfiles are not cleaned up properly when the automatic import runs during Brave Core's first run, which causes the automatic import to fail in During a manual import, we check lock files to determine if the browser to import data from is currently in use; if it is, we show a dialog that prompts the user to close the other browser. The code then waits for the user to either close the other browser and continue the import, or to cancel the import. During an automatic import, we cannot show the user such a dialog, so the importer cancels itself. It appears there are some cases in which Muon shuts down without cleaning up its lock files. If this happens, and then:
DebuggingAssuming this is the root cause, it can be simulated for debugging purposes by:
Next steps
|
Verified passed with
Verification passed on
|
Description
Originally captured with comment in #2438 (comment)
The text was updated successfully, but these errors were encountered: