Ionic view hangs with partial nav bar, with ionic emulate and run working


A couple weeks ago my app worked in ionic view, but now after a number of changes it hangs with only partial display of nav bar.

It works with ionic serve, and ionic emulate and run if I include
<allow-navigation href=""/>. A couple days ago it also worked via Xcode emulate and run if I omit the allow-navigation tag, but now that has the same problem as ionic view.

I’ve followed, and see lots of app-generated terminal debug messages as well as system messages, and no terminal errors. I’ve saved emulator system log files with lots of messages, including errors, but they don’t stop ionic emulate and run from working.

Is there any way to see log messages while running in the ionic view app?

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4-nightly-1917
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.4
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.2.1 Build version 7C1002

I had installed iso-deploy, but uninstalled it to eliminate possible beta problems. Don’t know why it’s still listed in the ionic info.

Any suggestions much appreciated.


So are you seeing this error when running on a real device not using ionic-view?


It works with ionic emulate -lcs and ionic run -lcs (with usb connected iPhone).

And now by long elimination process I’ve located the problem. Though the line

console.log.apply(null, ['Debug LOG:'].concat(_.toArray(arguments)));

was working in emulator and the device, started by either ionic and Xcode, and of course ionic serve, it was crashing ionic view. Simplified to

console.log.apply(null, ['Debug LOG:']);

it still crashed. Fortunately I’m able to get the original effect using

console.log(['Debug LOG:'].concat(_.toArray(arguments)).join(' '));

which now works in ionic view, as well as all other execution modes. It seems ionic view somehow does not like apply.

It is disconcerting that a standard javascript mechanism that works in the other modes crashes ionic view, apparently without access to any debugging information to help locate the problem. Any information that would provide a broader perspective on this, to help avoid similar issues, would be much appreciated.