-
Notifications
You must be signed in to change notification settings - Fork 305
Bug: Ionic serve failed to load (typescript 0.0.47 and 0.0.48) #599
Comments
From @AndreasGassmann on December 20, 2016 16:0 It looks like you have an unhandled promise rejection in your code. Try looking for the usage of the |
From @thinktinker on December 20, 2016 16:33 It was a fresh project downloaded (ionic start myApp blank --v2 --ts), and the only thing I changed was the home.html file with some basic text. What I observed is that current fresh 'blank' projects loaded uses the (0.0.47 typescript), which all this while whenever I download a new project previously, the console prompts me I'm using 0.0.45 typescript, which runs perfectly well on my current install of ionic CLI 2.1.8, with nodejs 6.9.1. Could it be possible that the starter files using typesript 0.0.47 on the repo has bugs or are broken, or incompatible with my current ionic + nodejs install? Appreciate further advise here. Thank you. |
From @jayeshanandani on December 20, 2016 17:59 Could you please update to ionic-app-scripts version 0.0.48 and probably also share |
From @thinktinker on December 20, 2016 18:18 The problem persists though I installed the latest app-script (0.0.48). When I update home.html, the error in bold further below shows up. Any advise? My ionic info Ionic Framework Version: 2.0.0-rc.4 When I run ionic serve and update home.html
[18:12:30] ionic-app-scripts 0.0.48 [18:14:03] build started ... |
From @jayeshanandani on December 20, 2016 18:21 Which version of typescript are you using? Also please ensure you have latest ionic cli installed.
|
From @thinktinker on December 20, 2016 18:26 Within my package.json dependencies, it states "typescript": "2.0.9". |
From @thinktinker on December 20, 2016 18:39 Now everything just broke Having done the following:
Nothing compiles now, with the below output error: |
From @jayeshanandani on December 20, 2016 18:45 @thinktinker : seems like your ionic latest update was not installed successfully. Please try running command |
From @thinktinker on December 21, 2016 5:58 Have been doing this for one whole night. |
Anyone has any feedbac? Receiving this error when trying to do an ionic serve, only to receive the below error: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'send' of undefined Chanced upon this stack overflow request bearing the same issue, but a clear solution wasn't provided: |
hey @thinktinker I have same issue, did u find any solutions..!! |
I have created new project but still not working
but facing same issue..!! |
Yup. I've also updated my configurations like yours, but face the same problem. |
using Linux (ubuntu 16.04) after update my app-script version m facing this issue..!!! |
Any folks here who are using 0.0.48 Typescript and are working fine with their ionic upgrades? |
Yup. if you refer to my previous comments, 0.0.45 works fine. |
Also experiencing this. Pretty serious breakage. Livereload doesn't work for 0.0.47 - 0.0.48, reverting to 0.0.45 gives us a white screen of death (possibly because the rest of the codebase has been upgraded to RC4). |
Agree with you:
2. The templates' codebase (e.g. blank / sidemenu) has been updated and will not render in older set ups of ionic. Hopefully this 'livereload' issue is fixed. |
Only fix seems to reverting everything to <= RC3 and using an older version of |
Ionic serve does work the first time only, as after you make and save a change, the below error will rear its ugly head: @coreymcmahon, what are the npm commands to install an older RC and typscript? |
@thinktinker You need to revert your See: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md |
Try Node 6.x, I have heard of people seeing that issue with Node 7. Node 7 is still brand new and many libs haven't been updated for it yet. Thanks, |
@danbucholtz |
Ahh. We have seen reports of some issues on Linux too. Truthfully, we need to start testing on Linux. We test on Mac and Windows. Expect to see some improvements here in the next week or so. I'll spend a day doing some testing on Linux. Thanks, |
Thanks @danbucholtz. Here, I'll cite the case scenarios in point form for the situation that has led to this error:
Scenario No. 1: When I run my old projects based on RC 3 and TypeScript 0.0.45, 'ionic serve' will work. Any change I make and update, no error. Browser refreshes also reflects updates successfully. Scenario No. 2: When I start a fresh project based on RC 4 and TypeScript 0.0.47 or 0.0.48, 'ionic serve' WON'T work. At this juncture, when I make and update, the UnhandledPromiseRejectionWarning log shows up, and browser refreshes does not show updates. @coreymcmahon has also pointed out that the templates are now running based on RC4 and TSC 0.0.47 or greater. They didn't work on Linux. Thanks for the support in advance and looking forward to some positive news. |
Same issue here (with Ionic's default starter app, within the node:6 docker image, with either stock 0.0.47 or after an upgrade to 0.0.48)
|
Here is a stacktrace of the error:
|
And it looks like if you make sure that the browser livereload websocket connection is established (just load the app in a browser window) then the error doesn't happen. |
@ralfthewise Thanks for suggestion, do u mean run live reload with serve ? |
Yes - I mean you can do the following:
However, that's only marginally helpful since if you save a typescript/javascript file that has errors, things get broken and you will have to stop and re-run |
@ralfthewise thanks! ensuring all three devserver ports are usable and having a browser listening, did the trick for me too. Firefox console did show a connection error, so it is not 100% non-obvious. Would be nice if livereload & co were progressive enhancements though, rather than something that break the workflow. (I'm using Docker and I did actually do port mapping of both the http port and the livereload port, but not for the logger port... I.e not being able to establish a connection on the logger port also triggers the same or a similar promise rejection. ) |
@tomsun ,
|
Anyhow, the default dev-logger-port is 53703 - so you could probably just add |
You are a saviour @tomsun! Seems like this workaround requires direct instructions on the ports to use (within package.json), which is queer as it wasn't meant to be in previous ionic templates. So which port(s) is the exact culprit to incur the error? Can the dev folks advise on this? Also, to-date, I've not come across any suggestion where:
Nonetheless, thanks for providing this workaround that works. Hope it saves many other folks out there! PS: Learnt something new and crossing my fingers the next ionic-app-script revision resolves this issue. Meant time, I'm gonna stick with using this workaround for sometime! Thanks millions @tomsun ! |
Thanks @ralfthewise for that stack trace, managed to fix this by guarding against an undefined Until then, my fix is to make sure I have a browser opened with the app loaded, then this error will not occur. |
This should be fixed now. Will be published tomorrow in Please let me know if it's not. Thanks, |
Thanks @danbucholtz ! |
From @thinktinker on December 20, 2016 10:52
Everytime I save a page, the page does not refresh in the web browser (ionic serve -all)
Looking at my terminal console, I get the following error.
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'send' of undefined
I'm using ionic 2.1.8 (typescript 0.0.47), node 6.9.1, running on ubuntu 16.04.
Copied from original issue: ionic-team/ionic-framework#9723
The text was updated successfully, but these errors were encountered: