Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
3 tasks done
reichhartd opened this issue Jul 14, 2023 · 4 comments
Closed
3 tasks done

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

reichhartd opened this issue Jul 14, 2023 · 4 comments

Comments

@reichhartd
Copy link

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.

@AbhiPrasad
Copy link
Member

Hey @reichhartd - the Remix SDK does not support cloudflare workers atm for the backend (entry.server.tsx).

See #5610

@AbhiPrasad AbhiPrasad closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2023
@reichhartd
Copy link
Author

@AbhiPrasad Then it would be good if it is mentioned in the docs that @sentry/remix does not fully support Remix. Because this was not clear to me until now.
Because knowing this, I would have chosen a different Remix adapter when I created the project. It would be good if it is clear which adapter is supported and which is not.

@AbhiPrasad
Copy link
Member

Hey @reichhartd - you're right, we can def improve the docs! We have a GH issue for this that is being worked on atm, and I left your feedback in that issue.

getsentry/sentry-docs#7429

If you have any other docs feedback, please leave it in the above GH issue!

@huw
Copy link

huw commented Jul 21, 2023

@reichhartd I have this working fine, it’s a bit of a hack but I haven’t run into any major issues with it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants