Repository navigation
Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
7.53.1
Framework Version
Remix 1.16.1
Link to Sentry event
No response
SDK Setup
// entrypoint.client.ts
Sentry.init({
debug: true,
dsn: "XXX",
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.remixRouterInstrumentation(
useEffect,
useLocation,
useMatches
),
}),
new Sentry.Replay(),
],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
});// entrypoint.server.ts
Sentry.init({
debug: true,
dsn: "XXX",
integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!
});// root
function App() {
return (
<html lang="en" className="h-full bg-gray-100">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<Meta />
<Links />
</head>
<body className="h-full">
<IntlProvider locale={"en"}>
<Outlet />
</IntlProvider>
<ScrollRestoration />
<Scripts />
<LiveReload />
</body>
</html>
);
}
export default withSentry(App);Steps to Reproduce
export const action: ActionFunction = async ({ request }) => {
throw new Error("Sentry Error");
};- trigger action
When turning on debug, it will also give out
Sentry Logger [warn]: Remix SDK was unable to wrap your root because of one or more missing parameters.
Expected Result
Unhandled error that breaks actions or loaders should be reported to sentry
Actual Result
Nothing is reported to sentry
Metadata
Metadata
Assignees
Labels
No labels
Activity
Lms24 commentedon May 26, 2023
Hi @MoSattler thanks for writing in and thanks for the detailed information!
Hmm looks like something weird is going on. I can see that you're passing the three hooks needed to the routing instrumentation. but one of the 4 params required here,
https://github.com/getsentry/sentry-javascript/blob/9b875b114d285ae997d97b7093a9b5804b802fc1/packages/remix/src/performance/client.tsx#L102-L110
is missing. Maybe something funky happens to
_customStartTransaction, not sure...I'm not sure if this is related to the error not being caught, though.
We'll have to take a closer look at this but at the moment we're very busy with other issues (🔥 🚒 ). I'll backlog this with high prio so that we take a look at it soon.
Lms24 commentedon May 26, 2023
possibly related: #8200
MoSattler commentedon May 26, 2023
Thank you @Lms24!
Let me know if you need anything else from you side.
onurtemizkan commentedon Jun 1, 2023
Hi @MoSattler, thanks for the issue report!
This log is misleading and should not be on the server-side, so I opened a PR to fix it. (#8269)
I could not reproduce the bug locally, with the steps you mentioned in the report.
To trigger the action I used:
curl -X PUT http://localhost:3000\?indexAnd can see the thrown error from the
actionfunction is reported to Sentry.Is there a specific setup or deployment target where you are seeing this issue?
MoSattler commentedon Jun 1, 2023
Hi @onurtemizkan - I can reproduce it in 7.53.1, but it seems fixed in 7.54.0. I guess it was related to #8265.
Thank you for your help!