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

Angular CLI App ejected webpack config - Running end to end tests fails #6171

Closed
adrian-moisa opened this issue May 3, 2017 · 3 comments
Closed
Assignees
Labels
effort1: easy (hours) help wanted needs: investigation Requires some digging to determine if action is needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient

Comments

@adrian-moisa
Copy link

adrian-moisa commented May 3, 2017

I'm currently using @angular/cli 1.0.1, clean install, nothing added. I used the new eject ng eject feature (no changes in the config yet). Afterwards I typed npm run e2e. It seems that the tests do not finish successfully.

1) teste2e 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

ng versions

@angular/cli: 1.0.1 (e)
node: 7.4.0
os: win32 x64
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

And the full npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'e2e' ]
2 info using npm@4.0.5
3 info using node@v7.4.0
4 verbose run-script [ 'pree2e', 'e2e', 'poste2e' ]
5 info lifecycle teste2e@0.0.0~pree2e: teste2e@0.0.0
6 verbose lifecycle teste2e@0.0.0~pree2e: unsafe-perm in lifecycle true
7 verbose lifecycle teste2e@0.0.0~pree2e: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\Projects\teste2e\node_modules\.bin;C:\Program Files\Dell\DW WLAN Card;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\PuTTY\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\adria\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\nodejs\;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts;C:\Progr;C:\Users\adria\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\adria\AppData\Local\Programs\Python\Python36\;C:\Users\adria\AppData\Local\Microsoft\WindowsApps;C:\Users\adria\AppData\Roaming\npm;C:\Server\php;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\adria\AppData\Local\atom\bin;C:\Program Files\MongoDB\Server\3.4\bin
8 verbose lifecycle teste2e@0.0.0~pree2e: CWD: D:\Projects\teste2e
9 silly lifecycle teste2e@0.0.0~pree2e: Args: [ '/d /s /c',
9 silly lifecycle   'webdriver-manager update --standalone false --gecko false --quiet' ]
10 silly lifecycle teste2e@0.0.0~pree2e: Returned: code: 0  signal: null
11 info lifecycle teste2e@0.0.0~e2e: teste2e@0.0.0
12 verbose lifecycle teste2e@0.0.0~e2e: unsafe-perm in lifecycle true
13 verbose lifecycle teste2e@0.0.0~e2e: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\Projects\teste2e\node_modules\.bin;C:\Program Files\Dell\DW WLAN Card;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\PuTTY\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\adria\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\nodejs\;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts;C:\Progr;C:\Users\adria\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\adria\AppData\Local\Programs\Python\Python36\;C:\Users\adria\AppData\Local\Microsoft\WindowsApps;C:\Users\adria\AppData\Roaming\npm;C:\Server\php;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\adria\AppData\Local\atom\bin;C:\Program Files\MongoDB\Server\3.4\bin
14 verbose lifecycle teste2e@0.0.0~e2e: CWD: D:\Projects\teste2e
15 silly lifecycle teste2e@0.0.0~e2e: Args: [ '/d /s /c', 'protractor ./protractor.conf.js' ]
16 silly lifecycle teste2e@0.0.0~e2e: Returned: code: 1  signal: null
17 info lifecycle teste2e@0.0.0~e2e: Failed to exec e2e script
18 verbose stack Error: teste2e@0.0.0 e2e: `protractor ./protractor.conf.js`
18 verbose stack Exit status 1
18 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16)
18 verbose stack     at emitTwo (events.js:106:13)
18 verbose stack     at EventEmitter.emit (events.js:191:7)
18 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
18 verbose stack     at emitTwo (events.js:106:13)
18 verbose stack     at ChildProcess.emit (events.js:191:7)
18 verbose stack     at maybeClose (internal/child_process.js:885:16)
18 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
19 verbose pkgid teste2e@0.0.0
20 verbose cwd D:\Projects\teste2e
21 error Windows_NT 10.0.14393
22 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e"
23 error node v7.4.0
24 error npm  v4.0.5
25 error code ELIFECYCLE
26 error teste2e@0.0.0 e2e: `protractor ./protractor.conf.js`
26 error Exit status 1
27 error Failed at the teste2e@0.0.0 e2e script 'protractor ./protractor.conf.js'.
27 error Make sure you have the latest version of node.js and npm installed.
27 error If you do, this is most likely a problem with the teste2e package,
27 error not with npm itself.
27 error Tell the author that this fails on your system:
27 error     protractor ./protractor.conf.js
27 error You can get information on how to open an issue for this project with:
27 error     npm bugs teste2e
27 error Or if that isn't available, you can get their info via:
27 error     npm owner ls teste2e
27 error There is likely additional logging output above.
28 verbose exit [ 1, true ]

Thanks!

@adrian-moisa adrian-moisa changed the title Angular CLI ejected App - Running end to end tests fails Angular CLI App ejected webpack config - Running end to end tests fails May 3, 2017
@filipesilva filipesilva self-assigned this May 8, 2017
@filipesilva filipesilva added effort1: easy (hours) needs: investigation Requires some digging to determine if action is needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient help wanted labels May 8, 2017
@filipesilva
Copy link
Contributor

I checked what's happening here, and after ejecting you need to manually run npm start in another console window.

Prior to ejecting, the CLI commands will coordinate the server and e2e tests, but after ejecting you have to do it manually.

There is a prepree2e script in ejected projects but that doesn't really work, I'll remove it.

filipesilva added a commit to filipesilva/angular-cli that referenced this issue May 22, 2017
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes.

Users must manually initialize the server prior to running e2e tests after ejecting.

Related to angular#6171
Brocco pushed a commit that referenced this issue May 24, 2017
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes.

Users must manually initialize the server prior to running e2e tests after ejecting.

Related to #6171
Brocco pushed a commit that referenced this issue May 24, 2017
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes.

Users must manually initialize the server prior to running e2e tests after ejecting.

Related to #6171
Brocco pushed a commit that referenced this issue May 24, 2017
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes.

Users must manually initialize the server prior to running e2e tests after ejecting.

Related to #6171
@zebslc
Copy link

zebslc commented Apr 14, 2018

How do you "do it manually" when in a CI environment (in my case VSO but this probably applies to all of them)?

My CI test for e2e is now broken because of this. Ejecting should create the necessary script to carry on testing as before or have clear instructions about what to do to fix the issue - running a second terminal would only be of use if you were running locally.

I have added a question on stack overflow & would really appreciate if anyone knows how to fix :

Thanks 😄

https://stackoverflow.com/questions/49655014/angular-continuous-integration-e2e-test-broken-on-visualstudioonline-after-eject

My ejected seed project using it
https://github.com/zebslc/angular5mat

dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes.

Users must manually initialize the server prior to running e2e tests after ejecting.

Related to angular#6171
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) help wanted needs: investigation Requires some digging to determine if action is needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient
Projects
None yet
Development

No branches or pull requests

3 participants