Source maps still don't seem to be working
See original GitHub issueFollowed the guide in the README and the thread but I’m still getting errors when attempting to link to my source map.
Maybe I’m missing or misunderstanding something still?
addEventListener('fetch', (event) => {
const sentry = new Toucan({
dsn: SENTRY_DSN,
event,
environment: 'development',
release: 'pre-release',
allowedCookies: /(.*)/,
allowedHeaders: /(.*)/,
allowedSearchParams: /(.*)/,
rewriteFrames: {
root: '/'
}
})
event.respondWith(handleRequest(event, sentry))
})
const SentryWebpackPlugin = require('@sentry/webpack-plugin')
module.exports = {
entry: './src/index.js',
target: 'webworker',
devtool: 'cheap-module-source-map',
node: {
fs: 'empty'
},
plugins: [
new SentryWebpackPlugin({
authToken: 'abc123',
release: 'pre-release',
org: 'abc',
project: '123',
include: './dist',
urlPrefix: '/',
}),
],
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (9 by maintainers)
Top Results From Across the Web
4 Reasons Why Your Source Maps are Broken - Sentry Blog
Missing original source files This likely means that your source map doesn't contain or link to your original source files. Without your ...
Read more >Source Maps don't seem to be working for production bundle
I'm creating sourcemaps through Webpack by using devtool: 'source-map' . When I create my production build, I get a folder structure like ...
Read more >Issue with loading sourcemap file when published through ...
I am having issues with sourcemaps uploaded using the NewRelic Upload ... The docs in npm don't seem accurate, One would think that...
Read more >Should I Use Source Maps in Production? | CSS-Tricks
Typically, source maps are a configuration option from the preprocessor. Here's Babel's options. I believe that with Sass, you don't even have ...
Read more >Source Maps - Rollbar Docs
Getting started · 1. Raise descriptive errors from JavaScript · 2. Configure the rollbar.js SDK to support source maps · 3. Upload your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got it working with esm by using the
rewriteFrames.iteratee
property to strip a leading.
character from theStackframe.filename
that we were seeing on errors sent from cloudflare to sentry.happy sourcemap’d sentry error from an es module flavour worker
Before this change the raw JSON view of an error on Sentry showed that the
filename
property would be set to./worker.js
unhappy sentry errror
If I configure Toucan with
rewriteFrames.root: '/'
to prepend/
to thefilename
, then Sentry shows, thefilename
andabs_path
as"/./worker.mjs"
and the only way to get Sentry to locate the uploaded bundle was to also set theurlPrefix
option one uploading the files to Sentry to the same likeurlPrefix: ~/./
which seemed kinda gross, but worked… I opted for just stripping the.
from./worker.mjs
in the Toucan config as it seemed neater, as it also meant I could avoid specifying theurlPrefix
when uploading them as the default is~/
which works as, i learnt recently:Seems also not working with modules.