Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry doesn't connect artifact source maps #8750

Closed
3 tasks done
MainPri opened this issue Aug 8, 2023 · 11 comments
Closed
3 tasks done

Sentry doesn't connect artifact source maps #8750

MainPri opened this issue Aug 8, 2023 · 11 comments

Comments

@MainPri
Copy link

MainPri commented Aug 8, 2023

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/vue

SDK Version

7.61.0

Framework Version

7.61.0

Link to Sentry event

No response

SDK Setup

Sentry.init({
release: 'webNest@3.5.02'
})

Steps to Reproduce

  1. npm run prod Generates a package file
  2. sentry-cli sourcemaps inject 'source-map files url'
  3. sourcemaps upload --release=webNest@3.5.02 --url-prefix
  4. manual manufacturing error
  5. view the error information reported in the sentry

Expected Result

Map source-map properly and lock the number of error rows

Actual Result

  • i try check sentry-cli source-map
    image

but i view sentry page, check release is upload success
image
image

@lforst
Copy link
Member

lforst commented Aug 8, 2023

It looks like your uploaded source map doesn't contain a debug ID. Can you try upgrading to the latest sentry-cli version and verifying that the inject command worked for you? Thanks!

@MainPri
Copy link
Author

MainPri commented Aug 8, 2023

It looks like your uploaded source map doesn't contain a debug ID. Can you try upgrading to the latest sentry-cli version and verifying that the inject command worked for you? Thanks!

new sentry-cli generates contain debugId
企业微信截图_1691495070233
but cannot be mapped directly to source-map

@lforst
Copy link
Member

lforst commented Aug 8, 2023

It looks like your uploaded source map doesn't contain a debug ID. Can you try upgrading to the latest sentry-cli version and verifying that the inject command worked for you? Thanks!

new sentry-cli generates contain debugId 企业微信截图_1691495070233 but cannot be mapped directly to source-map

Again, it seems like your sourcemap file did not contain a debug_id the moment you uploaded it. Can you make sure the injection command also injects a debug_id into your source maps? Thank you!

@MainPri
Copy link
Author

MainPri commented Aug 8, 2023

It looks like your uploaded source map doesn't contain a debug ID. Can you try upgrading to the latest sentry-cli version and verifying that the inject command worked for you? Thanks!

new sentry-cli generates contain debugId 企业微信截图_1691495070233 but cannot be mapped directly to source-map

Again, it seems like your sourcemap file did not contain a debug_id the moment you uploaded it. Can you make sure the injection command also injects a debug_id into your source maps? Thank you!

I searched the Artifact Bundle using the debugId and found that the file could be retrieved normally, but the corresponding mapping source was not. Therefore, do you need to have debugids in "/js/ chunk-4A99c937.04c16250.js.map" and "/js/chunk-4a99c937.04c16250.js"?
image

@lforst
Copy link
Member

lforst commented Aug 8, 2023

It looks like your uploaded source map doesn't contain a debug ID. Can you try upgrading to the latest sentry-cli version and verifying that the inject command worked for you? Thanks!

new sentry-cli generates contain debugId 企业微信截图_1691495070233 but cannot be mapped directly to source-map

Again, it seems like your sourcemap file did not contain a debug_id the moment you uploaded it. Can you make sure the injection command also injects a debug_id into your source maps? Thank you!

I searched the Artifact Bundle using the debugId and found that the file could be retrieved normally, but the corresponding mapping source was not. Therefore, do you need to have debugids in "/js/ chunk-4A99c937.04c16250.js.map" and "/js/chunk-4a99c937.04c16250.js"? image

Correct, you need the debug IDs in your JS file AND in your source map.

@MainPri
Copy link
Author

MainPri commented Aug 8, 2023

It looks like your uploaded source map doesn't contain a debug ID. Can you try upgrading to the latest sentry-cli version and verifying that the inject command worked for you? Thanks!

new sentry-cli generates contain debugId 企业微信截图_1691495070233 but cannot be mapped directly to source-map

Again, it seems like your sourcemap file did not contain a debug_id the moment you uploaded it. Can you make sure the injection command also injects a debug_id into your source maps? Thank you!

I searched the Artifact Bundle using the debugId and found that the file could be retrieved normally, but the corresponding mapping source was not. Therefore, do you need to have debugids in "/js/ chunk-4A99c937.04c16250.js.map" and "/js/chunk-4a99c937.04c16250.js"? image

Correct, you need the debug IDs in your JS file AND in your source map.

I check the local source-map file and find that some files do not have debugid. However, when I run sentry-cli again to generate debugid, the following information is displayed
image
I operate the procedure, refer to the above "Steps to Reproduce", So I dont kown How to operate

@lforst
Copy link
Member

lforst commented Aug 8, 2023

As the log message indicates, you already injected into those files. You should rebuild your project and inject again.

@MainPri
Copy link
Author

MainPri commented Aug 9, 2023

As the log message indicates, you already injected into those files. You should rebuild your project and inject again.

After I rebuild the project, I find that debugid is still added only in compressed js, but not in corresponding source-map. Therefore, can debugid be injected into both js and js.map files when inject is executed?
image

The following errors also occur frequently
image
Actually not very large
image

@lforst
Copy link
Member

lforst commented Aug 9, 2023

This means that Sentry CLI can't find the source maps for the minified files. Is there a source mapping url comment at the bottom of your minified files and is it correct when just lying around in your local file system?

Actually not very large

14 MB is very large if sentry tries to fetch it.

@MainPri
Copy link
Author

MainPri commented Aug 10, 2023

This means that Sentry CLI can't find the source maps for the minified files. Is there a source mapping url comment at the bottom of your minified files and is it correct when just lying around in your local file system?

Actually not very large

14 MB is very large if sentry tries to fetch it.

Thanks! Probably solved the problem,Because I tried to use webpack to cut the file when packaging, and now it can be mapped normally, but I still did not see the debugId in the "xxx.js.map." Because I think the compressed file has the debugId and the sourceMappingURL, then the compressed file should be able to directly find the "xxx.js.map" file, so it is not necessary to have the debugId in the "xxx.js.map" file. In the next few days, I will observe whether the new project access can be mapped successfully。

@getsantry
Copy link

getsantry bot commented Sep 1, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot closed this as completed Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants