Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CloudFlare pages with NextJS support (specifically RSCs) #11920

Open
3 tasks done
steebchen opened this issue May 6, 2024 · 2 comments
Open
3 tasks done

CloudFlare pages with NextJS support (specifically RSCs) #11920

steebchen opened this issue May 6, 2024 · 2 comments

Comments

@steebchen
Copy link

steebchen commented May 6, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

@sentry/nextjs 7.113.0

Framework Version

@sentry/nextjs 7.113.0

Link to Sentry event

https://polar-lights.sentry.io/issues/5299066015/?project=4507178042589184&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=0

SDK Setup

import * as Sentry from '@sentry/nextjs'

Sentry.init({
  dsn: 'https://ec343f96933dc8a577ac9237c6907690@o1013545.ingest.us.sentry.io/4507178042589184',

  // Adjust this value in production, or use tracesSampler for greater control
  tracesSampleRate: 1,

  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false,
})

Steps to Reproduce

I'm not really sure if it's related to CloudFlare pages, but it's where I can reproduce not being able to see any errors produced by RSCs. Anyway, I just have this simply test route in app/sentry-example-page/page.tsx:

export const runtime = 'edge'	

export default async function Page() {
  throw new Error('Sentry Example API Route Error')
}

Expected Result

An error being reported in sentry.

Actual Result

No error is being reported in Sentry (except for a frontend error due to the error component being rendered, but the error info is missing here which is expected (see #9474)).

Interestingly, app router API routes are reported correctly, but RSC errors are not.

@lforst
Copy link
Member

lforst commented May 6, 2024

Hi, cloudflare pages are not supported by our official SDKs yet. You may want to look into https://github.com/robertcepa/toucan-js

@steebchen
Copy link
Author

steebchen commented May 6, 2024

Oh I see. Since it's "just" NextJS I figured it just works. Actually the frontend and the app dir API routes already work perfectly fine, just RSCs don't it seems (and I haven't tested if server actions work). Anyway this issue might then be considered official CloudFlare Pages with NextJS request. 😅 And thanks for the pointer to toucan-js!

@steebchen steebchen changed the title CloudFlare pages does not report app router / RSC errors CloudFlare pages with NextJS support (specifically RSCs) May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

2 participants