Codeception: [Facebook\WebDriver\Exception\UnableToSetCookieException] unable to set cookie

What are you trying to achieve?

Running codecept.phar run after upgrading from v3 ⇉ v4

What do you get instead?

[Facebook\WebDriver\Exception\UnableToSetCookieException] unable to set cookie

Details

  • Codeception version: 4.1.2
  • PHP Version: 7.4
  • Operating System: Ubuntu 18.04
  • Installation type: Phar

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (14 by maintainers)

Most upvoted comments

My claim that facebook/webdriver worked and php-webdriver/webdriver didn’t was incorrect. It was an accident that setCookie doesn’t work with 1.6.0 too. It works with 1.7.0 and 1.7.1, but not with 1.8.0+.

Chrome stopped working when workaround to disable w3c mode was removed - https://github.com/php-webdriver/php-webdriver/commit/3597a6bcaddb2a462d71cf81620346892991ad47 Firefox doesn’t work for me with any version.

@voku @laoneo this is a browser issue, you can find more information in the linked php-webdriver ticket. Possible workarounds: a) set version constraint to "php-webdriver/webdriver": "1.7.1" in your composer.json file b) use multi-component domain names, e.g. xxx.localhost instead of localhost.