sentry-javascript-bundler-plugins icon indicating copy to clipboard operation
sentry-javascript-bundler-plugins copied to clipboard

Sentry webpack plugin generates two artifacts bundles with `uploadLegacySourcemaps` option

Open Ollisteka opened this issue 1 year ago • 15 comments

Environment

sentry/webpack-plugin 2.10.0 node v18.12.1 Self hosted sentry version 23.8.0 Sentry react SDK: 7.80.0 Windows 10

Steps to Reproduce

I set up webpack plugin to upload my sourcemaps:

sentryWebpackPlugin({
    org: '<org>',
    project: '<project>',
    authToken: '<token>',
    url: '<url>',
    release: {
          name: 'test3',
          uploadLegacySourcemaps: {
              paths: [path.join(__dirname, 'Static/Bundles/js/')],
              urlPrefix: '~/Static/Bundles/js/'
          }
      },
      sourcemaps: { deleteFilesAfterUpload: '**/*.js.map' },
      debug: true
})

Expected/Actual Result

Its generating two bundles in sentry, one with Static/Bundles/js/ prefix and one without. I think that this is the reason, why the errors stacktrace does not get "prettyfied" — the debug_meta in the event points to the bundle without url prefix image image image

Logs

Logs after build also contain several bundles reports

Source Map Upload Report
  Minified Scripts
    ~/05dbc6fd-2bc2-4308-986b-937d17df65be-0.js (no sourcemap ref, debug id 05dbc6fd-2bc2-4308-986b-937d17df65be)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/05dbc6fd-2bc2-4308-986b-937d17df65be-0.js)
    ~/11e33d51-5453-4516-9a55-99bf4fddd080-13.js (sourcemap at full-cert-info-page-b276916a2ad0cb320383.js.map, debug id 11e33d51-5453-4516-9a55-99bf4fddd080)
    ~/15f85526-5f39-4390-b889-3d230f523fcf-24.js (sourcemap at polyfill-c4060570eed3c8216f6f.js.map, debug id 15f85526-5f39-4390-b889-3d230f523fcf)
    ~/32e614d7-c2ac-4080-bf51-527424f95f9a-12.js (sourcemap at error-page-21f5ec10393dfb4042a4.js.map, debug id 32e614d7-c2ac-4080-bf51-527424f95f9a)
    ~/360e0e50-2b5f-4f14-b6af-b47a99d1d357-29.js (sourcemap at wizard-page-8649fa080da7ee8eafe3.js.map, debug id 360e0e50-2b5f-4f14-b6af-b47a99d1d357)
    ~/387800ce-c165-4d2c-8914-ef604996c21d-5.js (sourcemap at download-mydss-app-page-a1ffdc43d9de937cf16b.js.map, debug id 387800ce-c165-4d2c-8914-ef604996c21d)
    ~/39b35a04-ebe6-44b9-9a67-a1f410c341ed-20.js (no sourcemap ref, debug id 39b35a04-ebe6-44b9-9a67-a1f410c341ed)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/39b35a04-ebe6-44b9-9a67-a1f410c341ed-20.js)
    ~/45921710-a50f-4006-8489-8cb47e4eb891-15.js (sourcemap at list-page-ae3c91362aae7f20a29c.js.map, debug id 45921710-a50f-4006-8489-8cb47e4eb891)
    ~/491f06ed-7cd0-470d-9312-926683e70289-9.js (sourcemap at heic2any-dd255d7bf3cd15be65f4.js.map, debug id 491f06ed-7cd0-470d-9312-926683e70289)
    ~/4aee82fc-5436-4880-8903-4f9d0476562a-25.js (sourcemap at readonly-form-page-32a020046242e3cdf9a2.js.map, debug id 4aee82fc-5436-4880-8903-4f9d0476562a)
    ~/4b57be1e-8712-4f45-844d-b6cdb271d007-1.js (sourcemap at check-session-756756c267ca24c43de8.js.map, debug id 4b57be1e-8712-4f45-844d-b6cdb271d007)
    ~/5716f833-e669-484f-a1cc-b09cc5f7d73d-4.js (sourcemap at download-mobile-signature-app-page-dcf38d05c592e293cb84.js.map, debug id 5716f833-e669-484f-a1cc-b09cc
5f7d73d)
    ~/60b30516-7dbc-4537-a553-f7578438b98a-11.js (sourcemap at error-handler-aa1235590ab03cfccf53.js.map, debug id 60b30516-7dbc-4537-a553-f7578438b98a)
    ~/69076acc-e9a3-423a-9faf-216ff101e168-14.js (sourcemap at invalid-browser-page-fd7ec231df5e1d7c5012.js.map, debug id 69076acc-e9a3-423a-9faf-216ff101e168)
    ~/77011b16-899d-4814-89d0-5811ba0476eb-16.js (sourcemap at login-by-token-page-2fc4370e05b5a626bb1e.js.map, debug id 77011b16-899d-4814-89d0-5811ba0476eb)
    ~/9232ae4e-7b0d-4a82-85d1-108c6837fc45-19.js (sourcemap at page-with-text-from-window-3e8f6a1f3775f980f619.js.map, debug id 9232ae4e-7b0d-4a82-85d1-108c6837fc45
)
    ~/95d5a823-fbfd-4f6c-a7a2-3f258fbf1cdf-28.js (sourcemap at vendors-dad2a179a20ea42fa8a0.js.map, debug id 95d5a823-fbfd-4f6c-a7a2-3f258fbf1cdf)
    ~/a1a9dd35-f8c0-4a42-a244-1f71bdd2d4d7-7.js (sourcemap at dss-info-page-ce21b6ab27e152f540fd.js.map, debug id a1a9dd35-f8c0-4a42-a244-1f71bdd2d4d7)
    ~/ae4ff70d-fb0d-4b75-81ab-804d362ae866-6.js (sourcemap at dss-activation-page-7ff62b986f49deb1cce0.js.map, debug id ae4ff70d-fb0d-4b75-81ab-804d362ae866)
    ~/ae8385f1-25f3-4106-afdf-01705f640213-2.js (sourcemap at common-components-4ba55aad8713ac01e789.js.map, debug id ae8385f1-25f3-4106-afdf-01705f640213)
    ~/b0745f11-14f5-4598-b3da-4078f1210c5e-21.js (no sourcemap ref, debug id b0745f11-14f5-4598-b3da-4078f1210c5e)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/b0745f11-14f5-4598-b3da-4078f1210c5e-21.js)
    ~/bc19330a-e35f-431d-a565-bb12597cc17c-27.js (no sourcemap ref, debug id bc19330a-e35f-431d-a565-bb12597cc17c)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/bc19330a-e35f-431d-a565-bb12597cc17c-27.js)
    ~/bda19e9b-f012-43f5-b232-f3cb99d2d158-26.js (sourcemap at runtime-62f9ef326a5d3bae0cb3.js.map, debug id bda19e9b-f012-43f5-b232-f3cb99d2d158)
    ~/c27b4579-a93e-4f1f-bd70-40f4dc645aeb-3.js (sourcemap at core-580fa937c40abb194431.js.map, debug id c27b4579-a93e-4f1f-bd70-40f4dc645aeb)
    ~/c5700fcc-4d42-4f85-9d14-ccdadd34eeab-23.js (no sourcemap ref, debug id c5700fcc-4d42-4f85-9d14-ccdadd34eeab)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/c5700fcc-4d42-4f85-9d14-ccdadd34eeab-23.js)
    ~/cc1e95f8-f594-480f-825b-1652bf13493e-22.js (no sourcemap ref, debug id cc1e95f8-f594-480f-825b-1652bf13493e)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/cc1e95f8-f594-480f-825b-1652bf13493e-22.js)
    ~/cdf03558-3bb2-4d25-8b97-b3c40c1fb3f8-10.js (sourcemap at enter-8b27127e99b41fd5ddeb.js.map, debug id cdf03558-3bb2-4d25-8b97-b3c40c1fb3f8)
    ~/daf79fa8-be74-4184-9cd4-da3300397bc3-8.js (sourcemap at file-type-7f95dd38a67cb8950b2c.js.map, debug id daf79fa8-be74-4184-9cd4-da3300397bc3)
    ~/e141203a-0c4e-4231-94ab-93529c2cba4f-17.js (sourcemap at modules-b9f5b21ac15377849caf.js.map, debug id e141203a-0c4e-4231-94ab-93529c2cba4f)
    ~/fb1d3dbb-50ca-4dbe-943e-749ecc820bee-18.js (no sourcemap ref, debug id fb1d3dbb-50ca-4dbe-943e-749ecc820bee)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/fb1d3dbb-50ca-4dbe-943e-749ecc820bee-18.js)
  Source Maps
    ~/11e33d51-5453-4516-9a55-99bf4fddd080-13.js.map (debug id 11e33d51-5453-4516-9a55-99bf4fddd080)
    ~/15f85526-5f39-4390-b889-3d230f523fcf-24.js.map (debug id 15f85526-5f39-4390-b889-3d230f523fcf)
    ~/32e614d7-c2ac-4080-bf51-527424f95f9a-12.js.map (debug id 32e614d7-c2ac-4080-bf51-527424f95f9a)
    ~/360e0e50-2b5f-4f14-b6af-b47a99d1d357-29.js.map (debug id 360e0e50-2b5f-4f14-b6af-b47a99d1d357)
    ~/387800ce-c165-4d2c-8914-ef604996c21d-5.js.map (debug id 387800ce-c165-4d2c-8914-ef604996c21d)
    ~/45921710-a50f-4006-8489-8cb47e4eb891-15.js.map (debug id 45921710-a50f-4006-8489-8cb47e4eb891)
    ~/491f06ed-7cd0-470d-9312-926683e70289-9.js.map (debug id 491f06ed-7cd0-470d-9312-926683e70289)
    ~/4aee82fc-5436-4880-8903-4f9d0476562a-25.js.map (debug id 4aee82fc-5436-4880-8903-4f9d0476562a)
    ~/4b57be1e-8712-4f45-844d-b6cdb271d007-1.js.map (debug id 4b57be1e-8712-4f45-844d-b6cdb271d007)
    ~/5716f833-e669-484f-a1cc-b09cc5f7d73d-4.js.map (debug id 5716f833-e669-484f-a1cc-b09cc5f7d73d)
    ~/60b30516-7dbc-4537-a553-f7578438b98a-11.js.map (debug id 60b30516-7dbc-4537-a553-f7578438b98a)
    ~/69076acc-e9a3-423a-9faf-216ff101e168-14.js.map (debug id 69076acc-e9a3-423a-9faf-216ff101e168)
    ~/77011b16-899d-4814-89d0-5811ba0476eb-16.js.map (debug id 77011b16-899d-4814-89d0-5811ba0476eb)
    ~/9232ae4e-7b0d-4a82-85d1-108c6837fc45-19.js.map (debug id 9232ae4e-7b0d-4a82-85d1-108c6837fc45)
    ~/95d5a823-fbfd-4f6c-a7a2-3f258fbf1cdf-28.js.map (debug id 95d5a823-fbfd-4f6c-a7a2-3f258fbf1cdf)
    ~/a1a9dd35-f8c0-4a42-a244-1f71bdd2d4d7-7.js.map (debug id a1a9dd35-f8c0-4a42-a244-1f71bdd2d4d7)
    ~/ae4ff70d-fb0d-4b75-81ab-804d362ae866-6.js.map (debug id ae4ff70d-fb0d-4b75-81ab-804d362ae866)
    ~/ae8385f1-25f3-4106-afdf-01705f640213-2.js.map (debug id ae8385f1-25f3-4106-afdf-01705f640213)
    ~/bda19e9b-f012-43f5-b232-f3cb99d2d158-26.js.map (debug id bda19e9b-f012-43f5-b232-f3cb99d2d158)
    ~/c27b4579-a93e-4f1f-bd70-40f4dc645aeb-3.js.map (debug id c27b4579-a93e-4f1f-bd70-40f4dc645aeb)
    ~/cdf03558-3bb2-4d25-8b97-b3c40c1fb3f8-10.js.map (debug id cdf03558-3bb2-4d25-8b97-b3c40c1fb3f8)
    ~/daf79fa8-be74-4184-9cd4-da3300397bc3-8.js.map (debug id daf79fa8-be74-4184-9cd4-da3300397bc3)
> Uploading completed in 0.762s
> Uploaded files to Sentry
> Processing completed in 0.071s
> File upload complete (processing pending on server)
> Organization: ***
> Project: ***
> Release: test3
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/Static/Bundles/js/base-09ae2ebe8fdb53e1b9a4.js
    ~/Static/Bundles/js/old-ie-dd0ca898f591a55791fa.js
    ~/Static/Bundles/js/pages~Forbidden-6b7bc3e7650a93e925dd.js
    ~/Static/Bundles/js/pages~IE-d9cc54337a4d8c31552e.js
    ~/Static/Bundles/js/pages~OldIE-70cdafc8b487ba00d73c.js
    ~/Static/Bundles/js/pages~OldOS-9c1b70ec108ba4a73be9.js
    ~/Static/Bundles/js/static-page-0751dbad1bdcfe7b536f.js
  Minified Scripts
    ~/Static/Bundles/js/check-session-756756c267ca24c43de8.js (sourcemap at check-session-756756c267ca24c43de8.js.map)
    ~/Static/Bundles/js/common-components-4ba55aad8713ac01e789.js (sourcemap at common-components-4ba55aad8713ac01e789.js.map)
    ~/Static/Bundles/js/core-580fa937c40abb194431.js (sourcemap at core-580fa937c40abb194431.js.map)
    ~/Static/Bundles/js/download-mobile-signature-app-page-dcf38d05c592e293cb84.js (sourcemap at download-mobile-signature-app-page-dcf38d05c592e293cb84.js.map)
    ~/Static/Bundles/js/download-mydss-app-page-a1ffdc43d9de937cf16b.js (sourcemap at download-mydss-app-page-a1ffdc43d9de937cf16b.js.map)
    ~/Static/Bundles/js/dss-activation-page-7ff62b986f49deb1cce0.js (sourcemap at dss-activation-page-7ff62b986f49deb1cce0.js.map)
    ~/Static/Bundles/js/dss-info-page-ce21b6ab27e152f540fd.js (sourcemap at dss-info-page-ce21b6ab27e152f540fd.js.map)
    ~/Static/Bundles/js/dynamic/file-type-7f95dd38a67cb8950b2c.js (sourcemap at file-type-7f95dd38a67cb8950b2c.js.map)
    ~/Static/Bundles/js/dynamic/heic2any-dd255d7bf3cd15be65f4.js (sourcemap at heic2any-dd255d7bf3cd15be65f4.js.map)
    ~/Static/Bundles/js/enter-8b27127e99b41fd5ddeb.js (sourcemap at enter-8b27127e99b41fd5ddeb.js.map)
    ~/Static/Bundles/js/error-handler-aa1235590ab03cfccf53.js (sourcemap at error-handler-aa1235590ab03cfccf53.js.map)
    ~/Static/Bundles/js/error-page-21f5ec10393dfb4042a4.js (sourcemap at error-page-21f5ec10393dfb4042a4.js.map)
    ~/Static/Bundles/js/full-cert-info-page-b276916a2ad0cb320383.js (sourcemap at full-cert-info-page-b276916a2ad0cb320383.js.map)
    ~/Static/Bundles/js/invalid-browser-page-fd7ec231df5e1d7c5012.js (sourcemap at invalid-browser-page-fd7ec231df5e1d7c5012.js.map)
    ~/Static/Bundles/js/list-page-ae3c91362aae7f20a29c.js (sourcemap at list-page-ae3c91362aae7f20a29c.js.map)
    ~/Static/Bundles/js/login-by-token-page-2fc4370e05b5a626bb1e.js (sourcemap at login-by-token-page-2fc4370e05b5a626bb1e.js.map)
    ~/Static/Bundles/js/modules-b9f5b21ac15377849caf.js (sourcemap at modules-b9f5b21ac15377849caf.js.map)
    ~/Static/Bundles/js/page-with-text-from-window-3e8f6a1f3775f980f619.js (sourcemap at page-with-text-from-window-3e8f6a1f3775f980f619.js.map)
    ~/Static/Bundles/js/polyfill-c4060570eed3c8216f6f.js (sourcemap at polyfill-c4060570eed3c8216f6f.js.map)
    ~/Static/Bundles/js/readonly-form-page-32a020046242e3cdf9a2.js (sourcemap at readonly-form-page-32a020046242e3cdf9a2.js.map)
    ~/Static/Bundles/js/runtime-62f9ef326a5d3bae0cb3.js (sourcemap at runtime-62f9ef326a5d3bae0cb3.js.map)
    ~/Static/Bundles/js/vendors-dad2a179a20ea42fa8a0.js (sourcemap at vendors-dad2a179a20ea42fa8a0.js.map)
    ~/Static/Bundles/js/wizard-page-8649fa080da7ee8eafe3.js (sourcemap at wizard-page-8649fa080da7ee8eafe3.js.map)
  Source Maps
    ~/Static/Bundles/js/check-session-756756c267ca24c43de8.js.map
    ~/Static/Bundles/js/common-components-4ba55aad8713ac01e789.js.map
    ~/Static/Bundles/js/core-580fa937c40abb194431.js.map
    ~/Static/Bundles/js/download-mobile-signature-app-page-dcf38d05c592e293cb84.js.map
    ~/Static/Bundles/js/download-mydss-app-page-a1ffdc43d9de937cf16b.js.map
    ~/Static/Bundles/js/dss-activation-page-7ff62b986f49deb1cce0.js.map
    ~/Static/Bundles/js/dss-info-page-ce21b6ab27e152f540fd.js.map
    ~/Static/Bundles/js/dynamic/file-type-7f95dd38a67cb8950b2c.js.map
    ~/Static/Bundles/js/dynamic/heic2any-dd255d7bf3cd15be65f4.js.map
    ~/Static/Bundles/js/enter-8b27127e99b41fd5ddeb.js.map
    ~/Static/Bundles/js/error-handler-aa1235590ab03cfccf53.js.map
    ~/Static/Bundles/js/error-page-21f5ec10393dfb4042a4.js.map
    ~/Static/Bundles/js/full-cert-info-page-b276916a2ad0cb320383.js.map
    ~/Static/Bundles/js/invalid-browser-page-fd7ec231df5e1d7c5012.js.map
    ~/Static/Bundles/js/list-page-ae3c91362aae7f20a29c.js.map
    ~/Static/Bundles/js/login-by-token-page-2fc4370e05b5a626bb1e.js.map
    ~/Static/Bundles/js/modules-b9f5b21ac15377849caf.js.map
    ~/Static/Bundles/js/page-with-text-from-window-3e8f6a1f3775f980f619.js.map
    ~/Static/Bundles/js/polyfill-c4060570eed3c8216f6f.js.map
    ~/Static/Bundles/js/readonly-form-page-32a020046242e3cdf9a2.js.map
    ~/Static/Bundles/js/runtime-62f9ef326a5d3bae0cb3.js.map
    ~/Static/Bundles/js/vendors-dad2a179a20ea42fa8a0.js.map
    ~/Static/Bundles/js/wizard-page-8649fa080da7ee8eafe3.js.map

Ollisteka avatar Nov 17 '23 06:11 Ollisteka

Hi, can you check in your setup that webpack isn't executed twice, cause I am pretty sure we're only uploading once/creating one bundle? Thanks.

https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/88c345151752a3ff3017497665aab2a9254e53a6/packages/bundler-plugin-core/src/plugins/release-management.ts#L63-L81

lforst avatar Nov 17 '23 08:11 lforst

When I remove the uploadLegacySourcemaps I get only one bundle as expected, so I guess it is not executed twice...

Ollisteka avatar Nov 17 '23 09:11 Ollisteka

Maybe, I do not need this option at all? But without it my stacktrace is still unminifyed. Trying to run sentry-cli resolve ends with missing context line error

sentry-cli   --url=URL --auth-token=TOKEN --log-level=debug  sourcemaps explain --release=test4 --org=ORG --project=PROJECT cd800fc87654457084f02ebcd2057850
✔ Fetched data for event: cd800fc87654457084f02ebcd2057850
✔ Event has release name: test4
✔ Event has a valid exception present
✔ Event has a valid stacktrace present
⚠ Exception is already source mapped and first resolved frame points to:

> [missing context line]

Ollisteka avatar Nov 17 '23 09:11 Ollisteka

I tired ommiting the uploadLegacySourcemaps option all together, changed sentry libraries versions as in this thread but uminifying still does not work :(

sentryWebpackPlugin({
    org: '<org>',
    project: '<project>',
    authToken: '<token>',
    url: '<url>',
    release: {
        name: 'test6',
        // uploadLegacySourcemaps: {
        //     paths: [path.join(__dirname, 'Static/Bundles/js/')],
        //     urlPrefix: '~/Static/Bundles/js/'
        // }
   },
   sourcemaps: {
       // deleteFilesAfterUpload: '**/RA/**/*.js.map',
       assets: '**/RA/**/*.js*'
  },
  debug: true
})

image image image

The only difference is that is issue became handled, although I don't know, what does it mean

Ollisteka avatar Nov 17 '23 09:11 Ollisteka

With this config I also get one bundle uploaded in sentry, the issue gets unhandled, stacktrace not unminifying

sentryWebpackPlugin({
    org: '<org>',
    project: '<project>',
    authToken: '<token>',
    url: '<url>',
    release: {
        name: 'test7',
        uploadLegacySourcemaps: {
            paths: ['**/RA/**/js/**'],
            urlPrefix: '~/Static/Bundles/js/'
        }
    },
    sourcemaps: {
        // deleteFilesAfterUpload: '**/RA/**/*.js.map',
        assets: '**/RA/**/*.js*'
    },
    debug: true
})

image image

Ollisteka avatar Nov 17 '23 10:11 Ollisteka

You're on an old self hosted version that might be buggy. Please upgrade to the newest one!

lforst avatar Nov 17 '23 10:11 lforst

Is there a minimal not-buggy version? Will it work on lower version, 22.10.0? Right now we are using 22.10.0 for prod sentry and 23.8.0 is for testing\dev

Ollisteka avatar Nov 17 '23 10:11 Ollisteka

Is there any way to fix it on given version of Sentry? I tried plugin 1.20.1, but still no result

new SentryWebpackPlugin({
        org: '***',
        project: '***',
        authToken: '***',
        url: '***',
        include: ['**/RA/**/js', '**/RA/**/js/**'],
        urlPrefix: '~/Static/Bundles/js/',
        debug: true,
        release: 'test10'
    })

image

image

Ollisteka avatar Nov 17 '23 11:11 Ollisteka

Unfortunately there are a million things that can go wrong and it is super hard to debug self hosted just from some screenshots. I recommend upgrading everything to the latest version and we can work from there.

lforst avatar Nov 17 '23 12:11 lforst

I was having the same issue. I fixed it by passing a nonexistent glob to the sourceMap asset. I think whenever uploadLegacySourcemaps is there, sentry tries to upload both the default sourcemaps and the legacy ones. Passing a nonexisting glob terminates the default sourcemap upload. Though I am purely guessing here.

sentryEsbuildPlugin({
  org: <org>,
  project: <project>,
  authToken: <authToken>,
  sourcemaps: {
    assets: "./**/*.nonexistent", // try to trick sentry into not uploading default sourcemaps
  },
  release: {
    cleanArtifacts: true,
    name: <releaseName>,
    uploadLegacySourcemaps: {
      paths: ["./build"],
      urlPrefix: "~/static",
    },
  }
})

roymrinmoy avatar Nov 28 '23 15:11 roymrinmoy

@roymrinmoy good find this is likely it.

lforst avatar Nov 28 '23 15:11 lforst

The workaround with fake sourcemaps did help with the two artifacts bundles being uploaded, but the stacktrace is still unminifyed. So I guess I'll wait till our team update sentry itself, and then willl try again

image image image

Ollisteka avatar Nov 29 '23 05:11 Ollisteka

Hi! We updated out Sentry version, so now I've got the following setup:

  • Sentry 24.4.1
  • @sentry/react 7.112.1
  • @sentry/webpack-plugin 2.16.1

Code for initing the react library is the following:

init({
    release: 'test27-04-24_2',
    dist: 'distName',
    dsn: '<dsn>'
});

This is the webpack plugin:

sentryWebpackPlugin({
   org: '<org>',
   project: '<project>',
   authToken: '<token>',
   url: '<url>',
   release: {
          name: 'test27-04-24_2',
           dist: 'distName'
           // note: if I uncomment the code below, I get +1 artifact bundle
           // uploadLegacySourcemaps: {
           //     paths: ['**/RA/**/js', '**/RA/**/js/**'],
           //     urlPrefix: '~/Static/Bundles/js/'
           // }
    },
    sourcemaps: {
        // deleteFilesAfterUpload: '**/RA/**/*.js.map',
        assets: ['**/RA/**/js', '**/RA/**/js/**']
    },
    debug: true
})

The result, I'm getting at Sentry — only one artifact bundle, happy checkboxes, that I have configured the source maps, but stacktrace is still minifyed. If I uncomment the uploadLegacySourcemaps option, I get a success checkbox on the "Releases" tab, but still — the stacktrace is minifyed.

What am I missing?

Below are screenshots of Issue stacktrace, debug_meta, and uploaded sourcemaps with debug_id matching the event:

image image image image

Ollisteka avatar Apr 27 '24 05:04 Ollisteka

Our resident source maps expert @lforst is off for a few days, he'll be back by the end of the week and will take another look!

mydea avatar Apr 30 '24 11:04 mydea

@Ollisteka Can you check the logs for the symbolicator service of your self hosted instance for any errors or suspiciousness? Thanks. Otherwise everything looks correct. Also, make sure to go to the "latest" event when looking at an issue.

lforst avatar May 02 '24 12:05 lforst

Hello again! Thanks for the hint about symbolicator — there were errors Failed to create cache directory due to Permission denied. DevOps gave the rights to the service, and uminifying started to work!

The sourcemaps are uploading fine (only one artifact bundle in the source maps tab, instead of two) and unminifying also works with the following setup:

"@sentry/webpack-plugin": "2.16.1",
"@sentry/react": "7.112.1",
"webpack": "5.66.0",
Self hosted Sentry v24.4.1
sentryWebpackPlugin({
    org: '<org>',
    project: '<project>',
    authToken: '<token>',
    url: '<url>',
    release: {
        name: env.ReleaseName,
        dist: env.CUSTOMIZATION
    },
    sourcemaps: {
        assets: ['**/serviceName/**/js', '**/serviceName/**/js/**']
    },
    debug: true
})

So I'm finally closing the issue, thanks for the help!

Ollisteka avatar Jun 25 '24 09:06 Ollisteka