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

Failed to set the 'cookie' property on 'Document': Cookies are disabled inside 'data:' URLs. #728

Open
GoogleCodeExporter opened this issue Apr 15, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

What steps will reproduce the problem?
1. Using Latest ChromeDriver2.exe on Windows 7 with Chrome Version 
33.0.1750.146 

2. Launch Chrome with WebDriver and New Window opens with data:, in the URL
3.Then chrome crashes and tests fail


What version of the product are you using? On what operating system?
Windows 7
chromedriver=2.9.248315
Selenium version= 2.40.0
Chrome Version 33.0.1750.146 

The failure stacktrace, if available.

1) 
UserCanViewYPHeaderIfCustomerIsNotLoggedIn::testYPHeaderIfCustomerIsNotLoggedIn
PHPUnit_Extensions_Selenium2TestCase_WebDriverException: <unknown>: Failed to 
set the 'cookie' property on 'Document': Cookies are disabled inside 'data:' 
URLs.
  (Session info: chrome=33.0.1750.146)
  (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 42 milliseconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'MNL-PCS-13-226', ip: '172.16.13.9', os.name: 'Windows 7', 
os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45'
Session ID: dbd3382ba55a30b6a8cc90d518f9d6b0
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=C:\Users\RADEGU~1\AppData\Local\Temp\scoped_dir3660_14389}, 
rotatable=false, locationContextEnabled=true, version=33.0.1750.146, 
takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, 
handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, 
webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]


Original issue reported on code.google.com by daqpin...@gmail.com on 6 Mar 2014 at 11:45

@GoogleCodeExporter
Copy link
Contributor Author

We're experiencing the same issue - I'm running tests against an in-house hub 
and node.

What version of the product are you using? On what operating system?
Windows 7
chromedriver=2.9.248315
Selenium version= 2.40.0
Chrome Version 33.0.1750.146 



12:57:55,897 DEBUG MemberWebLogin:124 [pool-1-thread-1] - Setting 
JSESSIONID=3370848C4C28EEBC94F405AFE69831FA; path=/ cookie via 
WebDriver.manage()

org.openqa.selenium.WebDriverException: <unknown>: Failed to set the 'cookie' 
property on 'Document': Cookies are disabled inside 'data:' URLs.
  (Session info: chrome=33.0.1750.146)
  (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 5 milliseconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'csamuelsen2', ip: '172.17.90.61', os.name: 'Windows 7', 
os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Session ID: 5b83b7a43691eeaff27abee019a49c18
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=C:\Users\CHRIS~1.SAM\AppData\Local\Temp\scoped_dir10820_1196
3}, rotatable=false, locationContextEnabled=true, version=33.0.1750.146, 
takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, 
handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, 
webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]
Command duration or timeout: 26 milliseconds

Original comment by pola...@gmail.com on 10 Mar 2014 at 7:10

@GoogleCodeExporter
Copy link
Contributor Author

UPDATE: It looks like resetting some of the internet connection settings 
flipped the "proxy" switch on -- so none of the browsers could hit the target 
URL.

After double-checking the internet options configurations, things look ok on my 
end here. I hope that helps.

Original comment by pola...@gmail.com on 10 Mar 2014 at 7:47

@GoogleCodeExporter
Copy link
Contributor Author

Update: We tried to isolate the issues, and check all possible scenarios on our 
test. We figure out that the issue occurs when we put COVERAGE LOGS as one of 
our reports logs. If we uncomment the COVERAGE code lines our test run smoothly 
on Chrome Browser. But the problem now, we need the COVERAGE LOGS on our test. 
Please Help.. Thanks!

Original comment by daqpin...@gmail.com on 10 Mar 2014 at 10:52

@GoogleCodeExporter
Copy link
Contributor Author

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

  • Changed state: Unconfirmed

@GoogleCodeExporter
Copy link
Contributor Author

if this issue is still reproducible with latest version of 
ChromeDriver:- 2.14
Chrome:- 41.0.2272.76
Selenium:- 2.45

please attach a sample test case along with html file if applicable to 
reproduce the issue.

Thanks for filing the bug.

Original comment by agau...@chromium.org on 27 Mar 2015 at 9:41

  • Added labels: Needs-Feedback

@burzum
Copy link

burzum commented Sep 20, 2016

I can confirm that this is a problem and that it can be resolved by not using any logger. We're using phpunit and commenting the logger made the error go away. But this can't be considered a proper solution to the problem.

<logging>
    <!--<log type="coverage-html" target="./tmp/tests/report" lowUpperBound="35" highLowerBound="70"/>-->
    <!--<log type="coverage-clover" target="./tmp/tests/coverage.xml"/>-->
</logging>

@yangjiekang
Copy link

I also encountered this problem, don't know how to solve

@LockGit
Copy link

LockGit commented May 1, 2017

driver = self.driver
driver.add_cookie({'name' : 'skey','value' : 'xxxxx','path':'/'})
driver.add_cookie({'name' : 'uin','value' : 'xxxxxx','path':'/'})

I also encountered this problem ! when execute add_cookie function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants