Closed
Description
Describe the bug
After integrating Sentry, we observed that wrangler fails to run the app in preview mode, resulting in a crash.
Steps to reproduce
Link to minimum reproduction.
- npm run preview
- When Wrangler shows Ready on http://localhost:8787, press b in the terminal to open the browser.
- The error will appear in the browser and terminal.
Expected behavior
The app should run without crashing.
@opennextjs/cloudflare version
@opennextjs/cloudflare@1.0.0-beta.2
Wrangler version
4.10.0
next info output
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 10
Binaries:
Node: 23.6.0
npm: 10.9.2
Yarn: N/A
pnpm: 7.14.2
Relevant Packages:
next: 15.2.5 // There is a newer version (15.3.0) available, upgrade recommended!
eslint-config-next: 15.2.5
react: 19.1.0
react-dom: 19.1.0
typescript: 5.8.3
Next.js Config:
output: N/A
Additional context
I also tested with @opennextjs/cloudflare@0.6.6 — the result was the same.
For Sentry, I tried both the manual setup from Sentry’s documentation and the server-side configuration mentioned in your OpenNext AWS docs. In both cases, the app still crashes when using preview mode with Wrangler.