{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/geckodriver/issues/330","repository_url":"https://api.github.com/repos/mozilla/geckodriver","labels_url":"https://api.github.com/repos/mozilla/geckodriver/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/geckodriver/issues/330/comments","events_url":"https://api.github.com/repos/mozilla/geckodriver/issues/330/events","html_url":"https://github.com/mozilla/geckodriver/issues/330","id":188577130,"node_id":"MDU6SXNzdWUxODg1NzcxMzA=","number":330,"title":"Cannot Get Console Error Logs from Firefox","user":{"login":"JasonSmiley208","id":16724069,"node_id":"MDQ6VXNlcjE2NzI0MDY5","avatar_url":"https://avatars1.githubusercontent.com/u/16724069?v=4","gravatar_id":"","url":"https://api.github.com/users/JasonSmiley208","html_url":"https://github.com/JasonSmiley208","followers_url":"https://api.github.com/users/JasonSmiley208/followers","following_url":"https://api.github.com/users/JasonSmiley208/following{/other_user}","gists_url":"https://api.github.com/users/JasonSmiley208/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonSmiley208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonSmiley208/subscriptions","organizations_url":"https://api.github.com/users/JasonSmiley208/orgs","repos_url":"https://api.github.com/users/JasonSmiley208/repos","events_url":"https://api.github.com/users/JasonSmiley208/events{/privacy}","received_events_url":"https://api.github.com/users/JasonSmiley208/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-11-10T17:59:39Z","updated_at":"2019-02-11T14:08:32Z","closed_at":"2016-11-10T18:07:32Z","author_association":"NONE","body":"Tested using Gecko driver v0.11.1\r\nFirefox Browser version 49.0.2\r\nSelenium version 3.0.1\r\nMac OS: 10.11.6\r\n\r\nCode:\r\n\r\n```\r\n//Setup\r\nSystem.setProperty(\"webdriver.gecko.driver\", System.getProperty(\"user.dir\") + getFirefoxPathForOs());\r\n\r\n                    capabilities = DesiredCapabilities.firefox();\r\n                    capabilities.setCapability(CapabilityType.LOGGING_PREFS, loggingPrefs);   //Setup Logging\r\n                    capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\r\n                    driver = new FirefoxDriver(capabilities);\r\n\r\n//Test Code runs here\r\n\r\n//Teardown\r\n private void lookForJSErrors(Scenario scenario) {\r\n  LogEntries logEntries = driver.manage().logs().get(LogType.BROWSER); //Fails Here\r\n        List<LogEntry> severeErrors = logEntries.filter(Level.SEVERE);\r\n\r\n        if(!severeErrors.isEmpty()) {\r\n            scenario.write(\"Severe Javascript errors:\\n\");\r\n            int count = 1;\r\n\r\n            for (LogEntry entry : severeErrors) {\r\n                scenario.write(count + \") \" + entry.getTimestamp() + \" \" + entry.getLevel() + \" \" + entry.getMessage() + \"\\n\");\r\n                count++;\r\n            }\r\n        }\r\n  }\r\n```\r\n\r\n------\r\n\r\nStack trace:\r\n\r\n> org.openqa.selenium.UnsupportedCommandException: POST /session/01a58591-d09f-584d-b004-b3bd19d66cd2/log did not match a known command\r\n> Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'\r\n> System info: host: 'MacBook-Pro-7.local', ip: '10.0.21.70', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_60'\r\n> Driver info: org.openqa.selenium.firefox.FirefoxDriver\r\n> Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, firefoxOptions={args=[], profile=UEsDBBQACAgIACJnakkAAAAAAAAAAAAAAAAHAAAAdXNlci5qc51Wy27bOhDd368ovGqBmsirt0W7StMUKFA0FzWCLgmKHEmMKZLlw4r//g71iF1bppKuYioz5MyZM2cmenDUOihfLwpnWjwRz0rofktdkYapljkgoFmhQCzeviqZ8vDm0z9x5ylYQBtrXEguNTAV6v5M0Ggj+Yy/htAatyZ1CJbYWvp6u0z/tsz7pQJdhRodL969+9NtDNgBE/hHQAAeQHyVzodrjIUrQLfg4mG4psG8HimvnWmAeu6kDdRFTYNsksvl2fRDgRWe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AAAAAAAAAAAAdXNlci5qc1BLBQYAAAAAAQABADUAAADyAwAAAAA=}, loggingPrefs={browser=ALL}, appBuildId=20161019084923, version=, platform=MAC, ensureCleanSession=true, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=15889, browserVersion=49.0.2, platformVersion=15.6.0, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=darwin, device=desktop}]\r\n> Session ID: 01a58591-d09f-584d-b004-b3bd19d66cd2\r\n> \tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n> \tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n> \tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n> \tat java.lang.reflect.Constructor.newInstance(Constructor.java:422)\r\n> \tat org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:127)\r\n> \tat org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:93)\r\n> \tat org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:42)\r\n> \tat org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)\r\n> \tat org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)\r\n> \tat org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)\r\n> \tat org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)\r\n> \tat org.openqa.selenium.remote.RemoteLogs.getRemoteEntries(RemoteLogs.java:81)\r\n> \tat org.openqa.selenium.remote.RemoteLogs.get(RemoteLogs.java:77)\r\n> \tat web.support.hooks.SeleniumSetupAndTeardown.lookForJSErrors(SeleniumSetupAndTeardown.java:70)\r\n> \tat web.support.hooks.SeleniumSetupAndTeardown.teardown(SeleniumSetupAndTeardown.java:55)\r\n> \tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n> \tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n> \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n> \tat java.lang.reflect.Method.invoke(Method.java:497)\r\n> \tat cucumber.runtime.Utils$1.call(Utils.java:37)\r\n> \tat cucumber.runtime.Timeout.timeout(Timeout.java:13)\r\n> \tat cucumber.runtime.Utils.invoke(Utils.java:31)\r\n> \tat cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)\r\n> \tat cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:223)\r\n> \tat cucumber.runtime.Runtime.runHooks(Runtime.java:211)\r\n> \tat cucumber.runtime.Runtime.runAfterHooks(Runtime.java:205)\r\n> \tat cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)\r\n> \tat cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)\r\n> \tat cucumber.runtime.Runtime.run(Runtime.java:121)\r\n> \tat cucumber.api.cli.Main.run(Main.java:36)\r\n> \tat cucumber.api.cli.Main.main(Main.java:18)"},"comment":{"url":"https://api.github.com/repos/mozilla/geckodriver/issues/comments/462339723","html_url":"https://github.com/mozilla/geckodriver/issues/330#issuecomment-462339723","issue_url":"https://api.github.com/repos/mozilla/geckodriver/issues/330","id":462339723,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MjMzOTcyMw==","user":{"login":"whimboo","id":129603,"node_id":"MDQ6VXNlcjEyOTYwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/129603?v=4","gravatar_id":"","url":"https://api.github.com/users/whimboo","html_url":"https://github.com/whimboo","followers_url":"https://api.github.com/users/whimboo/followers","following_url":"https://api.github.com/users/whimboo/following{/other_user}","gists_url":"https://api.github.com/users/whimboo/gists{/gist_id}","starred_url":"https://api.github.com/users/whimboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whimboo/subscriptions","organizations_url":"https://api.github.com/users/whimboo/orgs","repos_url":"https://api.github.com/users/whimboo/repos","events_url":"https://api.github.com/users/whimboo/events{/privacy}","received_events_url":"https://api.github.com/users/whimboo/received_events","type":"User","site_admin":false},"created_at":"2019-02-11T14:08:32Z","updated_at":"2019-02-11T14:08:32Z","author_association":"COLLABORATOR","body":"Starting with Firefox 65 you are able to at least route any logging through the Console API to the geckodriver log. Here the entry from our geckodriver 0.24.0 release notes:\r\n\r\n> When using the preference devtools.console.stdout.content set to\r\ntrue logging of console API calls like info(), warn(), and\r\nerror() can be routed to stdout."}}
{"actor":{"display_login":"whimboo"}}