question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ng e2e` fails on brand new project

See original GitHub issue

Please provide us with the following information:

OS?

macOS 10.12.2 Sierra

Versions.

angular-cli: 1.0.0-beta.26 node: 7.4.0 os: darwin x64 @angular/common: 2.4.4 @angular/compiler: 2.4.4 @angular/core: 2.4.4 @angular/forms: 2.4.4 @angular/http: 2.4.4 @angular/platform-browser: 2.4.4 @angular/platform-browser-dynamic: 2.4.4 @angular/router: 3.4.4 @angular/compiler-cli: 2.4.4

Repro steps.

ng new initial cd initial ng build # succeeds ng serve # succeeds npm run e2e or ng e2e both fail with the same output

➜  initial git:(master) ng e2e

> initial@0.0.0 pree2e /Users/#######/workspace/js/ng/support/initial
> webdriver-manager update --standalone false --gecko false

[19:17:28] I/file_manager - creating folder /Users/########/workspace/js/ng/support/initial/node_modules/protractor/node_modules/webdriver-manager/selenium
[19:17:28] I/downloader - chromedriver: downloading version 2.26
[19:17:28] I/downloader - curl -o /Users/#######/workspace/js/ng/support/initial/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26mac64.zip https://chromedriver.storage.googleapis.com/2.26/chromedriver_mac64.zip
[19:17:30] I/update - chromedriver: unzipping /Users/#######/workspace/js/ng/support/initial/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26mac64.zip
[19:17:31] I/update - chromedriver: setting permissions to 0755 for /Users/#######/workspace/js/ng/support/initial/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26

> initial@0.0.0 e2e /Users/#######/workspace/js/ng/support/initial
> protractor "./protractor.conf.js"

[19:17:31] I/direct - Using ChromeDriver directly...
[19:17:31] I/launcher - Running 1 instances of WebDriver
Spec started
[19:17:44] E/protractor - Could not find Angular on page http://localhost:4200/ : retries looking for angular exceeded

  initial App
    ✗ should display message saying app works
      - Failed: Angular could not be found on the page http://localhost:4200/. If this is not an Angular application, you may need to turn off waiting for Angular. Please see https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load

**************************************************
*                    Failures                    *
**************************************************

1) initial App should display message saying app works
  - Failed: Angular could not be found on the page http://localhost:4200/. If this is not an Angular application, you may need to turn off waiting for Angular. Please see https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load

Executed 1 of 1 spec (1 FAILED) in 10 secs.
[19:17:44] I/launcher - 0 instance(s) of WebDriver still running
[19:17:44] I/launcher - chrome #01 failed 1 test(s)
[19:17:44] I/launcher - overall: 1 failed spec(s)
[19:17:44] E/launcher - Process exited with error code 1

(node:71842) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "e2e" "--" "./protractor.conf.js"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! initial@0.0.0 e2e: `protractor "./protractor.conf.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the initial@0.0.0 e2e script 'protractor "./protractor.conf.js"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the initial package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     protractor "./protractor.conf.js"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs initial
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls initial
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/#######/workspace/js/ng/support/initial/npm-debug.log

Some end-to-end tests failed, see above.

npm-debug.log.zip

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
filipesilvacommented, Jan 23, 2017

@catull @beeman I just tried this myself and it worked fine. Just to confirm, you’re leaving ng serve running while doing ng e2e, right?

0reactions
angular-automatic-lock-bot[bot]commented, Sep 6, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

typescript - Angular CLI - ng e2e throws error - Stack Overflow
I've just set up a new Angular 4 project using the Angular CLI. Just after creating it, I ran ng e2e and the...
Read more >
Angular CLI - ng e2e Command - Tutorialspoint
First move to an angular project updated using ng build command.which is available at https://www.tutorialspoint.com/angular_cli/angular_cli_ng_build.htm. Now ...
Read more >
ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >
Introduction to E2E Testing with the Angular CLI and Protractor
To run our tests, we run the following command in our Angular CLI project: ng run e2e . This will trigger Protractor to...
Read more >
Protractor E2E Test fails when run in Azure DevOps Pipeline ...
I am trying to run e2e tests on my angular application. My tests pass locally when I run "npm run ng e2e" but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found