brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.9k stars 2.34k forks source link

session cookie not persisted on restart when applying browser update - follow up to 28379 #29135

Open LaurenWags opened 1 year ago

LaurenWags commented 1 year ago

Description

Found while testing #28379

When session cookie is set and I go to apply browser update (used brave://settings/help), the session cookie is not retained after browser restart from that page.

Note - could be macOS specific as @goodov could not reproduce on Windows. Requesting others on @brave/qa-team to try various platforms to see if it reproduces for them.

Steps to Reproduce

  1. Install slightly old beta version which includes this fix, but which will want to update. (I used 1.50.86)
  2. Ensure "Continue where you left off" is enabled.
  3. Open https://bayden.com/test/sessions/ and choose lightcyan from selector.
  4. Ensure sessionCookie says color is: lightcyan.
  5. Navigate to brave://settings/help and apply update via "Relaunch" button, browser should restart automatically.
  6. Expect the session is restored and the website is still opened.
  7. Navigate to test page and refresh the page (Ctrl/Cmd+R). --> Expect sessionCookie is still lightcyan. However sessionCookie field has no value instead

Actual result:

8

Expected result:

sessionCookie should be lightcyan after applying browser restart in this case

Reproduces how often:

easily on macOS, @goodov could not reproduce on Windows

Brave version (brave://version info)

Brave | 1.50.91 Chromium: 111.0.5563.64 (Official Build) beta (x86_64)
-- | --
Revision | c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}
OS | macOS Version 12.6.3 (Build 21G419)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

cc @rebron @goodov @brave/qa-team

goodov commented 1 year ago

Griffin change to disable this on MacOS is merged to staging: https://github.com/brave/brave-variations/pull/557

@LaurenWags can you please test this to ensure the Griffin change resolves this on MacOS right now?

Cherry-pick to merge into production after confirmed the issue is fixed: https://github.com/brave/brave-variations/pull/558

goodov commented 1 year ago

the underlying issue is in the update process: https://github.com/brave/brave-browser/issues/25576

LaurenWags commented 1 year ago

@goodov I did the following:

  1. Launched 1.50.86 as follows /Applications/Brave\ Browser\ Beta.app/Contents/MacOS/Brave\ Browser\ Beta --args --enable-logging=stderr --variations-server-url=https://variations.bravesoftware.com/seed - confirm version on brave://version, leave this page open
  2. Ensured "Continue where you left off" is enabled.
  3. Open https://bayden.com/test/sessions/ and choose lightcyan from selector.
  4. Ensured sessionCookie says color is: lightcyan.
  5. Navigate to brave://settings/help and apply update via "Relaunch" button, browser should restart automatically.
  6. Expect the session is restored and the website is still opened.
  7. Navigate to brave://version tab and confirm BraveCleanupSessionCookiesOnSessionRestore:Disabled shows on brave://version
  8. Navigate to test page and refresh the page (Ctrl/Cmd+R).
  9. Confirm sessionCookie is still lightcyan.
Step 1 Step 2 Step 4 Step 5 Step 7 Step 9
1 2 4 5 7 9
MadhaviSeelam commented 1 year ago

Followed STR from https://github.com/brave/brave-browser/issues/29135#issue-1629322750 and couldn't reproduce in Win 11 x64

cc: @LaurenWags @goodov

https://user-images.githubusercontent.com/98358127/225956056-99ff48c2-00b9-456e-bfe1-779c19369072.mp4

goodov commented 1 year ago

Followed STR from #29135 (comment) and couldn't reproduce in Win 11 x64

cc: @LaurenWags @goodov

yes, thank you! That's expected. We have this issue only on MacOS because of the broken manual update process.

btlechowski commented 1 year ago

Unable to reproduce on Linux

Brave 1.50.93 Chromium: 111.0.5563.64 (Official Build) beta (64-bit)
Revision c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}
OS Ubuntu 18.04 LTS

image

kjozwiak commented 1 year ago

@goodov I did the following:

  1. Launched 1.50.86 as follows /Applications/Brave\ Browser\ Beta.app/Contents/MacOS/Brave\ Browser\ Beta --args --enable-logging=stderr --variations-server-url=https://variations.bravesoftware.com/seed - confirm version on brave://version, leave this page open
  2. Ensured "Continue where you left off" is enabled.
  3. Open https://bayden.com/test/sessions/ and choose lightcyan from selector.
  4. Ensured sessionCookie says color is: lightcyan.
  5. Navigate to brave://settings/help and apply update via "Relaunch" button, browser should restart automatically.
  6. Expect the session is restored and the website is still opened.
  7. Navigate to brave://version tab and confirm BraveCleanupSessionCookiesOnSessionRestore:Disabled shows on brave://version
  8. Navigate to test page and refresh the page (Ctrl/Cmd+R).
  9. Confirm sessionCookie is still lightcyan.

Verified the changes via Griffin using the template from above as per https://github.com/brave/brave-variations/pull/557#issuecomment-1486160746 before merging the change into production using https://github.com/brave/brave-variations/pull/558.

rtritto commented 6 months ago

Any update? After restarting Brave (v1.65.132), cookies are empty.