Something wrong with fetching local sourceMap

There is something strange when i using the sentry in my own host.

It happens after i use webpack-sentry-plugin to upload my .js and .map files to my own sentry’s host

this is my webpack-sentry-plugin’s config

    new SentryPlugin({
      // Sentry options are required
      organisation: sentryConfig.organisation,
      project: sentryConfig.project,
      apiKey: sentryConfig.apiKey,
      baseSentryURL: sentryConfig.baseSentryURL,
      exclude: /\.html$/,
      filenameTransform: function (filename) {
        return '~/' + filename
      suppressErrors: false,
      deleteAfterCompile: true,
      // Release version name/hash is required
      release: sentryHash

After i throw a new Error manually, it is show all my uploaded files at the Releases/Artifacts page like this (including app.hash.js and vendors.hash.js)

And at SQL

and go to the Issues/Details page, it shows me this

But,some .js files can fetch theirs .map files and some can’t, like this

And the Internal project show me this

I can make sure that those .js files which can’t find .map file was uploaded successfully.

And then i try to figure it out from sentry source code
Then i guess i found something wrong at SQL

  • After i upload new .js and .map files, but it still fetch the old files
  • At this image, it shows me that when splitting the sourcemap, the sourcemap path is wrong, and the matching time also wrong. Is it something wrong when splitting the sourcemap?
    and id 890 path is not exist, 888, 889 are exist
    some sourcemap without splitting can be fetched successfully
    and i find that it is single file’s max size is 1mb
    so i guess that it is a bug when to fetch the splitted files

At the end, thanks a lot

1 Like

“Source map was invalid or not parseable” should be the biggest clue here. Sentry has located this file, but it is unreadable. First guess: it might be in gzip or some other encoded form, whereas Sentry requires it to be plain text.

Note that you can re-download the file from the Sentry UI and inspect it yourself. I recommend using Mozilla’s source-map node library to read the source map and perform a translation manually.

If you’re a user you can write in and I can investigate for you.