angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

Errors waiting for protractor to sync on IE #1919

Closed InnoviseJB closed 9 years ago

InnoviseJB commented 9 years ago

Hi, I have recently been experiencing errors with IE browser testing and wondered if anyone could shed some light on the problem? Originally our set of protractor tests were passing on Chrome36,37,38 , Firefox31,32,33 and IE9,10,11 and now we are getting many errors relating to IE browsers. IE9 and IE11 both run through some tests successfully and then at a random point will throw the following error:

[IE 9 #7] Failures: [IE 9 #7] [IE 9 #7] 1) flowCanvasControllerTests.spec readonly mode should not allow items to be moved [IE 9 #7] Message: [IE 9 #7] ←[31mTypeError: Cannot read property '0' of undefined←[0m

From then onwards it seems that every test fails with the following error:

[IE 9 #7] 2) flowCanvasControllerTests.spec readonly mode should not allow items to be moved [IE 9 #7] Message: [IE 9 #7] ←[31mError: Error while waiting for Protractor to sync with the page: "Unable to get value of the property 'get': object is null or undefined"←[0m

We have tried running our tests with browserstack and saucelabs, both get the same errors leading me to think this is a protractor issue. If anyone has any ideas what causes this and how to fix it please do say, Thanks.

juliemr commented 9 years ago

Can you give some more information - is there a stack trace for the Cannot read property '0' error? Can you share the code for the test this occurs on?

InnoviseJB commented 9 years ago

Hi Julie, the code it happens on tends to be a random test that will sometimes pass and sometimes fail. The main error we are now seeing is in builds for ie10 and ie11 , for some reason ie9 isn’t running at all , even though it’s configured to!

The error is “Error while waiting for protractor to sync with the page”

10) flowCanvasControllerTests.spec close should close previous workspaces when cross clicked [IE 10 #8] Message: [IE 10 #8] ←[31mError: Error while waiting for Protractor to sync with the page: "[ng:test] http://errors.angularjs.org/1.3.14/ng/test"←[0m [IE 10 #8] Stacktrace: [IE 10 #8] Error: Error while waiting for Protractor to sync with the page: "[ng:test] http://errors.angularjs.org/1.3.14/ng/test" [IE 10 #8] at Error () [IE 10 #8] at C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1526:15 [IE 10 #8] at newFrame.onAbort (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\webdriver\promise.js:1679:7) [IE 10 #8] at [object Object].webdriver.promise.Frame.notify_ (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1914:5) [IE 10 #8] at [object Object]._onTimeout (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1887:13) [IE 10 #8] ==== async task ==== [IE 10 #8] Protractor.waitForAngular() [IE 10 #8] at [object Object].webdriver.WebDriver.schedule (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\webdriver\webdriver.js:345:15) [IE 10 #8] at [object Object].Protractor.executeAsyncScript (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\lib\protractor.js:251:26) [IE 10 #8] at [object Object].Protractor.waitForAngular (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\lib\protractor.js:274:15) [IE 10 #8] at Object.loginForTests (C:\Builds\3\Cortex\Cortex Web Protractor\src\Unit Tests\Source\Innovise.Cortex.Web.UnitTests\Scripts\app\commonTest.js:14:13) [IE 10 #8] at [object Object]. (C:\Builds\3\Cortex\Cortex Web Protractor\src\Unit Tests\Source\Innovise.Cortex.Web.UnitTests\Scripts\app\modules\Flows\controllers\flowCanvasControllerTests.spec.js:7:16) [IE 10 #8] at C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\jasminewd\index.js:94:14 [IE 10 #8] at [object Object].webdriver.promise.ControlFlow.runInNewFrame (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\selenium-webdriver\lib\webdriver\promise.js:1654:20) [IE 10 #8] at [object Object].webdriver.promise.ControlFlow.runEventLoop (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1518:8) [IE 10 #8] ==== async task ==== [IE 10 #8] Asynchronous test function: beforeEach() [IE 10 #8] at [object Object]. (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd\index.js:93:33) [IE 10 #8] at [object Object]. (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\async-callback.js:45:37) [IE 10 #8] at [object Object].jasmine.Block.execute (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\minijasminenode\lib\jasmine-1.3.1.js:1174:17) [IE 10 #8] at [object Object].jasmine.Queue.next (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2209:31) [IE 10 #8] at [object Object].jasmine.Queue.start (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2162:8) [IE 10 #8] at [object Object].jasmine.Spec.execute (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\minijasminenode\lib\jasmine-1.3.1.js:2503:14) [IE 10 #8] at [object Object].jasmine.Queue.next (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2209:31) [IE 10 #8] at onComplete (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2205:18) [IE 10 #8] at [object Object].jasmine.Spec.finish (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\nodemodules\minijasminenode\lib\jasmine-1.3.1.js:2477:5)==== async task ==== [IE 10 #8] Error [IE 10 #8] at [object Object]. (C:\Builds\3\Cortex\Cortex Web Protractor\src\Unit Tests\Source\Innovise.Cortex.Web.UnitTests\Scripts\app\modules\Flows\controllers\flowCanvasControllerTests.spec.js:5:5) [IE 10 #8] at [object Object].jasmine.Env.describe (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:913:21) [IE 10 #8] at [object Object].jasmine.Env.describe (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:898:15) [IE 10 #8] at describe (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:658:27) [IE 10 #8] at Object. (C:\Builds\3\Cortex\Cortex Web Protractor\src\Unit Tests\Source\Innovise.Cortex.Web.UnitTests\Scripts\app\modules\Flows\controllers\flowCanvasControllerTests.spec.js:3:1)

To try to resolve this error we have specified a rootElement as being ‘#cortex-app’, this was originally set to ‘body > div’ with similar errors occuring

This is a representation of our html.

Hope this helps, if you need any more info just ask ☺ , Thanks.

juliemr commented 9 years ago

So, to be clear, the issue is NOT always 'cannot read property 0 of undefined'?

InnoviseJB commented 9 years ago

Not always, its since changed to "Error while waiting for protractor to sync with the page"

juliemr commented 9 years ago

Can you make a small, reproducible test case that you can share?

juliemr commented 9 years ago

Haven't heard any updates in a while, so I'm closing this issue as stale. Please open a new issue if you think there is a remaining general problem.