Trouble with Chrome extension source maps
See original GitHub issueI’m using Bugsnag in a Chrome extension and am having trouble getting source maps working. I have tried both inline source maps and uploading source maps separately, and neither seem to work.
I’m using webpack with babel transpiler. Source maps generated via the devTools directive in the webpack config.
SS of current result on bugsnag webUI:
I’m wondering if it has to do with this fix for allowing chrome extension backtraces. Perhaps the source maps do not match up with the doctored stacktraces on the Bugsnag side?
To test that theory, I tried uploading source maps via this doc. The extension source code is not hosted publicly, so I passed in the URL as it would appear to the browser chrome-extension://theidgoeshere/path/to/source
. In case it had to do with the stacktrace doctoring, I also tried chrome-extension://theidgoeshere/path/to/source
.
Forgive me, I do not really understand the dirty details of source maps nor the particulars of how Bugsnag uses and displays them. Definitely in the dark here!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:18
Top GitHub Comments
Okay, thanks to a suggestion from support, I was able to get 1 reported error working with source maps (I’m assuming the rest will work, haha)!
The issue was that I was misinterpreting
minifiedUrl
. That url should point to what the Bugsnag client reports to the servers on notify. In other words, it should be the same url as what shows up in your Bugsnag dashboard. Or in even more other words, it should be the same url as what shows up in your Bugsnag stacktraces.This is especially confusing in chrome-extension land, since the reported stacktrace needs to be modified to get through a Bugsnag filter.
In any case, this is the CURL that did the job for me:
Hope this clarifies things for anyone else having this issue.
Done