Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

both angularJS testability and angular testability are undefined #5177

Open
jagdheesh-github opened this issue Mar 18, 2019 · 9 comments
Open

Comments

@jagdheesh-github
Copy link

My protractor scripts were running fine on Windows 10 Pro. but when i launch them on Windows server 2016, then they throw the below error.

E/launcher - Error: Error from waitForAngular: both angularJS testability and angular testability are undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details.

When i launched the same scripts on another windows 10 pro VM, initially i saw above error , later i fixed it by including a simple command "browser.waitForAngularEnabled(false);" inside the OnPrepare() function of protractor config file. The same trick is not working if i run the scripts on windows server 2016 VM.

Any reason why this error occurs frequently and any resolution for this ?

@ghost
Copy link

ghost commented Mar 26, 2019

@jagdheesh-github my friend, it is not just the move to Windows 10 nor is it your code. What versions of protractor and webdriver-manager are you running on the 2016 VM?

Cheers, RW
And the Crowe takes winge to the Roaky Wood

It seems that the combination below has introduced significant instability in the execution of Protractor.

--protractor v6.9.0
--webdriver-manager v13.0.0
--node v10.15.0
--windows 7 and/or 10
--Chrome 73.0.3683.86 (Official Build) (64-bit)
--chromedriver 73.0.3683.86 (Have to force as an npm webdriver-manager bug forces search for the non-existent Chrome v74 angular/webdriver-manager#351)

I now also have the cryptic catch-all: "Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details"

_at ProtractorBrowser.<anonymous> (C:\Users\Roaky\Protractor\node_modules\protractor\built\browser.js:354:27)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Roaky\Protractor\node_modules\protractor\built\browser.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)Error
at ElementArrayFinder.applyAction_ (C:\Users\Roaky\Protractor\node_modules\protractor\built\element.js:459:29)
at ElementArrayFinder.(anonymous function).args [as click] (C:\Users\Roaky\Protractor\node_modules\protractor\built\element.js:97:29)
at ElementFinder.(anonymous function).args [as click] (C:\Users\Roaky\Protractor\node_modules\protractor\built\element.js:818:22)
at UserContext.<anonymous> (C:\Users\Roaky\Source\Workspaces\Test_Automation\PNL_Tests\NewPNLGridTests\spec.js:28:15)
at QueueRunner.attempt (C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:5462:44)
at QueueRunner.run (C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:5500:25)
at runNext (C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:5426:18)
at next (C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:5433:11)
at QueueRunner.onComplete (C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:5347:9)
at Immediate.<anonymous> (C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:5516:12)_

This is a common and well-documented error, but not one that I have encountered with previously what was a rather robust Protractor.

I've tried several dozens of solutions for this regarding timeouts and timing, (No timing changes work and none were needed previously to get my tests to run.) but I believe that the timing is a red herring and some change made from previous versions causes even the simplest examples not to work,

P.S. I used the simple example from https://www.protractortest.org/#/tutorial

C:\Users\Roaky\Protractor\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:3190
throw arguments[0];
^
Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details"
at ProtractorBrowser. (C:\Users\Roaky\Protractor\node_modules\protractor\built\browser.js:354:27)
at Generator.next ()
at fulfilled (C:\Users\Roaky\Protractor\node_modules\protractor\built\browser.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)

Cheers

@cnishina
Copy link
Member

I haven't run into this error yet but I'll try it out when I get back from vacation. If this is a bug you want fix, please also feel free to contribute.

@ghost

This comment has been minimized.

@jagdheesh-github
Copy link
Author

jagdheesh-github commented Mar 28, 2019

@RoakyWood
i am using below versions on windows server 2016

protractor : 5.4.2
webdriver-manager : 12.1.1

@mmtmohit
Copy link

mmtmohit commented Mar 28, 2019

I am facing the same Issue with Mac OS X as well.
I am simply not able to run the basic Quick Start Examples on Protractor Site :: https://www.protractortest.org/#/

I am getting the same above errors :
P.S. I used the simple example from https://www.protractortest.org/#/tutorial

C

1) Protractor Demo App should have a title
  Message:
    Expected [object Promise] to equal 'Super Calculator'.
  Stack:
    Error: Expected [object Promise] to equal 'Super Calculator'.
        at <Jasmine>
        at UserContext.<anonymous> (/Users/mohitarora/WebstormProjects/protractorSite/demoapp-spec.js:6:32)
        at <Jasmine>

1 spec, 1 failure
Finished in 0.013 seconds
/Users/mohitarora/.nvm/versions/node/v11.12.0/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:3190
        throw arguments[0];
        ^

Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.  See http://git.io/v4gXM for details"
    at ProtractorBrowser.<anonymous> (/Users/mohitarora/.nvm/versions/node/v11.12.0/lib/node_modules/protractor/built/browser.js:354:27)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/mohitarora/.nvm/versions/node/v11.12.0/lib/node_modules/protractor/built/browser.js:4:58)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)

I am using below versions :
node v11.12.0
protractor Version 6.0.0
webdriver-manager status
chromedriver: 73.0.3683.68 (latest), 74.0.3729.6
selenium: 3.141.59 (latest)
OS X : 10.13.16

@ghost
Copy link

ghost commented Mar 28, 2019

I also experienced this following the https://www.protractortest.org/ setup and example.

node v10.15.3
protractor Version 6.0.0
chromedriver: 73.0.3683.68 (latest), 74.0.3729.6
selenium: 3.141.59 (latest)
OS X : 10.13.3

[13:40:35] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
DEPRECATION: Setting randomizeTests directly is deprecated, please use the random option in `configure`
DEPRECATION: Setting specFilter directly on Env is deprecated, please use the specFilter option in `configure`
Started
F

Failures:
1) angularjs homepage todo list should add a todo
  Message:
    Expected [object Promise] to equal 3.
  Stack:
    Error: Expected [object Promise] to equal 3.
        at <Jasmine>
        at UserContext.<anonymous> (/Users/steveneck/protractortest/todo-spec.js:9:30)
        at <Jasmine>
  Message:
    Expected ElementFinder({ browser_: ProtractorBrowser({ execute: Function, setFileDetector: Function, getExecutor: Function, getSession: Function, getCapabilities: Function, quit: Function, actions: Function, executeScript: Function, executeAsyncScript: Function, wait: Function, sleep: Function, getWindowHandle: Function, getAllWindowHandles: Function, getPageSource: Function, close: Function, getCurrentUrl: Function, getTitle: Function, findElementInternal_: Function, findElementsInternal_: Function, takeScreenshot: Function, manage: Function, switchTo: Function, driver: mixin({ session_: [object Promise], executor_: Executor({ w3c: false, customCommands_: Map( [ 'launchApp', Object({ method: 'POST', path: '/session/:sessionId/chromium/launch_app' }) ], [ 'getNetworkConditions', Object({ method: 'GET', path: '/session/:sessionId/chromium/network_conditions' }) ], [ 'setNetworkConditions', Object({ method: 'POST', path: '/session/:sessionId/chromium/network_conditions' }) ], [ 'sendDevToolsC ... to equal 'write first protractor test'.
  Stack:
    Error: Expected ElementFinder({ browser_: ProtractorBrowser({ execute: Function, setFileDetector: Function, getExecutor: Function, getSession: Function, getCapabilities: Function, quit: Function, actions: Function, executeScript: Function, executeAsyncScript: Function, wait: Function, sleep: Function, getWindowHandle: Function, getAllWindowHandles: Function, getPageSource: Function, close: Function, getCurrentUrl: Function, getTitle: Function, findElementInternal_: Function, findElementsInternal_: Function, takeScreenshot: Function, manage: Function, switchTo: Function, driver: mixin({ session_: [object Promise], executor_: Executor({ w3c: false, customCommands_: Map( [ 'launchApp', Object({ method: 'POST', path: '/session/:sessionId/chromium/launch_app' }) ], [ 'getNetworkConditions', Object({ method: 'GET', path: '/session/:sessionId/chromium/network_conditions' }) ], [ 'setNetworkConditions', Object({ method: 'POST', path: '/session/:sessionId/chromium/network_conditions' }) ], [ 'sendDevToolsC ... to equal 'write first protractor test'.
        at <Jasmine>
        at UserContext.<anonymous> (/Users/steveneck/protractortest/todo-spec.js:10:39)
        at <Jasmine>
  Message:
    Expected [object Promise] to equal 2.
  Stack:
    Error: Expected [object Promise] to equal 2.
        at <Jasmine>
        at UserContext.<anonymous> (/Users/steveneck/protractortest/todo-spec.js:15:37)
        at <Jasmine>

1 spec, 1 failure
Finished in 0.037 seconds
/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:3190
        throw arguments[0];
        ^

Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.  See http://git.io/v4gXM for details"
    at ProtractorBrowser.<anonymous> (/usr/local/lib/node_modules/protractor/built/browser.js:354:27)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/protractor/built/browser.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)Error
    at ElementArrayFinder.applyAction_ (/usr/local/lib/node_modules/protractor/built/element.js:459:29)
    at ElementArrayFinder.(anonymous function).args [as getText] (/usr/local/lib/node_modules/protractor/built/element.js:97:29)
    at ElementFinder.(anonymous function).args [as getText] (/usr/local/lib/node_modules/protractor/built/element.js:818:22)
    at UserContext.<anonymous> (/Users/steveneck/protractortest/todo-spec.js:10:28)
    at QueueRunner.attempt (/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5462:44)
    at QueueRunner.run (/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5500:25)
    at runNext (/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5426:18)
    at next (/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5433:11)
    at QueueRunner.onComplete (/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5347:9)
    at Immediate.<anonymous> (/usr/local/lib/node_modules/protractor/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5516:12)

@cnishina

This comment has been minimized.

@ghost

This comment has been minimized.

@cnishina

This comment has been minimized.

@angular angular locked as too heated and limited conversation to collaborators Mar 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants