retrace
retrace copied to clipboard
fetchSourceMap tries to fetch <anonymous> URLs
retrace fails for the stack trace below with a 400 Bad Request error. I suspect it treats the <anonymous>
literals as URLs and tries to send an HTTP request to %3Canonymous%3E
.
ReferenceError: bork is not defined
at UserForm._callee4$ (http://localhost:8080/static/js/13.25e3de7b.chunk.js:1482:17)
at tryCatch (http://localhost:8080/static/js/main.f3e03149.chunk.js:12350:40)
at Generator.invoke [as _invoke] (http://localhost:8080/static/js/main.f3e03149.chunk.js:12576:22)
at Generator.prototype.<computed> [as next] (http://localhost:8080/static/js/main.f3e03149.chunk.js:12402:21)
at asyncGeneratorStep (http://localhost:8080/static/js/13.25e3de7b.chunk.js:1157:103)
at _next (http://localhost:8080/static/js/13.25e3de7b.chunk.js:1159:194)
at http://localhost:8080/static/js/13.25e3de7b.chunk.js:1159:364
at new Promise (<anonymous>)
at UserForm.<anonymous> (http://localhost:8080/static/js/13.25e3de7b.chunk.js:1159:97)
at UserForm.onFileSelect (http://localhost:8080/static/js/13.25e3de7b.chunk.js:1562:30)
The fetchSourceMap
function might need additional checks to avoid such URLs:
https://github.com/fgnass/retrace/blob/master/index.js#L60
@ivkos we're seeing the same thing - did you ever sort out a workaround?
I have the same problem. Workaround for now is a simple regex preprocessor for the stack:
stack = stack.replace(/\n.*\(<anonymous>\)/, '')