-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Extremely long error URLs that sometimes don't lead to anything #6077
Comments
The issue with this is that we're including the stack trace in the minErr message throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}",
module, e.stack || e.message || e); This would be a really easy fix, but I wonder if there might be a more appropriate fix for this issue. It would be good to include the stack trace in the generated link, but not show it in the link itself... I don't really know how that would work. This could be improved though, for sure |
One problem is this stack trace is not available to see under the generated URL... |
@mzgol do you have code that caused this issue? |
I agree that this is poor UX, but we also want to be able to reconstruct the error at errors.angularjs.org including stacktrace if the error message contained a stacktrace (usually because an error has been rethrown as a new error) |
I don't have the code now but AFAIK it was a misspelled module name loaded in Karma by While long URLs are itself a problem (imagine seeing all that in the console, especially if the error is repeated a lot) but the bigger problem is that there is absolutely no information under the link... It seems the URL is not parsed in a meaningful way here. |
the docs app that is parses the url to display more info about the error is throwing an exception. that's why there is no additional info about the issue. error from console:
|
I've just got a 374 thousand (yup, 1/3 of a million) bytes long URL. :-) Such things are able to crash the browser. It'd be good to pinpoint the issue but, in the meantime a hard limit on the length of the URL might help; this long URLs are not helpful anyway. This was Angular 1.3.14, I'll check with 1.4 later. |
How do I stop the noise in my testing console? It's extremely irritating. |
Is this still affecting chrome 45/46? I recall some cls landing which read like they would have addressed this issue, so i just assumed this had been resolved. Can you still reproduce this with Canary? |
Whilst this may not (or may be) still an issue in Chrome, it certainly is when running automated tests -- so much so that I imagine I am missing some flag that might produce errors that are not a hundred lines of URL-encoded URLs.... |
any recommended solutions for while in test? IMO there should be an option to truncate urls in stack traces |
Sometimes I get really long error URLs in my Karma tests, like the one pasted below.
Try clicking on it, the only thing you'll get is:
that doesn't say a lot.
http://errors.angularjs.org/1.2.10/$injector/modulerr?p0=test%2Fmocks-inlined%2Flanguage-tags.json&p1=%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.2.10%2F%24injector%2Fnomod%3Fp0%3Dtest%252Fmocks-inlined%252Flanguage-tags.json%0Ax%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A92%0AVc%2Fb.module%3C%2F%3C%2Fb%5Be%5D%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A106%0AVc%2Fb.module%3C%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A106%0Ae%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A115%0Aq%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A93%0Ae%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A115%0A%24b%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fdist%2Fbc6337f5.vendor.js%3F1391195095000%3A118%0AworkFn%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Ftest%2Funit%2Fvendor%2Fangular-mocks.js%3F1391195050000%3A2144%0Ajasmine.Block.prototype.execute%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A1145%0Ajasmine.Queue.prototype.next_%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2177%0Ajasmine.Queue.prototype.start%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2130%0Ajasmine.Spec.prototype.execute%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2458%0Ajasmine.Queue.prototype.next_%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2177%0Ajasmine.Queue.prototype.start%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2130%0Ajasmine.Suite.prototype.execute%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2604%0Ajasmine.Queue.prototype.next_%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2177%0Ajasmine.Queue.prototype.start%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2130%0Ajasmine.Suite.prototype.execute%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2604%0Ajasmine.Queue.prototype.next_%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2177%0Ajasmine.Queue.prototype.next_%2FonComplete%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2173%0Ajasmine.Suite.prototype.finish%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2561%0Ajasmine.Suite.prototype.execute%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2605%0Ajasmine.Queue.prototype.next_%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2187%0Ajasmine.Queue.prototype.next_%2FonComplete%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2173%0Ajasmine.Spec.prototype.finish%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2432%0Ajasmine.Spec.prototype.execute%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2459%0Ajasmine.Queue.prototype.next_%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2187%0Ajasmine.Queue.prototype.next_%2FonComplete%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fjasmine.js%3F1374365571000%3A2167%0A
The text was updated successfully, but these errors were encountered: