-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: remixIssues related to the Sentry Remix SDKIssues related to the Sentry Remix SDK
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.73.0
Framework Version
Remix 2.0.1, React 18.2.0
Link to Sentry event
No response
SDK Setup
Not related
Steps to Reproduce
- Setup the custom server.mjs as instructed
const createSentryRequestHandler =
wrapExpressCreateRequestHandler(createRequestHandler);
app.all("*", createSentryRequestHandler({ build }));- Use defer and promise in
root.jsx
import { defer } from "@remix-run/node";
import { Await, Links, Meta, Outlet, Scripts, useLoaderData } from "@remix-run/react";
import { Suspense } from "react";
export const loader = () => {
return defer({
deferred: new Promise((r) => setTimeout(() => r(42), 1000)),
});
};
export default function App() {
const data = useLoaderData();
return (
<html>
<head>
<link rel="icon" href="data:image/x-icon;base64,AA" />
<Meta />
<Links />
</head>
<body>
<h1>Hello world!</h1>
<Suspense fallback={'Loading...'}>
<Await resolve={data.deferred}>
{(answer) => JSON.stringify(answer)}
</Await>
</Suspense>
<Outlet />
<Scripts />
</body>
</html>
);
}- Open browser at localhost:3000
Expected Result
Displays 42 on the page.
Actual Result
Displays {} on the page. Check the reproduction repo: https://github.com/hanayashiki/Sentry-Remix-Root-Loader-Deferred-Data-Reproduction
Metadata
Metadata
Assignees
Labels
Package: remixIssues related to the Sentry Remix SDKIssues related to the Sentry Remix SDK
Projects
Status
Waiting for: Product Owner