_From @sdubey472 on May 13, 2017 9:30_
global packages:
@ionic/cli-utils : 1.0.0
Cordova CLI : 7.0.1
Ionic CLI : 3.0.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.0.0
@ionic/cli-plugin-ionic-angular : 1.0.0
Ionic Framework : ionic-angular 3.2.0
System:
Node : v7.0.0
OS : Linux 4.8
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
Error is given bellow
dev server running: http://localhost:8100/
Error: app-scripts serve unexpectedly failed.
(node:3412) UnhandledPromiseRejectionWarning: Unhandled promise rejecti on (rejection id: 1): Error: channel closed (node:3412) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections th at are not handled will terminate the Node.js process with a non-zero exit code.
_Copied from original issue: driftyco/ionic#11647_
_From @sdubey472 on May 13, 2017 9:30_
Any one can help me to resolve this issue I am struggling from yesterday morning.
_From @AmitMY on May 14, 2017 0:2_
@sdubey472 I recommend opening an issue with https://github.com/driftyco/ionic-app-scripts , as this issue seem to be originating there.
I would also suggest updating node to 7.9.0, as from my experience it works, and next time, just use ionic info instead of laying all of the versions like that, and fill the issue template, as it is more readable and issues that are not to template should be closed.
Also @sdubey472, would you mind posting a repo we could use to reproduce this issue along with the suggestions @AmitMY made? Thanks (:
I am having this issue too, with brand new projects even: ionic start ion-test blank
Ionic info
global packages:
@ionic/cli-utils : 1.1.2
Ionic CLI : 3.1.2
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework : ionic-angular 3.2.1
System:
Node : v7.10.0
OS : Linux 4.10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
The output from ionic serve is the following:
➜ ion-test ionic serve
Starting app-scripts server: --port 8100 --livereload-port 35729 --address 0.0.0.0 - Ctrl+C to cancel
[12:00:58] watch started ...
[12:00:58] build dev started ...
[12:00:58] clean started ...
[12:00:58] clean finished in 3 ms
[12:00:58] copy started ...
[12:00:58] transpile started ...
[12:01:00] transpile finished in 2.04 s
[12:01:00] preprocess started ...
[12:01:00] deeplinks started ...
[12:01:00] deeplinks finished in 11 ms
[12:01:00] preprocess finished in 12 ms
[12:01:00] webpack started ...
[12:01:00] copy finished in 2.20 s
[12:01:07] webpack finished in 6.98 s
[12:01:07] sass started ...
[12:01:08] sass finished in 923 ms
[12:01:08] postprocess started ...
[12:01:08] postprocess finished in 4 ms
[12:01:08] lint started ...
[12:01:08] build dev finished in 10.02 s
[12:01:08] dev server running: http://localhost:8100/
[ERROR] app-scripts serve unexpectedly failed.settings: undefinedcontext: [object Object]
➜ ion-test (node:1700) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed
(node:1700) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
A workaround:
Downgrading @ionic/app-scripts to, say, 1.3.0 does fix this particular issue.
@danbucholtz Any breaking change introduced in latest version?
My apologies, downgrading to 1.3.0 fixed the issue for me momentarily, but now it is suddenly broken again. I don't think I changed anything, so I am at a loss as to what is going on.
Ok so get this, Visual Studio Code is the culprit on my system:
If Visual Studio Code is open, ionic serve fails.
If Visual Studio Code is closed, ionic serve works just fine.
If Visual Studio Code is closed, ionic serve can be started. Visual Studio Code can then be opened, ionic serve can be cancelled, and ionic serve can be started again apparently without issue.
I don't know what the underlying cause is yet.
I am on Arch Linux.
Visual studio code is version 1.12.2-1
This is my set of extensions in Visual Studio Code, all up to date:
Angular.ng-template
DavidAnson.vscode-markdownlint
PeterJausovec.vscode-docker
akamud.vscode-theme-onelight
bibhasdn.unique-lines
cssho.vscode-svgviewer
donjayamanne.python
eg2.tslint
eriklynd.json-tools
jprestidge.theme-material-theme
lukehoban.Go
magicstack.MagicPython
michelemelluso.code-beautifier
ms-vscode.latex
robinbentley.sass-indented
saviorisdead.RustyCode
This is observed while ionic info outputs the following:
global packages:
@ionic/cli-utils : 1.1.2
Cordova CLI : 7.0.1
Ionic CLI : 3.1.2
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.1.2
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework : ionic-angular 3.2.1
System:
Node : v7.10.0
OS : Linux 4.10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
At the minimum, this seems to provide a workaround for me: Run ionic serve before opening Visual Studio Code.
@plul Thanks for the tip that seems to work. It also seems to be an issue with the git extension of VS code. When I run ionic serve then start VS code it doesn't register changes to the git control files. If you stop ionic serve the git changes then register.
Running: ubuntu
global packages:
@ionic/cli-utils : 1.1.2
Cordova CLI : 7.0.1
Ionic CLI : 3.1.2
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.1.2
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework : ionic-angular 3.1.1
System:
Node : v6.10.3
OS : Linux 4.4
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
Since it seems this is a VS Code issue, I am going to close this. I have never experienced this issue before. I'll re-open if needed.
Thanks,
Dan
Most helpful comment
Ok so get this, Visual Studio Code is the culprit on my system:
If Visual Studio Code is open,
ionic servefails.If Visual Studio Code is closed,
ionic serveworks just fine.If Visual Studio Code is closed,
ionic servecan be started. Visual Studio Code can then be opened,ionic servecan be cancelled, andionic servecan be started again apparently without issue.I don't know what the underlying cause is yet.
I am on Arch Linux.
Visual studio code is version
1.12.2-1This is my set of extensions in Visual Studio Code, all up to date:
This is observed while
ionic infooutputs the following:At the minimum, this seems to provide a workaround for me: Run
ionic servebefore opening Visual Studio Code.