-
Notifications
You must be signed in to change notification settings - Fork 408
Protractor tests on Firefox fail for Angular apps using Zone.JS > 0.7.2 #616
Comments
Could you provide a sample repo? |
remove Firefox because of this issue angular/zone.js#616
* chore(protractor): fix browser support * chore(protractor): fix * chore(protractor): fix remove Firefox because of this issue angular/zone.js#616 * chore(protractor): fix * chore(protractor): fix
I have the same issues. Check angular-lab repo. |
I have the same issue running Selenium tests on zone.js 0.7.7, FF 51.0.1 and Selenium WebDriver 3.0.1. Same error as reported above |
@rolandjitsu @johnstaveley , can you tell me how to reproduce the issue? I use the angular-lab repo, but I don't know how to configure the protractor to run with Firefox 51. |
@JiaLiPassion just use |
@rolandjitsu , I have tried to add a capabilities {browserName: 'firefox'}, it is not working, the protractor complains can't download firefoxdriver, it seems that webdriver doesnot support firefox 50 |
As far as I know, Firefox is supported, it just seems to be an issue with selenium, see angular/protractor#886 (comment) |
I'm not using protractor, I'm just running web tests using C# on zone.js 0.7.7, FF 51.0.1 and Selenium WebDriver 3.0.1 but it is the same issue. There is a dynamic component built using Angular 2 it fails to find (the first it tries to find). It fails with the error message above on: _wait.Until(ExpectedConditions.ElementIsVisible(by)); where by is find the element by id |
This is still an issue in 0.8.5. It seems the problem was introduced in 0fd8c03. Geckodriver will throw an error on any page with Zones patched in if setTimeout is called in an async script (which is how Protractor tests for Angular). This is only a problem in Firefox 50+ (Firefox 47 seems ok). This demonstrates the problem: let webdriver = require('selenium-webdriver');
let capabilities = webdriver.Capabilities.firefox();
driver = new webdriver.Builder().usingServer('http://localhost:4444/wd/hub').withCapabilities(capabilities).build();
driver.get("http://material.angular.io");
driver.executeAsyncScript((cb) => { window.setTimeout(cb,1000) }); I'm guessing the issue is that the patched setTimeout can't call |
@mgiambalvo , thank you for the information, I will try to research more, but I am still stuck at the environment, my selenium can't work with firefox 50+. |
The easiest way to do that would be to use webdriver-manager. It'll be available in any project with Protractor (or anything created with angular-cli), but you can also just install it directly.
That should start a selenium server listening on port :4444 - you should then be able to run the script I posted. I also put together a repo with everything set up https://github.com/mgiambalvo/firefox-zonejs-issue-demo |
@mgiambalvo , thank you, I will try your repository to reproduce the issue. |
@mgiambalvo , still not working, what firefox version are you using? I tried firefox 50, 51, 52 on mac os 10.12.3, all report org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. |
@mgiambalvo , I think I know how to fix it, I will make a PR to fix it. |
…row permission denied error
When can I expect the next release to fetch this fix? |
@mhevery please reopen the issue as it is not fixed yet. |
@AlexandrosD, could you post your repo, I tested with @mgiambalvo 's sample, so I would like to research with your repo. thank you. |
@JiaLiPassion please try with the most widely-used angular seed: https://github.com/mgechev/angular-seed Run protractor with latest webdriver (v3.3.1), gekcodriver (v0.15.0), and firefox (v51+). Just reproduced this one:
|
@AlexandrosD , the reason is in master branch of zone.js, And after the 0.8.6 is released, everything should work. |
@JiaLiPassion Hm.. indeed - you are right. After building the dist folder locally and copying its contents in the respective directory of our repo the tests run. |
@AlexandrosD , I don't know when it will be released, but I believe it will be soon, because several high priority issues have been merged. |
I am facing the same issue. Failed: Error while running testForAngular: Error: Permission denied to access property "invoke
|
@mythrimanjunath , this has been fixed in 0.8.6, so please update to the newest version. |
@JiaLiPassion I upgraded to "zone.js": "0.8.6" . I get the same error. |
@mythrimanjunath , could you post the full stack trace? It should not throw error in 0.8.6 |
@JiaLiPassion Okay sure. Here is the stack trace. Let me know if anything else is required thank you .
|
@mythrimanjunath , the stack trace is protractor side.... could you post your reproduce repository? |
@JiaLiPassion Sorry. I do not have permission to share the repository. Thank you! |
@mythrimanjunath , sure, maybe you can confirm that you upgrade zone.js to 0.8.6 or higher version correctly by print some information by modifying node_modules/zone.s/dist/zone.js, the |
@JiaLiPassion Okay sure. I will do that and Thank you so much for a quick response. |
All protractor tests are failing on Firefox 50+, using Angular v2.4.4, zone.js v0.7.6, Geckodriver 0.13.0, protractor 4.0.13.
The error is the following:
Permission denied to access property "invoke"
This seems similar to angular/protractor#2784 and can be solved only by downgrading Zone.js to v0.7.2.
The text was updated successfully, but these errors were encountered: