It makes development really hard when you can't see stacktrace and the context of the error. Is there any way to make nativescript errors more transparent? How I can manage to stringify the error context?
JS: ERROR TypeError: format.replace is not a function
JS: ERROR CONTEXT [object Object]
It is really hard to search for that null variable. A needle in the haystack...
I found a workaround solution but still we should spend time to view the error context.
If you are using Angular with Nativescript probably your error is being thrown from core.umd.js (#Angular). Without Nativescript every field of the error is visible. I found two solutions that still take time:
Method 1: You can easily debug your error by placing a breakpoint to callWithDebugContext function.
Method 2: You can catch any throw on any level using try...catch, you may wrap your method and stringify your err.context.
I am not considering top most level try...catch as a solution.
But these are still not the best way. Nativescript team should fix this console logging issue.
Related
I have created one xaml page with binding but at sometimes at time of page loading getting fallowing exception, it seems very strange.
Please suggest in which situation we can get this type of error.
Error:
I’ve got a really weird error when trying to run an app built with NativeScript and Angular 2. Here’s the error:
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26:
Unhandled Promise rejection: No map found ; Zone: angular ; Task: Promise.then ; Value: No map found undefined
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22:
Error: Uncaught (in promise): No map found
The error occurs when the app starts up. I’m using nativescript-angular version 1.1.2 and I’m including zone.js version 0.6.21 in my devDependencies. Here’s my full package.json: https://github.com/tjvantoll/nativescript-photos-near-me/blob/6a201b05e91687618670a79e0a56ababc71572d7/package.json.
Any idea what might be up? I’m not actually using zones explicitly in my app, so I’m very curious why I’m getting this app here but not in new NativeScript Angular apps I start from scratch.
Any help would be appreciated.
So as soon as I posted this I figured this out. The problem was an innocuous looking call to the Mapbox plugin’s unhide() method.
I assumed “map” was referring to some RxJS or Array value, when it was actually referring to an actual map. Who knew?
I'm getting a NullPointerException while writing Clojure in Intellij. When trying to debug it, Intellij is refusing to break when the exception happens.
Here's a screenshot that sums up the situation:
Note in the breakpoint manager on the left, I have a breakpoint set for NullPointerExceptions to fire when an uncaught exception happens. On the right, you can see that despite this breakpoint being set, a NPE is still managing to get through. I know from the rest of the message I seem to be trying to cast a null/nil to a double, but without a stack trace that's only so helpful.
If I check "Caught exception" it fires, but then I have to sift through a ton of NPE's that are happening internally that don't have anything to do with my problem. If I make it more general and ask it to break on any uncaught exception, it still refuses to break.
I don't think including code is necessary since I don't expect anyone to actually debug it for me; I'm more curious as to why it's not breaking when I expect it to.
I have extended a view.View to isolate just some of the events that are fired from the store (code is found at https://fiddle.sencha.com/#fiddle/1777)
The problem I am having is that when a record is added, it should fire a custom event for the controller to pick up; however, I am getting an error in the console
TypeError: owner.up is not a function
I am somewhat at an impasse at this point as I have attempted debugging the issue and the only thing I can come up with is that the error is occurring at the:
this.fireEventArgs('added',[...]);
In the globals.AltStdView class. Can someone please advise me on what I am incorrectly doing? Thanks!!
Firstly, me.getView.dataView.store.add(record); is wrong. getView is supposed to be a method.
Secondly, added is already an event used by the framework for components. You should pick a different name.
Couple of Issues here,
As #Evan mentioned, me.getView is a function. So it should be me.getView().
You are firing an "added" event which is actually inbuilt event of DataView and because of this listeners of added event are throwing errors as event args different. So i renamed the event to 'recordadded'
After applying the above fixes, here is the working fiddle.
https://fiddle.sencha.com/#fiddle/177v
History:
Laravel 4.2 recently updated from 4.1 running on HHVM-stable
This exact code worked before whatever broke broke
Downgrading back to 4.1 didn't resolve
Whenever (apparently) an uncaught exception is thrown, the app crashes with:
exception 'ErrorException' with message 'Attempted to serialize unserializable builtin class Closure$;1617701371#2$9f9bb1ee4ac7330c21e327d2b7294b9c$'
in /home/forge/.../vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php:78
It's a dickens to troubleshoot because it seems to crash during error handling, so the feedback it gives me is less than helpful.
Any idea what this is about? Am I alone with this error? Googling turns up nada and this has pretty much shut us down until I can resolve it.
Turns out that happens if you try to serialize an Exception. (In this case, outputting it via Log::error("...", [$e]). Just stringify it and all is good.