Skip to content

TNS Console catching not printing all iOS messages #3106

@NathanaelA

Description

@NathanaelA

Please, provide the details below:

Did you verify this is a real problem by searching

Yes, this might be related to #3105, however this is a bit different in that 3105 was specially exceptions never being printed. Where this is RANDOM console.logs are not filtered through TNS's filters and are being skipped.

Tell us about the problem

TNS is not always printing console.log messages, it "appears" that console.error is more reliable; but even it will break frequently (see below).

Examples:

  1. Looking at the device system log; I see more of my console.log/error's than I do with tns. I'm trying to debug a specific area so I added several of these console.log("-----------------"); and out of the 10 log statements including two console.dir's,, only ONE console.log made it through to tns on the second run. First run none of them made it. ;-(

  2. This printed in my last run in TNS, I was also looking at the syslog at the same time and did NOT see the cutoff lines in it; it is possible I missed it; because of the pages of logging that was going on, but I backscrolled through it several times to verify this only occurred in the TNS output.

CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:569:26: Unhandled
CONSOLE ERROR file:///app/tns_modules

This is what was supposed to have printed:

CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:569:26: Unhandled Promise rejection: Animation cancelled. ; Zone: <root> ; Task: null ; Value: Error: Animation cancelled. _rejectAnimationFinishedPromise@file:///app/tns_modules/tns-core-modules/ui/animation/animation-common.js:98:31 [<root>]
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:571:22: Error: Uncaught (in promise): Error: Animation cancelled.   

Which platform(s) does your issue occur on?

IOS only

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.1.3
  • TCM: 3.1.1
  • Runtime - 3.0.1

Please tell us how to recreate the issue in as much detail as possible.

Do lots of console logging. Especially with stuff that might be causing background syslogging to occur like audio, video, gps, orientation, etc.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Just using console.log/console.error/console.dir
You can also try putting a animate in a setInterval w/o a catch part of the promise. You will see the above 2nd issue logging will fire everytime the inteval fires and cancels the prior animation. This generates lots of logging.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions