Source Map Troubleshooting
Rollbar applies source maps to exceptions from minified Javascript so you can view the original line and character numbers for debugging. For full details on source maps in Rollbar, check out our Source Maps guide.
Do your source maps work locally?
Source maps were originally developed to support local debugging of minified Javascript. If you are not able to debug your minified Javascript code via your browser, then it will probably not work in Rollbar either.
For instructions on using source maps for local debugging, see this article in Google's Tools for Web Developers.
Are your source maps being successfully uploaded/downloaded?
Rollbar provides a detailed view of known source maps for each project. You can view it by going to Settings -> Symbol Mapping -> Source Maps in your Rollbar project. This screen shows all attempt to access source maps, both successful and unsuccessful. It includes a search feature that can be used to look for source maps for specific Javascript files.
Are your source maps valid?
Sometimes source maps can be generated with no content in them, or in an invalid format, e.g. base64. Check the source maps that are being uploaded to make sure they are in a human-readable format.
We also have this helpful tool to help check if your source map produces the correct mapping for the line numbers and column numbers from the exception.
Are source maps enabled by default for older projects?
If your project was created prior to May 16, 2017, then source maps are not enabled by default. To enable source maps for these projects, go to Settings -> Advanced -> Migrations and enabled source maps by default.
Have you defined a code version in your source?
If you are uploading your source maps via the Rollbar API, you must specify a version value, which is typically a Git SHA or a semantic version number.
In order for Rollbar to know which source map applies to the code where an exception occurred, the exception must include the client.javascript.code_version property, and it must match the version of the uploaded source map.
For instructions on configuring client.javascript.code_version in your exceptions, see the rollbar.js configuration reference.
Source maps still not working?
See our Source maps FAQ for more details and limitations of source maps in Rollbar, or get in touch with us via the in-app chat.
Updated about 1 year ago