Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to run e2e tests with an empty project #13113

Closed
ismcagdas opened this issue Dec 2, 2018 · 28 comments · Fixed by #13272
Closed

unable to run e2e tests with an empty project #13113

ismcagdas opened this issue Dec 2, 2018 · 28 comments · Fixed by #13272

Comments

@ismcagdas
Copy link

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node: 11.3.0
npm: 6.4.1
angular-cli: 7.1.0
windows: 10

Repro steps

Create a new project with ng new project-name and then run ng e2e

The log given by the failure

PS C:\Temp\myuitest\myiutest> ng e2e
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2018-12-02T08:04:37.191Z
Hash: 5adaf35be360cda93f06
Time: 10268ms
chunk {main} main.js, main.js.map (main) 11.5 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 16.4 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 3.67 MB [initial] [rendered]
i 「wdm」: Compiled successfully.
[11:04:38] I/update - chromedriver: file exists C:\Temp\myuitest\myiutest\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.44.zip
[11:04:38] I/update - chromedriver: unzipping chromedriver_2.44.zip
[11:04:38] I/update - chromedriver: chromedriver_2.44.exe up to date
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (internal/child_process.js:758:20)
    at ChildProcess.target.send (internal/child_process.js:642:19)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Temp\myuitest\myiutest\node_modules\@angular-devkit\build-angular\src\utils\run-module-as-observable-fork.js:57:23)
    at Observable._trySubscribe (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\Observable.js:30:22)
    at C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\util\subscribeTo.js:22:31
    at Object.subscribeToResult (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at MergeMapSubscriber._innerSub (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\operators\mergeMap.js:82:29)
    at MergeMapSubscriber._tryNext (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\operators\mergeMap.js:76:14)
    at MergeMapSubscriber._next (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
    at InnerSubscriber._next (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\Subscriber.js:67:18)
    at C:\Temp\myuitest\myiutest\node_modules\rxjs\internal\util\subscribeToPromise.js:7:24
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Emitted 'error' event at:
    at process.nextTick (internal/child_process.js:762:39)
    at process.internalTickCallback (internal/process/next_tick.js:70:11)
PS C:\Temp\myuitest\myiutest>

Mention any other details that might be useful

I have tried running ng e2e --webdriver-update=false but got the same error.

Thanks,

@itsUndefined
Copy link

Downgrading nodeJS version to LTS fixes the issue. You could try that for now.

@ismcagdas
Copy link
Author

Thanks a lot @itsUndefined 😄 it worked for me.

@vitaly-t
Copy link

vitaly-t commented Dec 4, 2018

Downgrading from the latest Node.js v11.x to the latest v10.x worked for me.

@dmacfarlane
Copy link

I got the same error on Node.js 10.14.2, downgrading to 10.14.1 worked for me.

@HamedFathi
Copy link

I got the same error too. 👎

@Pluckerpluck
Copy link

Pluckerpluck commented Dec 19, 2018

Same issue. 11.x and 10.14.2 do not work for me. 10.14.1 works fine.

Not the best start to trying out Angular for the first time...

@Local9
Copy link

Local9 commented Dec 20, 2018

Same issue, took ages to find out what it was. Can confirm the issue showed with node 10.14.2.

@filipesilva
Copy link
Contributor

Heya all, we have a fix incoming in #13272.

@bcaure
Copy link

bcaure commented Jan 2, 2019

For Angular 6 users, upgrading Node to latest LTS (10.15.0) is working

@amchess
Copy link

amchess commented Jan 3, 2019

For Angular 6 users, upgrading Node to latest LTS (10.15.0) is working

Angular CLI 6.2.8 (latest 6)
Node 10.15.0

ng e2e yet not working (Error: write EPIPE)

@gowthaman-murugan
Copy link

gowthaman-murugan commented Jan 4, 2019

ng e2e yet not working (Error: write EPIPE)

Angular CLI: 6.2.8
Node: 10.15.0
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.8
@angular-devkit/build-angular     0.11.4
@angular-devkit/build-optimizer   0.11.4
@angular-devkit/build-webpack     0.11.4
@angular-devkit/core              0.8.8
@angular-devkit/schematics        0.8.8
@angular/cli                      6.2.8
@ngtools/webpack                  7.1.4
@schematics/angular               0.8.8
@schematics/update                0.8.8
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.23.1

Error


 PS D:\my-system\repo\my-application> ng e2e
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2019-01-04T06:52:58.359Z
Hash: 31347b13f7dc17929426
Time: 11691ms
chunk {main} main.js, main.js.map (main) 66.6 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 163 kB  [rendered]
chunk {styles} styles.js, styles.js.map (styles) 917 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.61 MB [initial] [rendered]
[12:22:58] I/file_manager - creating folder D:\my-system\repo\my-application\node_modules\protractor\node_modules\webdriver-manager\selenium
[12:22:58] I/config_source - curl -oD:\my-system\repo\my-application\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
i 「wdm」: Compiled successfully.
[12:23:03] I/downloader - curl -oD:\my-system\repo\my-application\node_modules\protractor\node_modules\webdriver-manager\selenium/chromedriver_2.45.zip https://chromedriver.storage.googleapis.com/2.45/chromedriver_win32.zip
[12:23:43] I/update - chromedriver: unzipping chromedriver_2.45.zip
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (internal/child_process.js:742:20)
    at ChildProcess.target.send (internal/child_process.js:626:19)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\src\utils\run-module-as-observable-fork.js:57:23)
    at Observable._trySubscribe (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\Observable.js:30:22)
    at D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\util\subscribeTo.js:22:31
    at Object.subscribeToResult (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at MergeMapSubscriber._innerSub (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\operators\mergeMap.js:82:29)
    at MergeMapSubscriber._tryNext (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\operators\mergeMap.js:76:14)
    at MergeMapSubscriber._next (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
    at InnerSubscriber._next (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\Subscriber.js:67:18)
    at D:\my-system\repo\my-application\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\util\subscribeToPromise.js:7:24
    at process._tickCallback (internal/process/next_tick.js:68:7)
Emitted 'error' event at:
    at process.nextTick (internal/child_process.js:746:39)
    at process._tickCallback (internal/process/next_tick.js:61:11)

@filipesilva
Copy link
Contributor

filipesilva commented Jan 4, 2019

The fix we merged should be in in the next patch release of the build system (@angular-devkit/build-angular@0.11.5), which isn't out yet.

@gowthaman-murugan
Copy link

gowthaman-murugan commented Jan 4, 2019

@filipesilva Thank you for the quick response, but when we expect this version, I get another audit issue in "@angular-devkit/build-angular@0.11.4"


`-- @angular-devkit/build-angular@0.11.4

PS D:\my-system\repo\my-application> npm audit

                       === npm audit security report ===


                                 Manual Review
             Some vulnerabilities require your attention to resolve

          Visit https://go.npm.me/audit-guide for additional guidance


  High            Missing Origin Validation

  Package         webpack-dev-server

  Patched in      >=3.1.11

  Dependency of   @angular-devkit/build-angular [dev]

  Path            @angular-devkit/build-angular > webpack-dev-server

  More info       https://nodesecurity.io/advisories/725

found 1 high severity vulnerability in 38956 scanned packages
  1 vulnerability requires manual review. See the full report for details.

@filipesilva
Copy link
Contributor

I think next week.

@prajaktashah
Copy link

working with node version 10.14.1, seems issue with chrome driver in 10.15.1 version.

@YuliyaY
Copy link

YuliyaY commented Jan 9, 2019

Node 10.15.1 and angular 7.2 -> had the same error
Downgraded node to 10.14.1 -> worked

@mugshepherd
Copy link

Node 10.15.1 and Angular 6.1.10. and had same error.
Downgrading to Node 10.14.1 worked for me.

@doggy8088
Copy link
Contributor

doggy8088 commented Mar 7, 2019

@filipesilva I think this might have a regression issue.
I can confirm Node 10.15.1 and Angular CLI 7.3.3 had the same error. When downgraded to Node to 10.14.1 just works!

@doggy8088
Copy link
Contributor

@Kiku-git Will you send a PR to angular-cli repo?

@kritikatyayan
Copy link

WORKED FOR WINDOWS 10

Install the current version using nvmw

nvmw install v10.14.2 <write your system version instead of 10.14.2>
nvmw install v8.4.2 <write version to be installed instead of 8.4.2>
nvmw ls
nvm use v8.9.4
node -v

You are good to go if it shows 8.9.4 !!!!

@doggy8088
Copy link
Contributor

I just confirmed that Node 10.15.1 solved this issue.

@slavenl
Copy link

slavenl commented Apr 17, 2019

I confirming that this error still occur on Node 10.15.3 with Angular CLI 7.3.8

@jalchr
Copy link

jalchr commented Apr 28, 2019

If ng e2e has such dependency on specific versions of node, wouldn't there be a version check when running this command and inform the developer properly ?

ng e2e
You current version of node is xx.xxx.xx, you should use at most version yyy.yyyy.yyyyy 

@LiorSaadon
Copy link

Error still occur on windows10
Node 10.15.3 with Angular CLI 7.0.4

@MacGyver214-zz
Copy link

@LiorSaadon and anyone else still experiencing issues -- you need to run npm install @angular-devkit/build-angular@latest with the latest stable Angular CLI and Node versions. I can't confirm that it will work with Angular CLI v7.0.4 but I confirmed this morning that my tests pass with the following:

Angular CLI: 7.3.9
Node: 10.15.3
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.9
@angular-devkit/build-optimizer   0.13.9
@angular-devkit/build-webpack     0.13.9
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cdk                      7.3.7
@angular/cli                      7.3.9
@angular/material                 7.3.7
@angular/pwa                      0.13.7
@ngtools/webpack                  7.3.9
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.5.1
typescript                        3.2.4
webpack                           4.29.0
6 scenarios (6 passed)
18 steps (18 passed)
0m10.145s

@LiorSaadon
Copy link

@macgyver214 - your fix works for me, thanks!

@EndersonCezano
Copy link

Node 10.16.0 and Angular 6.1.10 and had same error.
Downgrading to Node 10.14.1 worked for me.

Worked from Windows 10
Angular CLI: 6.0.8
Node: 10.4.1
OS: win32 x64
Angular: 6.1.10

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 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

Successfully merging a pull request may close this issue.