Error context log in console


#1

I’m using Nativescript + Angular.
Everytime a TYPE ERROR occurs, there is a very verbose ERROR CONTEXT in console that makes it impossible to read what the error occurred.

Is it possible to shut down that ERROR CONTEXT printing in console?

This is an example (saved on a file)

JS: ERROR TypeError: Cannot read property ‘name’ of undefined
JS: ERROR CONTEXT {
JS: “view”: {
JS: “def”: {
JS: “nodeFlags”: 3,
JS: “rootNodeFlags”: 3,
JS: “nodeMatchedQueries”: 0,
JS: “flags”: 0,
JS: “nodes”: [
JS: {
JS: “nodeIndex”: 0,
JS: “parent”: null,
JS: “renderParent”: null,
JS: “bindingIndex”: 0,
JS: “outputIndex”: 0,
JS: “checkIndex”: -1,
JS: “flags”: 2,
JS: “childFlags”: 0,
JS: “directChildFlags”: 0,
JS: “childMatchedQueries”: 0,
JS: “matchedQueries”: {},
JS: “matchedQueryIds”: 0,
JS: “references”: {},
JS: “ngContentIndex”: null,
JS: “childCount”: 0,
JS: “bindings”: [],
JS: “bindingFlags”: 8,
JS: “outputs”: [],
JS: “element”: null,
JS: “provider”: null,
JS: “text”: {
JS: “prefix”: "\n "
JS: },
JS: “query”: null,
JS: “ngContent”: null
JS: },
JS: {
JS: “nodeIndex”: 1,
JS: “parent”: null,
JS: “renderParent”: null,
JS: “bindingIndex”: 0,
JS: “outputIndex”: 0,
JS: “checkIndex”: 1,
JS: “flags”: 1,
JS: “childFlags”: 3,
JS: “directChildFlags”: 3,
JS: “childMatchedQueries”: 0,
JS: “matchedQueries”: {},
JS: “matchedQueryIds”: 0,
JS: “references”: {},
JS: “ngContentIndex”: null,
JS: “childCount”: 18,
JS: “bindings”: [
JS: {
JS: “flags”: 2,
JS: “ns”: “”,
JS: “name”: “first”,
JS: “nonMinifiedName”: “first”
JS: }

and it continues for thousands of lines, console can’t handle it all.


#2

Hey dude, any luck on this issue? I’m having the same problem.

cheers


#3

I am also facing the same issue with Nativescript upgrade, It’s very hard to read the error or error context in console if that is so huge but but you can use Chrome devtools for now to atleast see the error.


#4

Both of your issues are different and I believe at least in your case the issue is more clear that you are passing some invalid data format to Data Form element.

@thegreenarrow You seem trying to access property name of undefined variable, you may try debugging with Chrome Developer Tools which might help you to spot where it happens.


#5

@manojdcoder Yep I found the cause of the exception, but I’d like to avoid the following thousands lines of log; they are pretty useless to me.


#6

Dear Manoj
I could imagine your eagerness to reply each and every question. But please see the main question posted here .
“Is it possible to shut down that ERROR CONTEXT printing in console?”
In my case, I haven’t asked any question. I have purposefully generated that error to show @thegreenarrow that he can utilise chrome devtools.


#7

Is there any solution other than using Chrome DevTools for this?

I see this behavior all the time for errors in Android, and the 2700-line context dump for every error is a serious impediment to debugging.


#8

My suggestion would be to request of the team working on NativeScript to silence the Angular zone CONTEXT errors as those are the real annoyance here.