getsentry / getsentry/sentry-javascript

Cannot upload Cloudflare worker.js sourcemaps when using OpenNext

Đang mở
#19,213 12 bình luận 0 reaction 1 người được giao Được @logaretm nhận Xem trên GitHub
Bug External Dependency Next.js State: Blocked
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

### Is there an existing issue for this?

- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [x] I have reviewed the documentation https://docs.sentry.io/
- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

### How do you use Sentry?

Sentry Saas (sentry.io)

### Which SDK are you using?

@sentry/nextjs

### SDK Version

10.34.0

### Framework Version

Next 15.5.9 (OpenNext + Cloudflare Workers)

### Link to Sentry event

https://dogs-unleashed-ab.sentry.io/issues/93718351/events/f3276ea43fa8497c8d2ff2f00fa645eb/

### Reproduction Example/SDK Setup

App is a Next 15.5.9 Pages app deployed via OpenNext to Cloudflare Workers.

Setup summary:

- Build: `opennextjs-cloudflare build`
- Wrangler build output: `wrangler deploy --outdir .wrangler-sourcemaps --upload-source-maps ...`
- Debug IDs injected: `sentry-cli sourcemaps inject .wrangler-sourcemaps`
- Upload: `sentry-cli sourcemaps upload --debug-id-reference --rewrite .wrangler-sourcemaps`
- Worker deployed using the same bundle (no re-bundling):
`wrangler deploy .wrangler-sourcemaps/worker.js --no-bundle ...`

Artifacts are uploaded and visible in Sentry, including `~/worker.js` and `~/worker.js.map` with Debug IDs.

### Steps to Reproduce

1. Deploy Next 15.5.9 using OpenNext on Cloudflare Workers.
2. Generate + upload sourcemaps for `worker.js` with Debug IDs (sentry-cli inject + upload).
3. Trigger an error in `getServerSideProps`.

### Expected Result

Readable stack traces mapped to original source (e.g., `pages/sentry-server-test.tsx`).

### Actual Result

Sentry still shows `worker.js` frames and says:

- “Stack frame doesn’t have Debug IDs”
- “Uploaded files not deployed”

Example (screenshot):

Image

### Additional Context

I can confirm:

- Debug IDs exist in `worker.js` and `worker.js.map`.
- The deployed worker file is the same artifact used for upload.
- Sentry release is set and consistent.

Seems like the runtime frames in the event don’t include Debug IDs, even though the bundle contains them. Is @sentry/nextjs (or OpenNext) stripping debug ID metadata in the runtime stack frames for Cloudflare Workers?

### Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.