{"action":"created","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/3886","repository_url":"https://api.github.com/repos/SeleniumHQ/selenium","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/3886/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/3886/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/3886/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/3886","id":223700392,"number":3886,"title":"Not able to set cookie using browser.setCookie API for safari web driver but it works for chrome","user":{"login":"karanbajaj2209","id":14230638,"avatar_url":"https://avatars3.githubusercontent.com/u/14230638?v=3","gravatar_id":"","url":"https://api.github.com/users/karanbajaj2209","html_url":"https://github.com/karanbajaj2209","followers_url":"https://api.github.com/users/karanbajaj2209/followers","following_url":"https://api.github.com/users/karanbajaj2209/following{/other_user}","gists_url":"https://api.github.com/users/karanbajaj2209/gists{/gist_id}","starred_url":"https://api.github.com/users/karanbajaj2209/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karanbajaj2209/subscriptions","organizations_url":"https://api.github.com/users/karanbajaj2209/orgs","repos_url":"https://api.github.com/users/karanbajaj2209/repos","events_url":"https://api.github.com/users/karanbajaj2209/events{/privacy}","received_events_url":"https://api.github.com/users/karanbajaj2209/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-24T04:17:41Z","updated_at":"2017-04-28T10:52:35Z","closed_at":"2017-04-24T15:07:54Z","body":" I always get this error while I'm trying to set the cookie using setCookie API for safari web driver, it works fine and does not throw any exception for chrome:\r\n\r\n[22:44:16] COMMAND\tPOST \"/wd/hub/session/76fcc0dd-eadc-4db8-9f9d-e8317ab53b25/url\"\r\n[22:44:16] DATA\t{\"url\":\"http://webdriver.io\"}\r\n[22:44:21] RESULT\tundefined\r\n[22:44:21] COMMAND\tPOST \"/wd/hub/session/76fcc0dd-eadc-4db8-9f9d-e8317ab53b25/cookie\"\r\n[22:44:21] DATA\t{\"cookie\":{\"name\":\"sessionid\",\"value\":\"test\"}}\r\n[22:44:21] COMMAND\tGET \"/wd/hub/session/76fcc0dd-eadc-4db8-9f9d-e8317ab53b25/screenshot\"\r\n[22:44:21] DATA\t{}\r\n[22:44:22] RESULT \"iVBORw0KGgoAAAANSUhEUgAACvAAAB5kCAYAAABt7ALQAAAAAXNSR0IArs4c6QAAQABJREFUeAHsfQmYHVWZ9lt36+7b3enudDp7QhKSkIQkyA4joIRFQQVkFHFFdBxccB9cZkRHUf9xYUYF+VHHYfndUHQQ3FBZFNnEyE6AEAhkXzrdSa93rf/7qurcqnu77u0l6e7 ... (8107334 more bytes)\r\n[22:44:22] Saved screenshot: ERROR_safari_2017-04-21T05-44-21.489Z.png\r\nError: An unknown server-side error occurred while processing the command.\r\nat Object.wait (/Users/Karan/git/test-framework/node_modules/fibers/future.js:449:15)\r\nat Object.setCookie (/Users/Karan/git/test-framework/node_modules/wdio-sync/build/index.js:264:31)\r\nat Object.before (/Users/Karan/git/test-framework/wdio.conf.js:168:17)\r\nat execHook (/Users/Karan/git/test-framework/node_modules/wdio-sync/build/index.js:143:35)\r\n- - - - -\r\nat cookie(\"POST\", [object Object]) - setCookie.js:17:17\r\nat setCookie([object Object]) - index.js:244:37\r\nat url(\"http://webdriver.io\") - index.js:244:37\r\nat windowHandleSize([object Object]) - setViewportSize.js:83:26\r\n\r\nCode Snippet:\r\n\r\nIn Wdio.conf.js\r\n\r\n    browser.url('http://webdriver.io')\r\n    browser.setCookie({\r\n        name: \"sessionid\",\r\n        value: \"test\",\r\n    });\r\n    \r\n    var cookies = browser.getCookie();\r\n    console.log(\"here are the cookies - \"  + cookies);\r\n    \r\n },\r\n\r\n\r\nSelenium logs:\r\n\r\n11:53:10.401 INFO - Selenium build info: version: '3.3.1', revision: '5234b32'\r\n11:53:10.401 INFO - Launching a standalone Selenium Server\r\n2017-04-21 11:53:10.417:INFO::main: Logging initialized @217ms to org.seleniumhq.jetty9.util.log.StdErrLog\r\n11:53:10.472 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:\r\nregistration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC\r\n11:53:10.473 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:\r\nregistration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC\r\n11:53:10.473 INFO - Driver class not found: com.opera.core.systems.OperaDriver\r\n11:53:10.473 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:\r\nUnable to create new instances on this machine.\r\n11:53:10.473 INFO - Driver class not found: com.opera.core.systems.OperaDriver\r\n11:53:10.473 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered\r\n2017-04-21 11:53:10.513:INFO:osjs.Server:main: jetty-9.2.20.v20161216\r\n2017-04-21 11:53:10.542:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@1bce4f0{/,null,AVAILABLE}\r\n2017-04-21 11:53:10.569:INFO:osjs.AbstractConnector:main: Started ServerConnector@3fee998{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}\r\n2017-04-21 11:53:10.570:INFO:osjs.Server:main: Started @370ms\r\n11:53:10.570 INFO - Selenium Server is up and running\r\n11:53:10.821 INFO - SessionCleaner initialized with insideBrowserTimeout 0 and clientGoneTimeout 1800000 polling every 180000\r\nSelenium started\r\n11:53:32.084 INFO - Executing: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4f98a545, browserName=safari, javascriptEnabled=true, handlesAlerts=true, maxInstances=1, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]])\r\n11:53:32.097 INFO - Creating a new session for Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4f98a545, browserName=safari, javascriptEnabled=true, handlesAlerts=true, maxInstances=1, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]\r\n11:53:33.010 INFO - Detected dialect: OSS\r\n11:53:33.024 INFO - Done: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4f98a545, browserName=safari, javascriptEnabled=true, handlesAlerts=true, maxInstances=1, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]]\r\n11:53:33.050 INFO - Executing: [get window size])\r\n11:53:33.064 INFO - Done: [get window size]\r\n11:53:33.077 INFO - Executing: [execute script: return (function getViewportSize() {\r\nreturn {\r\nscreenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),\r\nscreenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)\r\n};\r\n}).apply(null, arguments), []])\r\n11:53:33.181 INFO - Done: [execute script: return (function getViewportSize() {\r\nreturn {\r\nscreenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),\r\nscreenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)\r\n};\r\n}).apply(null, arguments), []]\r\n11:53:33.187 INFO - Executing: [set window size])\r\n11:53:33.196 INFO - Done: [set window size]\r\n11:53:33.202 INFO - Executing: [execute script: return (function getViewportSize() {\r\nreturn {\r\nscreenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),\r\nscreenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)\r\n};\r\n}).apply(null, arguments), []])\r\n11:53:33.214 INFO - Done: [execute script: return (function getViewportSize() {\r\nreturn {\r\nscreenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),\r\nscreenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)\r\n};\r\n}).apply(null, arguments), []]\r\n11:53:33.219 INFO - Executing: [get: http://webdriver.io])\r\n11:53:35.533 INFO - Done: [get: http://webdriver.io]\r\n11:53:35.544 INFO - Executing: [add cookie: sessionid=test; path=/])\r\n11:53:35.559 WARN - Exception thrown\r\norg.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)\r\nCommand duration or timeout: 7 milliseconds\r\nBuild info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'\r\nDriver info: org.openqa.selenium.safari.SafariDriver\r\nCapabilities [{applicationCacheEnabled=true, rotatable=false, databaseEnabled=true, handlesAlerts=true, version=12602.4.8, cleanSession=true, platform=MAC, nativeEvents=true, locationContextEnabled=false, webStorageEnabled=true, browserName=safari, javascriptEnabled=true, cssSelectorsEnabled=true}]\r\nSession ID: 636692AC-458B-4F5D-83E8-0802D08D1E6B\r\nat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\nat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\nat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\nat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\r\nat org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)\r\nat org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)\r\nat org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)\r\nat org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions.addCookie(RemoteWebDriver.java:731)\r\nat org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringOptions.addCookie(EventFiringWebDriver.java:514)\r\nat org.openqa.selenium.remote.server.handler.AddCookie.call(AddCookie.java:43)\r\nat org.openqa.selenium.remote.server.handler.AddCookie.call(AddCookie.java:31)\r\nat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\nat org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)\r\nat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\nat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\nat java.lang.Thread.run(Thread.java:748)\r\n11:53:35.561 WARN - Exception: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)\r\nCommand duration or timeout: 7 milliseconds"},"comment":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/comments/297968778","html_url":"https://github.com/SeleniumHQ/selenium/issues/3886#issuecomment-297968778","issue_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/3886","id":297968778,"user":{"login":"lmtierney","id":4405962,"avatar_url":"https://avatars2.githubusercontent.com/u/4405962?v=3","gravatar_id":"","url":"https://api.github.com/users/lmtierney","html_url":"https://github.com/lmtierney","followers_url":"https://api.github.com/users/lmtierney/followers","following_url":"https://api.github.com/users/lmtierney/following{/other_user}","gists_url":"https://api.github.com/users/lmtierney/gists{/gist_id}","starred_url":"https://api.github.com/users/lmtierney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmtierney/subscriptions","organizations_url":"https://api.github.com/users/lmtierney/orgs","repos_url":"https://api.github.com/users/lmtierney/repos","events_url":"https://api.github.com/users/lmtierney/events{/privacy}","received_events_url":"https://api.github.com/users/lmtierney/received_events","type":"User","site_admin":false},"created_at":"2017-04-28T10:52:35Z","updated_at":"2017-04-28T10:52:35Z","body":"We cannot see the bugs either and Apple will not let us know when it's fixed"}}
{"actor":{"display_login":"lmtierney"}}