Skip to content
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

Lose cookies during channel bump upgrade #2339

Closed
darkdh opened this issue Dec 3, 2018 · 19 comments · Fixed by brave/brave-core#1041
Closed

Lose cookies during channel bump upgrade #2339

darkdh opened this issue Dec 3, 2018 · 19 comments · Fixed by brave/brave-core#1041

Comments

@darkdh
Copy link
Member

darkdh commented Dec 3, 2018

Description

Upgrade browser from 0.(X-1).* to 0.X.* will automatically relaunch and showing white window with extensions crashed notifications but cookies will be erased

Steps to Reproduce

  1. Download older version before channel bump (ex. current version of dev is 0.58.10 download 0.57.4)
  2. open "About Brave"
  3. Waiting for update process prompting relaunch
  4. Click relaunch
  5. There will be a successful relaunch with white window

Actual result:

update-relaunch
And lost only cookies after force quit Brave

Expected result:

Cookies should be preserved

Reproduces how often:

Very often. Doing a system sleep at least 5 mins between step 3 and step 4 will make it easier to reproduce

Brave version (brave://version info)

every channel bump on all channels
0.(X-1).* to 0.X.*

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? YES

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields?
  • Is the issue reproducible on the latest version of Chrome?

Additional Information

@LaurenWags
Copy link
Member

Tried with the following STR and did not reproduce on Beta Channel:

  1. Downloaded Beta channel 0.56.7 .dmg (https://github.com/brave/brave-browser/releases/tag/v0.56.7)
  2. Set a cookie on http://www.html-kit.com/tools/cookietester/
  3. Navigated to brave://settings/help
  4. Waited for update to be downloaded
  5. Clicked Relaunch.
  6. Brave Beta closed and did not reopen
  7. I manually launched Brave Beta and had been updated to 0.57.8
  8. Verified my cookie was intact. No white screen observed.

@simonhong simonhong self-assigned this Dec 4, 2018
@simonhong
Copy link
Member

simonhong commented Dec 4, 2018

I also can't reproduce with dev release.
Cookies are not changed during the updating from 0.57.2 to 0.58.10.
(Browser was closed and reopened after clicking relaunch button)
I started this test with no existing user data.

@darkdh
Copy link
Member Author

darkdh commented Dec 4, 2018

it requires multiple times trying.
And I notice there will be a Profile error occurred titled dialog showing for a few seconds
It is ShowProfileErrorDialog and the most possible caller would be CreatePrimaryProfile in chrome_browser_main.cc after both GetStartupProfile and GetFallbackStartupProfile still gets empty profile

@darkdh
Copy link
Member Author

darkdh commented Dec 4, 2018

This is what processes of it looks like when white window shows up

darkdh           79255 124.7  0.9  5058620 317560   ??  R    12:11PM   8:47.08 /Applications/Brave Browser Beta.app/Contents/MacOS/Brave Browser Beta --disable-chrome-google-url-tracking-client --disable-domain-reliability --disable-features=SharedArrayBuffer,DefaultEnableOopRasterization,VizDisplayCompositor,AutofillSaveCardSignInAfterLocalSave,kAutofillServerCommunication --enable-features=EnableEmojiContextMenu,DesktopPWAWindowing,fill-on-account-select,NewExtensionUpdaterService --enable-tab-audio-muting --no-pings
darkdh           79021   0.0  0.0  4334132   9584   ??  S    12:05PM   0:00.02 /Applications/Brave Browser Beta.app/Contents/Versions/70.0.56.7/Brave Browser Beta Framework.framework/Helpers/crashpad_handler --monitor-self-annotation=ptype=crashpad-handler --database=/Users/darkdh/Library/Application Support/BraveSoftware/Brave-Browser-Beta/Crashpad --metrics-dir=/Users/darkdh/Library/Application Support/BraveSoftware/Brave-Browser-Beta --url=https://laptop-updates.brave.com/1/bc-crashes --annotation=channel=beta --annotation=plat=OS X --annotation=prod=Brave_Mac --annotation=ver=70.0.56.7 --handshake-fd=9
darkdh           79257   0.0  0.0  4325940   9500   ??  S    12:11PM   0:00.01 /Applications/Brave Browser Beta.app/Contents/Versions/70.0.56.7/Brave Browser Beta Framework.framework/Helpers/crashpad_handler --monitor-self-annotation=ptype=crashpad-handler --database=/Users/darkdh/Library/Application Support/BraveSoftware/Brave-Browser-Beta/Crashpad --metrics-dir=/Users/darkdh/Library/Application Support/BraveSoftware/Brave-Browser-Beta --url=https://laptop-updates.brave.com/1/bc-crashes --annotation=channel=beta --annotation=plat=OS X --annotation=prod=Brave_Mac --annotation=ver=70.0.56.7 --handshake-fd=9

@darkdh
Copy link
Member Author

darkdh commented Dec 4, 2018

The relaunching instance is still "before upgrade" one, I can tell from RunningChromeVersion, SingletonCookie and SingletonLock. My test subject happens to have chromium bump so RunningChromeVersion is 70.0.56.7 vs 71.0.57.8

@simonhong
Copy link
Member

simonhong commented Dec 5, 2018

The main difference from my test is white window shows or not.
I'm repeating below steps.

  1. install 70.0.56.7
  2. set/check cookie status
  3. waiting to update and click relaunch
  4. Launch manually because relaunch is failed (71.0.57.8 is running)
  5. check cookie status and ps -aux to check older version is running

Need to find how to make white window visible.

@darkdh
Copy link
Member Author

darkdh commented Dec 5, 2018

yes, only white window will make you lose cookies

@simonhong
Copy link
Member

simonhong commented Dec 5, 2018

During the termination (by restart or by quit), downloaded new version of app bundle is copied.
So, I think there is some timing issue during the restart.
Not sure but I think restart is triggered before fully copied.
This is just assumption. need to verify from sparkle source code and when copy is done during the browser shutdown.

@diracdeltas
Copy link
Member

On macos, i just accepted the dev channel update from 0.59 to 0.60; on relaunch, all cookies were gone. i was also unable to autofill passwords until restarting my computer.

@simonhong
Copy link
Member

simonhong commented Dec 15, 2018

@diracdeltas Did you see relaunch fail?

@diracdeltas
Copy link
Member

relaunch seemed to succeed

@simonhong
Copy link
Member

Thanks for reporting.
Relaunching after update might not be related with this cookie lost.
Also sparkle doesn't touch user data during the update.
Need to investigate more.

@simonhong simonhong reopened this Dec 15, 2018
@diracdeltas
Copy link
Member

in case it helps: i checked chrome://settings/siteData and it showed all my cookies even though i was logged out of all sites

@simonhong
Copy link
Member

simonhong commented Dec 15, 2018

i was also unable to autofill passwords until restarting my computer.

@diracdeltas Browser quit & restart didn't help?

@bbondy bbondy modified the milestones: 0.58.x - Release, 1.x Backlog Dec 18, 2018
@diracdeltas
Copy link
Member

browser restart did not help, i had to restart my mac

i just updated to 0.60.3 though, and all my cookies are preserved and autofill works

@rebron rebron modified the milestone: 1.x Backlog Feb 7, 2019
@diracdeltas
Copy link
Member

Just encountered this again when updating to 0.61.51; cookies were still lost when I restarted my computer.

maybe this has something to do with Chromium being unable to decrypt the cookies

@diracdeltas
Copy link
Member

Also in case it helps, i updated by clicking on the green arrow button in the browser top bar, not by going to chrome://settings.

@rebron rebron added priority/P4 Planned work. We expect to get to it "soon". needs-investigation A bug not 100% confirmed/fixed labels Mar 26, 2019
@simonhong
Copy link
Member

I didn't see this for a long time. if anyone can see this again feel free to reopen.

@rebron
Copy link
Collaborator

rebron commented Aug 7, 2019

@diracdeltas Let us know if this is still happening. We had the 67.x update last week and doing another update soon so have a chance to test another time or two.

@kjozwiak kjozwiak added closed/invalid and removed needs-investigation A bug not 100% confirmed/fixed labels Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants