-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
filesToDeleteAfterUpload : Could not determine source map path (Gatsby) #13582
Comments
Let's leave aside Can you try simply disabling the automatic adding of the plugin like we suggest here: sentry-javascript/packages/gatsby/README.md Lines 50 to 66 in a69da1b
I would do that as a first step and then see what the logs look like! |
Very good observation, what I didn't mention (to not add too much details), is that I'm using diff --git a/gatsby-node.js b/gatsby-node.js
index d60914a03061ef4599b2848abba44918cd5e1ece..ee7ff0f4e7773dd00b4c12f32049d0a42f4621e0 100644
--- a/gatsby-node.js
+++ b/gatsby-node.js
@@ -12,12 +12,14 @@ exports.onCreateWebpackConfig = ({ getConfig, actions }, options) => {
sentryWebpackPlugin({
sourcemaps: {
// Only include files from the build output directory
- assets: ['public'],
+ assets: ['./public/**'], // Workaround for Sentry not being able to find sourcemap files in the folder without glob pattern during building.
+ filesToDeleteAfterUpload: "./public/**/*.map",
// Ignore files that aren't users' source code related
ignore: [
'polyfill-*', // related to polyfills
'framework-*', // related to the frameworks (e.g. React)
'webpack-runtime-*', // related to Webpack
+ '**/~partytown/**', // Specific to partytown
],
},
// Handle sentry-cli configuration errors when the user has not done it not to break
|
(Just leaving this reply to satisfy our internal issue response tracking tool) Hi, This will be fixed via #13592 |
Neat! One less thing for our yarn patch.
|
Did you try disabling the webpack plugin from our Gatsby package in favour of the one you added as suggested here? |
#13582 (comment) correctly identified that this path is messed up.
Same exact output as before :( , I have the logs but they are the same as in the description. I changed this: If I just remove Let me know If I can provide anything else |
Hi, I could reproduce your problem. My hunch is that gatsby is reusing the plugin for 2 build stages and the maps for stage 2 are deleted by the plugin from stage 1 or something like that. My recommendation for now is to not use the I will backlog this issue. |
This would ease the workflow whenever we want to use |
Related #13582 This work adds the `deleteSourcemapsAfterUpload` option to the Gatsby plugin, allowing it to be passed to the Webpack plugin to set the `sourceMapFilesToDeleteAfterUpload` without exposing the API. This simplifies our workflow by eliminating the need to apply a Yarn patch to modify the package whenever we want to use `filesToDeleteAfterUpload`. Before submitting a pull request, please take a look at our [Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md) guidelines and verify: - [x] If you've added code that should be tested, please add tests. - [x] Ensure your code lints and the test suite passes (`yarn lint`) & (`yarn test`). --------- Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/gatsby
SDK Version
8.28.0
Framework Version
React 18.3.1, Gatsby 5.11, webpack-plugin 2.22.3
Reproduction Example/SDK Setup
gatsby-node.js
Netlify logs
Steps to Reproduce
✅
filesToDeleteAfterUpload
.❌
filesToDeleteAfterUpload
.Expected Result
Source maps fully uploaded to Sentry with errors traceable.
Actual Result
No source maps neither on Server or Sentry.
The text was updated successfully, but these errors were encountered: