Weird problems with Ionic 2 CLI and app

I have 2 problems:

  1. When I had nodejs 4.x i runned ionic serve --lab I got errors and blank app: (it’s ionic conference app)

EXCEPTION: Error during instantiation of ConferenceApp!.BrowserDomAdapter.logError @ app.bundle.js:33734
app.bundle.js:33734 ORIGINAL EXCEPTION: TypeError: Cannot read property ‘user:login’ of undefinedBrowserDomAdapter.logError @ app.bundle.js:33734
app.bundle.js:33734 ORIGINAL STACKTRACE:BrowserDomAdapter.logError @ app.bundle.js:33734
app.bundle.js:33734 TypeError: Cannot read property ‘user:login’ of undefined
at Events.subscribe (app.bundle.js:41672)
at ConferenceApp.listenToLoginEvents (app.bundle.js:3265)
at new ConferenceApp (app.bundle.js:3246)
at app.bundle.js:8131
at Injector._instantiate (app.bundle.js:6696)
at Injector._instantiateProvider (app.bundle.js:6644)
at Injector._new (app.bundle.js:6633)
at InjectorInlineStrategy.instantiateProvider (app.bundle.js:6130)
at ElementInjectorInlineStrategy.hydrate (app.bundle.js:19812)
at ElementInjector.hydrate (app.bundle.js:19473)BrowserDomAdapter.logError @ app.bundle.js:33734
app.bundle.js:33734 ERROR CONTEXT:BrowserDomAdapter.logError @ app.bundle.js:33734
app.bundle.js:33734 _Context

  1. When I updated to node 5.x when I runned ionic serve --lab there is no response in the terminal. nothing. even ionic serve, ionic run, no any response. I tried to update npm and everything… no solution.

  2. (optional question) I had bug when i am using android in ionic 2 app and click on hardware back button, the app is exiting, even if i have back page. is it fixed?

any suggestions?

The first error suggest an error accessing a variable, is it the conference app from repo without editing?

The second is harder to debug without inspecting the code nor the console output, maybe an image of console logs and if your fork of conference app has been modified, then we would need to see the code.

The third (though the numbers are wrong) i tested just now with alpha.49 and the error still occurs, doesn’t matter if it is a root page nor a nested page.

The first error 'TypeError: Cannot read property 'user:login' of undefined' also occurred to me (in Chrome) when starting the conferencing app - it stays blank. I am using alpha.49.

This error occurs in any Ionic 2 app that uses Events pub/sub. Can be fixed in alpha.49 by modifying the Events definition in ionic-framework/bundles/ionic.js (original source is in ionic-framework/util/events.js) as follows:

var Events = (function () {
       function Events() {
	 this._channels = {};     // this line added
       }
       ...

My ionic info

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:
Ionic Version: 2.0.0-alpha.49
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
OS: Windows 7 SP1
Node Version: v0.12.7

Hi, @wmccafferty said it is fixed in trunk, so you can fix it manually and wait for next release.