I am currently having an issue trying to run Protractor tests on my Angular2 site when using GeckoDriver.
I am using Selenium Standalone Server to run my tests and they work in Chrome and IE11 but when I try to run with Firefox I get the following error:
Failed: Error while running testForAngular: Error: Permission denied to access property "invoke"
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MyPC', ip: '128.87.191.161', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\Me\AppData\Local\Temp\rust_mozprofile.UbDrIDtk4eEX, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0, platformVersion=6.1, moz:processID=12820, browserName=firefox, platformName=windows_nt}]
Session ID: 6ddf7356-5306-4db6-b6c2-2898406c3193
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MyPC', ip: '128.87.191.161', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\Me\AppData\Local\Temp\rust_mozprofile.UbDrIDtk4eEX, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0, platformVersion=6.1, moz:processID=12820, browserName=firefox, platformName=windows_nt}]
Session ID: 6ddf7356-5306-4db6-b6c2-2898406c3193
at AbstractExtendedWebDriver.get.timeout.driver.controlFlow.execute.then.then.then.then.then.then.executeAsyncScript_.then (c:\Projects\Project\ProtractorTests\node_modules\protractor\lib\browser.ts:944:27)
at ManagedPromise.invokeCallback_ (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:1366:14)
at TaskQueue.execute_ (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at events.EventEmitter.events.EventEmitter.events.EventEmitter.scheduleCallbacks.asyncRun (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:2813:27)
at c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\promise.js:676:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: Run beforeEach in control flow
From asynchronous test:
Error
at Suite.<anonymous> (C:\Projects\Project\ProtractorTests\specs\login-spec.ts:10:5)
at Object.<anonymous> (C:\Projects\Project\ProtractorTests\specs\login-spec.ts:8:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Array.forEach (native)
If I try to run the Firefox tests using directConnet I get another error:
[09:37:35] E/launcher - Unable to parse new session response: {"value": {"sessionId":"b00ee8b7-434e-48e6-83a6-3bca08caba31","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"52.0","moz:accessibilityChecks":false,"moz:processID":15632,"moz:profile":"C:\\Users\\Me\\AppData\\Local\\Temp\\rust_mozprofile.XS9ezQUYQ7um","pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"page load":300000,"script":30000}}}}
[09:37:35] E/launcher - WebDriverError: Unable to parse new session response: {"value": {"sessionId":"b00ee8b7-434e-48e6-83a6-3bca08caba31","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"52.0","moz:accessibilityChecks":false,"moz:processID":15632,"moz:profile":"C:\\Users\\Me\\AppData\\Local\\Temp\\rust_mozprofile.XS9ezQUYQ7um","pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"page load":300000,"script":30000}}}}
at __dirname.execute.request.then.doSend.then.response (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\http.js:445:19)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (c:\Projects\Project\ProtractorTests\node_modules\selenium-webdriver\firefox\index.js:640:55)
at Direct.getNewDriver (c:\Projects\Project\ProtractorTests\node_modules\protractor\built\driverProviders\direct.js:95:33)
at Runner.createBrowser (c:\Projects\Project\ProtractorTests\node_modules\protractor\built\runner.js:194:43)
at events_1.EventEmitter.run.q.then.then (c:\Projects\Project\ProtractorTests\node_modules\protractor\built\runner.js:338:29)
at _fulfilled (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:834:54)
at Promise.then.Q.nextTick.self.promiseDispatch.done (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:863:30)
at Promise.__dirname.Promise.promise.promiseDispatch (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:796:13)
at c:\Projects\Project\ProtractorTests\node_modules\q\q.js:556:49
at runSingle (c:\Projects\Project\ProtractorTests\node_modules\q\q.js:137:13)
[09:37:35] E/launcher - Process exited with error code 199
Not sure where to go from here!
Versions
The Permission denied to access property "invoke"
is a known issue in Zone.js, specific to Zone.js and Firefox running with WebDriver. It was fixed in the 0.8.7 release. The issue involves how Zone.js patches the browser, and the only fix is to upgrade.
The Unable to parse new session response
is also a known issue with Firefox 52 and directConnect: true
. Unfortunately, the only solution is to use Selenium Standalone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With