Chromium DevTools Protocol - deleteCookies - not work

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Chromium DevTools Protocol - deleteCookies - not work

Postby Staxcelrom » Fri Jul 01, 2022 7:44 am

Hello,

Please tell me, should I contact https://crbug.com/ with this problem?

I'm trying to use Chromium DevTools protocol in CEF, more precisely the "Network.deleteCookies" method: https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-clearBrowserCookies
1.First I upload youtube.com and I log in on it and close the site.

2.Then I upload again youtube.com and I see that I am logged in automatically, that is, CEF has sent authorization cookies.

3.Now I'm uploading again youtube.com BUT now I want to delete cookies using DevTools protocol, for this before Chromium sends the first request to youtube.com - I'm calling DevTools method "Network.getCookies".

I get all the cookie data that is stored in the cookie CEF cache for youtube.com:

{"id":2,"result":{"cookies":[{"name":"PREF","value":"tz=Europe","domain":".youtube.com","path":"/","expires":1719741070,"size":20,"httpOnly":false,"secure":true,"session":false,"priority":"Medium","sameParty":false,"sourceScheme":"Secure","sourcePort":443},{"name":"LOGIN_INFO","value":"AFmmF2swRAIgTY1tPLRb600i03Y7BZKJqoX...


I won't copy the entire json message- it's just that it's big. But, I have filtered out all the cookie names:
Code: Select all
PREF
LOGIN_INFO
__Secure-3PSIDCC
__Secure-3PAPISID
__Secure-3PSID
VISITOR_INFO1_LIVE
YSC


Next I call DevTools method "Network.deleteCookies" for each cookie name:
The resulting Json code of the "Network.deleteCookies" method call is as follows:

{"id":3,"method":"Network.deleteCookies","params":{"name":"PREF","domain":".youtube.com","path":"/"}}
{"id":4,"method":"Network.deleteCookies","params":{"name":"LOGIN_INFO","domain":".youtube.com","path":"/"}}
{"id":5,"method":"Network.deleteCookies","params":{"name":"__Secure-3PSIDCC","domain":".youtube.com","path":"/"}}
{"id":6,"method":"Network.deleteCookies","params":{"name":"__Secure-3PAPISID","domain":".youtube.com","path":"/"}}
{"id":7,"method":"Network.deleteCookies","params":{"name":"__Secure-3PSID","domain":".youtube.com","path":"/"}}
{"id":8,"method":"Network.deleteCookies","params":{"name":"VISITOR_INFO1_LIVE","domain":".youtube.com","path":"/"}}
{"id":9,"method":"Network.deleteCookies","params":{"name":"YSC","domain":".youtube.com","path":"/"}}


4.Next, a message comes from DevTools for each call to "Network.deleteCookies":

OnDevToolsMessage:{"id":3,"result":{}}



That is, the method completed successfully without errors.

HOWEVER, the cookies have not been deleted, and CEF/Chromium sends these cookies to the server.

What's wrong? DevTools "Network.deleteCookies" method - doesn't work ?

PS: "Network.getCookies" returns a domain name: .youtube.com , however, I manually changed and tried and such: youtube.com, http://www.youtube.com, http://youtube.com, http://.youtube.com, http://www.youtube.com, https://youtube.com, https://.youtube.com, https://www.youtube.com - nothing works. Cookies are not deleted.


Is this a Chromium bug?
Staxcelrom
Expert
 
Posts: 206
Joined: Wed Jan 26, 2022 8:20 am

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 29 guests