Skip to content

[@sentry/remix] Cloudflare wrangler failed to start #8536

Closed as not planned
Closed as not planned
@reichhartd

Description

@reichhartd

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

Framework Version

Remix 1.18.1; React 18.2.0

Link to Sentry event

No response

SDK Setup

Client:

init({
    dsn: '',
    environment: 'stage',
    integrations: [
        new BrowserTracing({
            routingInstrumentation: remixRouterInstrumentation(useEffect, useLocation, useMatches),
        }),
        // Replay is only available in the client
        new Replay(),
    ],
    // Performance Monitoring
    tracesSampleRate: 1.0,
    /*
     * Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
     * tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
     */

    /*
     * Capture Replay for 10% of all sessions, plus for 100% of sessions with an error
     * 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.
     */
    replaysSessionSampleRate: 0.1,
    // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
    replaysOnErrorSampleRate: 1.0,
});

Server:

init({
    dsn: '',
    environment: 'stage',
    // Performance Monitoring
    tracesSampleRate: 1.0,
});

Steps to Reproduce

  1. npx create-remix@latest myapp --template cloudflare-pages
  2. cd myapp
  3. npm install --save @sentry/remix
  4. Configure Sentry according to the docs
  5. npm run dev

Note: The bug was introduced with version 7.58.0. A downgrade to 7.57.0 fixes the error.

Expected Result

Logs:

[mf:inf] Ready on http://127.0.0.1:8788/
[REMIX DEV] a5733a44 ready

Actual Result

Logs:

service core:user:worker: Uncaught Error: Some functionality, such as asynchronous I/O, timeouts, and generating random values, can only be performed while handling a request.
  at dornwtu7xd7.js:16634:20 in uuid4
  at dornwtu7xd7.js:17346:14 in generatePropagationContext
  at dornwtu7xd7.js:17183:276 in Scope
  at dornwtu7xd7.js:17354:31 in Hub
  at dornwtu7xd7.js:17552:124 in getGlobalHub
  at dornwtu7xd7.js:17549:10 in getCurrentHub
  at dornwtu7xd7.js:18069:13 in initAndBind

  at dornwtu7xd7.js:19258:3 in init
  at dornwtu7xd7.js:19301:6 in init2

✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions