-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Error: "process is undefined" when using Cloudflare with Sveltekit (9.2.0) #15506
Comments
maybe @Lms24 knows anything about this? I read your new docs saying platform.env has to be used, however as stated above, I'm not using env vars whatsoever in the sentry config |
Hi, did you add the compat flag to your wrangler config? https://github.com/getsentry/sentry-docs/blob/0dd74191b9e3c032a8506657908274a3eea46bef/docs/platforms/javascript/guides/cloudflare/frameworks/sveltekit.mdx#2-cloudflare-configuration |
Yes, I've set it in the cloudflare dashboard. I've just downloaded (generated) a local wrangler.toml file and it had Edit: no difference |
Hi, thanks for writing in! This sounds a bit strange to me as I wasn't aware that We do access sentry-javascript/packages/sveltekit/src/server-common/utils.ts Lines 21 to 22 in fda7103
Without a stack trace it's hard to tell but maybe this is where things go wrong... I can add a guard for |
Any idea when i can try changes from your pr? Thanks @Lms24 |
Probably in the next days, since we wanted to cut another release this week anyway. If you want to try it before the next release, you can use |
I've used Is there a way I can verify the patch-package changes are published to cloudflare? I've added source maps to wrangler.toml but no stack trace in real time logs. I did some more testing. The error was not resolved when i removed initCloudflareSentryHandle and sentryHandle. The error however did stop when I removed the sentrySvelteKit() call in plugins array from vite.config.ts. And also some more notes, there is no error during build or publish of cloudflare preview env. However, when visiting the preview env I'm met with the error described above (and a 500 | Internal Error screen) |
I did some more testing. I added the config for sourceMapsUploadOptions with my org/project/auth token. No difference Previously i deleted sentry code in hooks.server.ts (issue remained), then deleted sentry config in vite.config.ts (no error). |
A PR closing this issue has just been released 🚀This issue was referenced by PR #15516, which was included in the 9.3.0 release. |
I updated to 9.3.0. Issue sadly not resolved. Any ideas what I can do to circumvent this, in the meantime? @Lms24 |
Same here! I get this error
|
It seems the error occurs where @Lms24 added a return if process undefined. Strange |
Hi, thanks for the additional information! I will take another look on Monday. I've been on PTO the last two days, so couldn't look at this after my last response. Btw, I don't mind the occasional tag but there's really no need to tag me in every response. We have internal tracking tools that make sure that your replies are seen. Thanks :) |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
9.2.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
Steps to Reproduce
Follow instructions in new docs, and instructions in the pr for cloudflare & sveltekit support
Publish to cloudflare.
Error is printed to console, viewed in Cloudflare Real-time Logs under Functions for the build.
Expected Result
No error occurs.
Actual Result
Error occurs. I am not using environment anywhere in the sentry setup, so I'm not sure why this issue is occuring.
Logs:
The text was updated successfully, but these errors were encountered: