hound icon indicating copy to clipboard operation
hound copied to clipboard

set_cookie with PhantomJS 2.1.*

Open dyerc opened this issue 8 years ago • 1 comments

I have just upgraded from PhantomJS 2.0.0 to 2.1.1 and tests which were successfully passing are now failing with the following error. Supposing I set a cookie as follows:

set_cookie(%{name: "auth_token", value: token})

The test fails with:

** (RuntimeError) Can only set Cookies for the current domain
     stacktrace:
       (hound) lib/hound/request_utils.ex:57: Hound.RequestUtils.handle_response/3

I have upgraded to the current master branch of Hound, but the issue persists.

dyerc avatar Sep 20 '16 11:09 dyerc

I ran into this recently, seems to be a bug in the latest versions of phantomjs/ghostdriver:

  • https://github.com/ariya/phantomjs/issues/14228
  • https://github.com/detro/ghostdriver/issues/365

As you mentioned, I was able to successfully set cookies using phantomjs 2.0.0, but got the same error as you with the latest 2.1.x.

I was also able to successfully set cookies using the other drivers, chromedriver & selenium.

taylorzr avatar May 11 '17 03:05 taylorzr