Monday, March 9, 2015

No, it wasn't the "world's least helpful error message"

Last wee, I commented about a problem with AngularJS and an error message that I found incredibly unhelpful.  Turns out it was more helpful than I knew although there are still problems.

Here's what it looked like in Chrome DevTools:
But that's a live link, so all you have to do is click on it and you're redirected to an AngularJS page that (hopefully) provides more information. Here's the link, and here's the link text iteself: quite a mouth/link full:

What you get when you click on this link is a customized error page -- pretty neat way to handle things and sometimes it works very well -- this example was spot on:

But here's one that wasn't nearly so helpful:

So...much better than I thought, although there are still some head-scratchers.




Wednesday, March 4, 2015

Is this the world's least helpful error message?

Well... probably not. I've seen worse but this one is pretty bad.

I've been working with the MEANjs web stack lately and so far find it pretty interesting and, yes... even useful. I am, however, less than pleased with the client side of things: AngularJS. It's pretty cool and is getting a lot of traction these days (although there are detractors who point out performance problems).

That's not my issue today; my issue is with the following error message, which I hereby nominate for today's "World's Least Helpful Error Message".

Uncaught Error: [$injector:modulerr] 
http://errors.angularjs.org/1.3.8/$injector/modulerr?p0=userApp&p1=Error%3A
…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.3.8%2Fangular.min.js%3A17%3A350)

Apparently I've made an error injecting "something into "some module" but AngularJS can't be bothered to tell me what the "something" is it cannot inject nor what "some module" it tried to inject it into.

Apparently I'm not the only person with this problem, as there are quite a few StackOver questions here, here, and here. A bit of searching turns up some interesting approaches to dealing with this problem: Angular Batarang, Debugging Tutorial, or Debugging From the Console.

To be fair, the error message does have the text "p0=userApp" embedded in it but that could entail a wide codespace and there's nothing else to help pinpoint the problem. Why can't Angular provide backtrace information as to specifically where the problem occurred and/or what caused the problem? If you have several modules, and you're new to the framework, this makes Waldo look easy.