You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@doc-sheet It appears that you are misusing the --ext argument in the "Steps to Reproduce" here. The --ext argument specifies the file extensions of JavaScript source files that you would like to have injected. By default, we include .js, .cjs, and .mjs; setting the --ext overrides this default. However, regardless of whether you pass --ext and regardless of what you set --ext to, we always inject Debug IDs into .map files if we find a corresponding source file.
In fact, I believe the expected behavior of running the "Steps to Reproduce" command that you have provided would be for no Debug IDs to be injected anywhere. We only inject debug IDs into the sourcemaps after first finding the corresponding source file, which we will not find because you specified that we should only look for JS source files with the .js.map extension, which is not a valid extension for JS source files.
So, in your case, I would recommend re-evaluating what you are trying to do with the command, because even with a bug fix, you will not achieve your expected result. I would be happy to point you in the right direction, if you explain what you are trying to achieve here by passing --ext=.js.map.
That being said, although --ext should not be used in the way you are attempting to use it here, this is in fact a bug. Thank you for reporting it!
Since the fix was relatively simple, I have already made a PR to solve the problem and enable complex extensions.
Hi!
My actual problem was with sentry-cli sourcemaps upload --ext=js --ext=map --ext=js.gz --ext=map.gz ...
But since inject and upload use the same search engine and inject is way easier to reproduce in networkless container I used it as an example.
Sorry for confusing js.map - it just came in mind first.
Now I'm trying workaround like --ext=js --ext=map --ext=gz (I guess in my case it's enough), but that error kinda surprised me so I decided to report it.
You are welcome, @doc-sheet. Specifying --ext=map is always unnecessary with sourcemaps inject, but for sourcemaps upload you indeed need to add it.
But, thank you for letting me know that your original problem was with sourcemaps upload; I will make sure that my fix works with sourcemaps upload as well.
Activity
szokeasaurusrex commentedon Mar 11, 2024
@doc-sheet It appears that you are misusing the
--extargument in the "Steps to Reproduce" here. The--extargument specifies the file extensions of JavaScript source files that you would like to have injected. By default, we include.js,.cjs, and.mjs; setting the--extoverrides this default. However, regardless of whether you pass--extand regardless of what you set--extto, we always inject Debug IDs into.mapfiles if we find a corresponding source file.In fact, I believe the expected behavior of running the "Steps to Reproduce" command that you have provided would be for no Debug IDs to be injected anywhere. We only inject debug IDs into the sourcemaps after first finding the corresponding source file, which we will not find because you specified that we should only look for JS source files with the
.js.mapextension, which is not a valid extension for JS source files.So, in your case, I would recommend re-evaluating what you are trying to do with the command, because even with a bug fix, you will not achieve your expected result. I would be happy to point you in the right direction, if you explain what you are trying to achieve here by passing
--ext=.js.map.That being said, although
--extshould not be used in the way you are attempting to use it here, this is in fact a bug. Thank you for reporting it!Since the fix was relatively simple, I have already made a PR to solve the problem and enable complex extensions.
doc-sheet commentedon Mar 11, 2024
Hi!
My actual problem was with
sentry-cli sourcemaps upload --ext=js --ext=map --ext=js.gz --ext=map.gz ...But since inject and upload use the same search engine and inject is way easier to reproduce in networkless container I used it as an example.
Sorry for confusing
js.map- it just came in mind first.Now I'm trying workaround like --ext=js --ext=map --ext=gz (I guess in my case it's enough), but that error kinda surprised me so I decided to report it.
Thank you for fix!
szokeasaurusrex commentedon Mar 12, 2024
You are welcome, @doc-sheet. Specifying
--ext=mapis always unnecessary withsourcemaps inject, but forsourcemaps uploadyou indeed need to add it.But, thank you for letting me know that your original problem was with
sourcemaps upload; I will make sure that my fix works withsourcemaps uploadas well.fix(sourcemaps): allow complex file extensions (#1976)