Skip to content

Unable to initialize on server infrastructure (backend use-case) #10349

@kpujjigit

Description

@kpujjigit

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.91.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

Sentry.init({

dsn: 'https://<dsn>@<dsn>.[ingest.sentry.io/](http://ingest.sentry.io/)<dsn>,

tracesSampleRate: 1,

environment: process.env.QB_HOST,

});

Steps to Reproduce

  1. Initialize SDK
  2. Send in events
  3. Receive the below error from the server:

"TypeError","stack":"TypeError: pkg.matchRoutes is not a function

Expected Result

Able to send and process events.

Actual Result

It fails on the first request.
Build steps are fine, and requests to that express server on non-remix-served routes (where sentry is not initialized) work as expected.
When making a request to a remix-served route, we see the browser return with a 500 & “Internal server error” page, along with that stacktrace in the logs.

Metadata

Metadata

Assignees

Labels

BugPackage: remixIssues related to the Sentry Remix SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions