New issue
Advanced search Search tips

Issue 2002 link

Starred by 13 users

Issue metadata

Status: Available
Owner: ----

Sign in to add a comment

Add Cookie is not spec compliant

Project Member Reported by, Sep 8 2017

Issue description


The implementation differs in at least the error code we return for trying to get the cookie object from parameters.
Project Member

Comment 2 by, Sep 19 2017

Labels: ChromeDriver-2.33
Status: Fixed (was: Available)
Project Member

Comment 3 by, Sep 19 2017

Status: Unconfirmed (was: Fixed)
We need to re-audit the add cookie command and check that it is spec compliant everywhere else. After that we can update this doc:
Project Member

Comment 4 by, Sep 22 2017

The following revision refers to this bug:

commit 3371c2f42e356fb19f6004e6ef770e4dba6c3575
Author: Gauri Manikpure <>
Date: Fri Sep 22 23:22:17 2017

[Chromedriver] Return InvalidArgument error if required keys are missing in cookie data.

Bug: chromedriver:2002
Change-Id: Ie2d51fdba57e7a0e0dd7eb44be1529b6cd43d2c8
Reviewed-by: Shuotao Gao <>
Commit-Queue: Gauri Manikpure <>
Cr-Commit-Position: refs/heads/master@{#503900}

Project Member

Comment 5 by, Oct 9 2017


Comment 6 by, Oct 30 2017

whatever you did in v2.33.. it broke addCookie() and deleteAllCookies()

Comment 7 by, Oct 30 2017

Correction: deleteAllCookies() still works.

Project Member

Comment 8 by, Oct 30 2017 Could you please provide your code to repro the failure, and/or verbose log from ChromeDriver? v2.33 has passed all our addCookie test cases, and there isn't much we can do unless you provide some more details. Thanks.

Comment 9 by, Oct 30 2017

Here's the verbose log and code snippet (pages and domains renamed):

driver.get(this.baseUrl + "/publicpage.html");
Cookie seleniumCookie = new Cookie("token", "value","", "/", null, false, true);
driver.get(baseUrl + "/privatepage.html");
226 KB View Download

Comment 10 by, Oct 30 2017 details provided

Comment 11 by, Oct 31 2017

Also, this used to work fine before upgrading.

When switching to htmlunit it starts working again.
I am running into the same issue.  No error. No cookie added.

Cookie apiCookie = new Cookie.Builder("MyCookie", "CookieValue")

Comment 13 by, Nov 15 2017 did you manage to reporoduce this issue?

Comment 14 Deleted

Comment 15 by, Dec 22 2017

Any chance of getting this sorted in chromedriver 2.35? (been waiting for the headless ignore cert fix, but can't use it with this regression) 
For current ChromeDriver implementation (ChromeDriver v2.33 (2017-10-03)), domain property is interpreted incorrectly. "" WILL NOT be treated in the same way as "", as "The prepending dot is optional in recent standards, but can be added for compatibility with RFC 2109 based implementations"
( states.

Would greatly appreciate a fix.
Project Member

Comment 17 by, Jul 26

Owner: ----
Status: Untriaged (was: Unconfirmed)
Project Member

Comment 18 by, Jul 31

Labels: StandardsCompliance Pri-2
Status: Available (was: Untriaged)

Sign in to add a comment