Skip to content

Remix ReactDOMServer does not yet support Suspense #8200

Closed
@jamesgrogantech

Description

@jamesgrogantech

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

7.53.0

Framework Version

React 17.0.2, Remix 1.16.0

Link to Sentry event

SDK Setup

entry.server.tsx

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  tracesSampleRate: 1.0,
  integrations: [new Sentry.Integrations.Prisma({ client: prisma })],
  environment: process.env.ENVIRONMENT_TYPE,
});

Steps to Reproduce

  1. I add the Sentry.init to the entry.server.ts file
  2. I start the development server (this occurs in production also)
  3. I make a request to the development server from the browser

Expected Result

I expect Sentry to not interfere with the request handler.

Actual Result

I get this error when I make a request to the application:

Error: ReactDOMServer does not yet support Suspense.
    at ReactDOMServerRenderer.read ({redacted}/node_modules/react-dom/cjs/react-dom-server.node.development.js:3704:25)
    at renderToString ({redacted}/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at handleRequest ({redacted}/app/entry.server.tsx:48:5)
    at {redacted}/node_modules/@sentry/src/utils/instrumentServer.ts:136:1
    at handleDocumentRequestRR ({redacted}/node_modules/@remix-run/server-runtime/dist/server.js:186:18)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at requestHandler ({redacted}/node_modules/@remix-run/server-runtime/dist/server.js:49:18)
    at {redacted}/node_modules/@sentry/src/utils/instrumentServer.ts:355:1
    at {redacted}/node_modules/@remix-run/express/dist/server.js:39:22

I am not using Suspense anywhere in the application.I am using Sentry in the client with no issues at all, but as soon as I add it to the server I get this error.

I tried to turn on the Sentry Debug and got this warning at the same time so I wonder if it's related:
Sentry Logger [warn]: Remix SDK was unable to wrap your root because of one or more missing parameters.
There is discussion about this particular warning here #6951, but they don't seem to be experiencing the Suspense error.

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

Labels

Package: remixIssues related to the Sentry Remix SDK

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions