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
I’m using vite-plugin-ruby with @sentry/vite-plugin to upload source maps for my Rails + Vite application, but the source maps are not being properly detected or linked in Sentry.
When I build the project (yarn build), the .map files are generated in ./public/assets, and my JavaScript files contain sourceMappingURL references. However, when I upload the source maps using sentry-cli, some files are missing proper source map references, and Sentry logs warnings like:
warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/action_cable-5212cfee.js)
Additionally, when running:
npx sentry-cli sourcemaps upload ./public/assets
--org="reelon-technologies-pvt-ltd"
--project="reelon"
--auth-token=$SENTRY_AUTH_TOKEN
I get an error:
error: Failed to process uploaded files: uploading a bundle without debug ids or release is prohibited
Steps to Reproduce
1. Set up vite.config.mts:
```
import { sentryVitePlugin } from "@sentry/vite-plugin";
import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I’m using vite-plugin-ruby with @sentry/vite-plugin to upload source maps for my Rails + Vite application, but the source maps are not being properly detected or linked in Sentry.
When I build the project (yarn build), the .map files are generated in ./public/assets, and my JavaScript files contain sourceMappingURL references. However, when I upload the source maps using sentry-cli, some files are missing proper source map references, and Sentry logs warnings like:
warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/action_cable-5212cfee.js)
Additionally, when running:
npx sentry-cli sourcemaps upload ./public/assets
--org="reelon-technologies-pvt-ltd"
--project="reelon"
--auth-token=$SENTRY_AUTH_TOKEN
I get an error:
error: Failed to process uploaded files: uploading a bundle without debug ids or release is prohibited
Steps to Reproduce
1. Set up vite.config.mts:
```
import { sentryVitePlugin } from "@sentry/vite-plugin";
import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'
export default defineConfig({
plugins: [
RubyPlugin(),
sentryVitePlugin({
org: "reelon-technologies-pvt-ltd",
project: "reelon",
authToken: process.env.SENTRY_AUTH_TOKEN,
})
],
build: {
sourcemap: true
}
})
import * as Sentry from "@sentry/browser";
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: false,
}),
],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
tracesSampleRate: 1.0,
});
console.log("✅ Sentry initialized on frontend with Replay");
Beta Was this translation helpful? Give feedback.
All reactions