brave / brave-browser

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

Cookies are not being updated in Devtools when using `document.cookie` #39487

Open ghost opened 2 months ago

ghost commented 2 months ago

Description

I noticed that recently in Brave cookies are not updating in Devtools even if you click the refresh button. You have to click another place or domain in Devtools > Application > Cookies or whatever and then click back on the domain where you are placing/updating the cookies to see the changes.

Not even when using console document.cookie="Name=Value" works, and using a website like https://www.w3schools.com/js/js_cookies.asp to test it also has the same behavior where you can only see the changes if you click somewhere else and back to the domain or refresh the page.

In the video I am posting, you can see the cookies don't even get properly deleted, because if you set a cookie but it is not displayed in the cookie list, it will delete only the cookies listed not the new one and then when hitting delete, it will show the new cookie.

have a good day.

Steps to reproduce

  1. Go to any page and Open Devtools -> Application -> Cookies
  2. open console and type document.cookie="Name=Value"
  3. you will not see the cookies being set even if you click refresh.

Actual result

https://github.com/brave/brave-browser/assets/156715894/1dd13b41-5ae8-491d-9f44-af8b51749ba6

Expected result

Update when cookies are set.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.69.66 Chromium: 127.0.6533.26 (Official Build) nightly (64-bit) Windows 11 Version 23H2 (Build 22631.3810)

Channel information

Reproducibility

Miscellaneous information

No response

goodov commented 2 months ago

I'm seeing the same issue in Chromium, so it doesn't look Brave-specific. Chromium bug to track this issue: https://issues.chromium.org/issues/348683488