Comments (30)
Hi, we need more information!
- You mention a previous version of the plugin. Which one? What did your previous setup look like?
- What exactly does not work? Can you share a Sentry event?
- What do you mean by CDN? What is hosted on a CDN?
You are probably better off just using sourcemaps.assets: './dist/assets/**'
instead of using uploadLegacySourcemaps
.
from sentry-javascript-bundler-plugins.
- we before use @sentry/webpack-plugin": "^1.20.0, @sentry/react": "7.44.2" but current use @sentry/vite-plugin": "^2.14.2, @sentry/react
- sry we are use self hosted sentry environment
3.We are distributing our React project using CDN.
from sentry-javascript-bundler-plugins.
Please try using sourcemaps.assets: './dist/assets/**'
and updating your self hosted instance. Thank you!
Also, would you mind answering the rest of my questions? Thanks.
What did your previous setup look like?
What exactly does not work?
from sentry-javascript-bundler-plugins.
Please try using sourcemaps.assets: './dist/assets/**' and updating your self hosted instance. Thank you!
The methods are not the same either.
What did your previous setup look like?
I used sentry Webpack plugin
![스크린샷 2024-03-07 오후 8 04 08](https://private-user-images.githubusercontent.com/7166022/310854368-6576c2bd-2426-462c-bb1d-287df63a7a2b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDg1NDM2OC02NTc2YzJiZC0yNDI2LTQ2MmMtYmIxZC0yODdkZjYzYTdhMmIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWVhNTg2NjVkN2RlOWYzNzU5ZWUyYWVjNTEzYTg0MGJmNWU3YTMxMmNmOTAxZmE0Y2M0ZWEyMWNhNTZjNTM1MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ZbweBS-QRQyp_douXZBLmlfvKCs_Hc0UbhcBx7m_hU0)
What exactly does not work?
Source map upload is possible. However, when catching an error, it does not capture the location of the error source. like below
![image](https://private-user-images.githubusercontent.com/7166022/310854886-966a6a96-50a1-4216-94c4-9fa9d9d73454.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDg1NDg4Ni05NjZhNmE5Ni01MGExLTQyMTYtOTRjNC05ZmE5ZDlkNzM0NTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDgyZTg4NTk5YTA2N2U2YzQ0OGU0Nzg4NThmOTg2MDM2ZWMyMjAwZGRmZGU3YThiYTk4OWNiMTk4M2Q3ZjZkZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.LJntPD48NSZC29_DQIm47Y119ICOMKdJxfMeOaBAeP4)
from sentry-javascript-bundler-plugins.
Is there a way to specify the urlPrefix using only the uploadLegacySourcemaps field without using the debug id?
If it is possible to do so, even if it means lowering the version, I would like to do so.
Uploading a self-hosted version of Sentry is a bit burdensome for our company, so we would like to avoid it as much as possible
from sentry-javascript-bundler-plugins.
Is there a way to specify the urlPrefix using only the uploadLegacySourcemaps field without using the debug id?
Yes. Set sourcemaps.assets
to []
.
To me, it looks like you are not using the same options as before. You should literally be able to dump your previous webpack plugin options into uploadLegacySourcemaps
and it should work. You need to also set realease names. Please follow this troubleshooting guide https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/legacy-uploading-methods/
Also, if you're not upgrading your self-hosted instance this is incredibly difficult to debug. Newer self-hosted versions will help you debug source maps issues from within the interface.
from sentry-javascript-bundler-plugins.
Currently I am using sentryVitePlugin in webpack. Are these also the same?
from sentry-javascript-bundler-plugins.
Why are you using the sentryVitePlugin with Webpack? You should use @sentry/webpack-plugin
when you use webpack.
from sentry-javascript-bundler-plugins.
I'm sorry for causing you to misunderstand. Previously, I used webpack, but as I switched to Vite, I was changing the sentry settings and I am talking about the issues that arise as a result.
![image](https://private-user-images.githubusercontent.com/7166022/310864589-394219be-129a-4d94-8711-4cf296348956.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDg2NDU4OS0zOTQyMTliZS0xMjlhLTRkOTQtODcxMS00Y2YyOTYzNDg5NTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGI5OTlhMTMzM2M2YzViN2VlZWRhNjc2YTk2MDNjZGJhM2MxMzFkOGVkMDY5OGFkMDYyMDU0NjVlMzIxZGUzNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.p_wpYUpQdLeTj5j-LJAX8kkbmrbZa_C1JJstm_6iBEs)
I want to check if I understand Sentry well. If you are receiving js from a path like CDN address/project name/assets as above, isn't it correct to set the uploadLegacySourcemaps setting during sentryvite settings as shown in the code below?
![image](https://private-user-images.githubusercontent.com/7166022/310865515-cf4888e7-cad0-4f6f-a836-8854c6c0f04f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDg2NTUxNS1jZjQ4ODhlNy1jYWQwLTRmNmYtYTgzNi04ODU0YzZjMGYwNGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWJlNDMzMWE0YTA4YjQ1NTZmZjA4OWVjZTMxM2UyNmYyZTk0NzAzZGY1NmNlNWVjOTE3ZDgwNGIyNmVjM2IwZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.-SFjS_cOpmisAtBLHMLn37Nlw5w31BrTXScIxUQfZLM)
from sentry-javascript-bundler-plugins.
From your screenshot it looks like you had it configured as
{
include: 'dist',
urlPrefix: '~/upbit-nft'
}
why don't you try?
sentryVitePlugin({
debug: true,
// your other options here! ...
release: {
uploadLegacySourcemaps: {
paths: ['dist'],
urlPrefix: '~/upbit-nft'
}
}
})
from sentry-javascript-bundler-plugins.
The reason is that when building with webpack, there were js files directly in the dist folder, but after building with vite, js files were created in the dist/assets folder. and even if you do what you said, it still doesn't work as shown in the picture below.
![image](https://private-user-images.githubusercontent.com/7166022/310871988-dcac8149-1482-43de-ad52-adb11b3a16f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDg3MTk4OC1kY2FjODE0OS0xNDgyLTQzZGUtYWQ1Mi1hZGIxMWIzYTE2ZjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjUxNTc4YTk5NWU0MjAxMDM0MDczZTBkN2VmMjAxZTdkZWM0NWU2NzhlODk4OWRmYzk4OWYxNmMwN2ZiOTQ1NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.1BtrmkHvVtxHU6R_F3V-mdqim0q8jRSZSCqovi1ADRY)
from sentry-javascript-bundler-plugins.
Are there any examples using the CDN + vite + sentry-vite plugin? I think many vite users are probably experiencing the same issue as me. Our front team tried to solve the issue, but we couldn't solve it, so we want to check if this works.
from sentry-javascript-bundler-plugins.
Do I have to set the release version unconditionally? I'm asking because in the previous webpack plugin, it worked fine without specifying a release version name.
from sentry-javascript-bundler-plugins.
I have a very hard time debugging this with you because I lack a ton of information about your setup, what you upload to Sentry and how your events look. Please understand that I won't be magically able to solve this issue for you.
I personally do not think many people run into this particular issue, rather it is a config issue on your end. Please go through the troubleshooting guide: docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/legacy-uploading-methods because I have a feeling you haven't done that.
from sentry-javascript-bundler-plugins.
It would be nice to have at least one example. There seems to be an issue with many developers on the team going through so much trial and error after seeing the official link and ultimately failing to link it. When you have time, it would be nice to have an example using vite + sentryVite + cdn. However, our project settings probably won't work because we don't do much different from the default settings.
from sentry-javascript-bundler-plugins.
If you need more information, we will do our best to get it.
from sentry-javascript-bundler-plugins.
If you need more information
Yes please, like I asked before, please provide:
- What you upload to your Sentry instance.
- A Sentry event that isn't source mapped. Ideally the payload.
- Everything in your build config.
Best case, you provide a reproduction repository.
Additionally, please share build logs when setting debug: true
.
from sentry-javascript-bundler-plugins.
What you upload to your Sentry instance.
A Sentry event that isn't source mapped. Ideally the payload.
I think a detailed explanation of these two items is needed.
from sentry-javascript-bundler-plugins.
Oh wait, I think I figured out the cause. Let's test it out for a moment.
from sentry-javascript-bundler-plugins.
What you upload to your Sentry instance.
A Sentry event that isn't source mapped. Ideally the payload.
I think a detailed explanation of these two items is needed.
We outline all of these very detailed here https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/legacy-uploading-methods/
from sentry-javascript-bundler-plugins.
@lforst I found out. It does not work if you use the chunk function of rollup. After deleting the option shown in the picture below, the source is captured. However, chunk seems to be essential to reduce the size of the entire file. Is there a way to ensure that the source can be found accurately even when applying the chunk option?
![image](https://private-user-images.githubusercontent.com/7166022/310896938-f5f0fb96-90f1-48b3-9338-8fe1056a8c60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDg5NjkzOC1mNWYwZmI5Ni05MGYxLTQ4YjMtOTMzOC04ZmUxMDU2YThjNjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGUyMjdkOWRhYjgzNDY0ZDU1NmU1ODAxYTVmY2YyN2MwZjE1NTczODExNjQ2YmY2MTYyY2I0MTRlNjA3OGUwNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.jQ4N07WeLoiw03-QOumtJ5uWGwTjHNn9OaZbG9-9pdQ)
from sentry-javascript-bundler-plugins.
Is there a way to ensure that the source can be found accurately even when applying the chunk option?
I don't understand what you mean by that. You are responsible yourself for specifying the correct files with the paths
option and for matching the stack frames with the uploaded artifacts.
from sentry-javascript-bundler-plugins.
The problem was the manualChunks option for creating chunk files in the rollupOptions item in the vite.config.ts configuration file. If you remove that option, the sourcemap will load normally.
However, the process of creating a chunk file seems essential for fast loading. Is it possible to make sourcemap work well even if there is a chunk file in sentry?
from sentry-javascript-bundler-plugins.
You need to include the chunks in your uploaded files
from sentry-javascript-bundler-plugins.
we are already includes chunk files...
![image](https://private-user-images.githubusercontent.com/7166022/310917086-3c056e26-b8d1-4d2e-8f1d-f0a42b5397c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDYzOTksIm5iZiI6MTcyMDA0NjA5OSwicGF0aCI6Ii83MTY2MDIyLzMxMDkxNzA4Ni0zYzA1NmUyNi1iOGQxLTRkMmUtOGYxZC1mMGE0MmI1Mzk3YzcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMjIzNDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTFjZDUyM2U1ZTgxNGJiNWE0NmQwNzBiYmNkNDBjNDJlMDU2ZDhiMzRjYWIyYzI5MWUyYjJlZjI5NWQ5NDcwZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ggVxMmaIJvmmeylLv_n2Mmh1QrfsbVUIfdO66q4TqNo)
from sentry-javascript-bundler-plugins.
Sorry to keep asking, but are there any guidelines for operation when using manualChunks for optimization among rollupOptions in Vite? We need that functionality to use sentry even in the changed vite environment.
I also used chunk when using webpack, and there was no issue like this at that time.
from sentry-javascript-bundler-plugins.
You successfully uploaded the chunks to Sentry. Now you need to match stack frames to the file names with the rewriteFramesIntegration
!
from sentry-javascript-bundler-plugins.
I read the documentation for rewriteFramesIntegration, but I didn't really understand how to use it. I think it would be good to be more detailed.
As I understand it, if urlPrefix is ~/{path1}/${path2}
rewriteFrames({
prefix: ~/${path1}/${path2}
})
Can I do it like this?
from sentry-javascript-bundler-plugins.
I tried both methods below, but they don't work.
rewriteFrames({
prefix: ~/${path1}/${path2}
})
rewriteFrames({
root: ~/${path1}/${path2}
})
from sentry-javascript-bundler-plugins.
I changed it to using sentry cli directly and it seems to work well. This issue is closed. Thank you for responding to the issue together.
from sentry-javascript-bundler-plugins.
Related Issues (20)
- `sourcemaps.rewriteSources` doesn’t apply new source value HOT 8
- Upload sourcemaps for multiple environments HOT 10
- `isOlderThan` is not a function HOT 9
- [Help]: Change project release details for uploaded sourcemaps HOT 2
- Dont log warnings when certain features are disabled
- Esbuild Crash Warning HOT 3
- `moduleMetadata` and or `moduleMetadataIntegration` do not work with `vite-plugin` HOT 6
- Source Maps not loading on sentry HOT 15
- Unclear how to make Sentry work with Vite + React sourcemaps HOT 4
- Nuxt with sentryVitePlugin: Cannot read properties of undefined (reading 'startsWith') HOT 5
- Vite plugin logging to stdout instead of stderr HOT 2
- Cannot build with Vite and latest sentry plugin version HOT 13
- sentry does not consider sourcemaps HOT 5
- esbuild plugin causing error in Nx Angular CLI (angular 17) HOT 1
- `filesToDeleteAfterUpload` is deleting files before upload in latest versions HOT 4
- can not disable soucemap HOT 3
- sentry/webpack-plugin upload sourcemap oom HOT 5
- Sentry sourcemap use `@vitejs/plugin-legacy` and `@sentry/vite-plugin` conflict. HOT 16
- JavaScript heap out of memory, after adding Sentry to my Vite-React Project - GitLab HOT 3
- Invalid org token in Vite build HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-javascript-bundler-plugins.