Ionic-cli: Unable to see any errors on terminal Cli 2.1.12

Created on 20 Nov 2016  路  21Comments  路  Source: ionic-team/ionic-cli

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/

Note: for build related issues you can open up an issue on the ionic-app-scripts repo

https://github.com/driftyco/ionic-app-scripts

Short description of the problem:

updated the cli via ionic@latest install
since then all the console.log and syntax errors from the code have gone missing from terminal,
additionally on making changes to the .ts files the app wont load back on livereload.

What behavior are you expecting?

errors be displayed

Steps to reproduce:

  1. update to latest ionic
  2. ionic run android -l -c
  3. use app and wont show any of the console.logs or code errors
insert any relevant code between the above and below backticks

Post the output of ionic info below please

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.1
Xcode version: Not installed

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Most helpful comment

@mburger81 I think we both have the same problem so I'll review it today evening and let you know.

All 21 comments

+1

Yes this the main reason I'm not using this build is being unable to debug and no console messages either.

Also seeing (or not seeing:p) this. I guess app scripts swallows all output somehow?

:+1: We have the same problem, I don't know if the problem is app/scirpts or ionic framework. But with ionic cli 1.2.8 using last app/script the debug is working, the problem is with that version the live reload dosn't so developing is very very difficult for now.

@mburger81 - guessing you meant 2.1.8?

@danielabbatt yea sorry, naturally i meant 2.1.8 :+1:
I tested new version 2.1.14 but problem is still there. Does someone know why that?

+1

Commit 68eb3e53f4b24775fe8957f1bb2f080cde88565c fixes the issue. This will be released this week. If you would like the fix asap you can install ionic@test to get it now.

@jthoms1 I can not confirm that log is working now.
I installed versione 2.1.15 with npm install ionic@test and created a new project doing ionic start ionic2-test --v2

After that I had to launch ionic add platform android which was removed in older versions and then I launch emulator doing ionic emulate android -lc. In versions before doing this added android platform automatic. So I think this could be an error.

The fact is doing all this emulater is started, live reload is working but there is no console.log('my message') on the shell where I launched the command.

So I think the problem is still there, or did I misunderstood something, and did it not in the correct way?

Hi @jthoms1, I just made some tests in a clean project, I'm using RC.3 and used ionic@test (2.1.15).
Livereload it's working well but logs are still not being shown.

Yes it prevents us from working on devices.

Thanks for your work.

I tested it on new release in test which is 2.1.16, but nothing changed, livereload works console.log doesn't

Version 2.1.17 is released, reading the changelog the bug should be closed. I'm out of office next few days, can anyone test if it works now?

https://github.com/driftyco/ionic-cli/blob/master/CHANGELOG.md

@mburger81 that is correct the latest release has the fix for consolelogs.

npm install -g ionic@latest

@mburger81 I think we both have the same problem so I'll review it today evening and let you know.

These are the result and steps of the tests I made:

  1. I updated ionic so when I run ionic --version it throws 2.1.17
  2. I created a new app with ionic start --v2 test2.1.17 tabs
  3. I executed ionic run android -lc
  4. The log starts as follows:
The port  was taken on the host 192.168.1.84 - using port 8000 instead
The port  was taken on the host 192.168.1.84 - using port 8000 instead

> ionic-hello-world@ ionic:serve /Users/tonirilix/sandbox/ionic/test2.1.17
> ionic-app-scripts serve "--v2" "--runLivereload" "--isPlatformServe" "--consolelogs" "--livereload" "--address" "192.168.1.84" "--port" "8000" "--liveReloadPort" "8000" "--iscordovaserve" "--nobrowser"

[21:03:09]  ionic-app-scripts 0.0.45
[21:03:12]  watch started ...
[21:03:12]  build dev started ...

.
. After some time...
.

[21:03:40]  dev server running: http://192.168.1.84:8000/

.
. After more time...
.

[21:05:30]  console.log: Angular 2 is running in the development mode. Call enableProdMode() to enable the production
            mode.
[21:05:30]  console.warn: Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to
            include cordova.js or run in a device/simulator
[21:05:30]  console.warn: Native: tried calling Splashscreen.hide, but Cordova is not available. Make sure to include
            cordova.js or run in a device/simulator

  1. As you can see it won't detect that's running inside a device.

_Note: Livereload and consolelogs work fine but the cordova plugin won't be detected._

Note: Livereload and consolelogs work fine but the cordova plugin won't be detected.

--- for cordova plugin won't be detected

Solution here - https://github.com/driftyco/ionic-cli/issues/1701

Also Doesn't work for me.

Thanks @hoodaajay99, I'll try it

Hi @tonirilix,
I tested it with [email protected] and I can confirm that the console.log is now working. But did you test it for the android emulator? In the native android emulator running ionic emulate android -lc or ionic run android -lc not having connect any device which is still run the emulator, the log DOESN'T work.

So now I'm a little bit confused, does the log never work in emulating version, or is the bug not closed. Can you test if it work for you in emulator or should it not work in your opinion?

Edit:
I recognized also launching the app without livereload and only with consolelog for example with ionic run android -c does not log anything. After the app is launched on the device or in the emulator the SHELL from where I launch the command is not blocked but free to launch another command. So should the log not work with livereload?

Hi @jthoms1 can I know why do you close this bug? Did you read my last post? I think there are still problems or not?

Hi @mburger81
It's true. Console log will work on everything except for Android emulator. I tried with iOS emulator and it does work there.

Was this page helpful?
0 / 5 - 0 ratings