Skip to content

9.15.0 breaks Cloudflare SDK usage in sentry-mcp #16182

Open
getsentry/sentry-mcp
#195
@AbhiPrasad

Description

@AbhiPrasad

Description

getsentry/sentry-mcp#136

3:24:55 PM [vite] Internal server error: Cannot read from private field
@sentry/mcp-cloudflare:dev:       at async ProxyServer.fetch (file:///home/dcramer/src/sentry-mcp/node_modules/.pnpm/miniflare@4.20250428.0/node_modules/miniflare/src/workers/core/proxy.worker.ts:173:11)
^C    ...Finishing writing to cache...   

AI summary:

Based on the code and error message, I can identify the issue. The error is occurring because there's a conflict between how Miniflare (the local development environment for Cloudflare Workers) handles private fields and how the Sentry SDK is trying to access them.

This suggests that the issue is related to how Miniflare v4 handles private fields in its proxy implementation, and how the Sentry SDK is trying to access these fields through its proxy wrapper.
Here are a few potential solutions:

  1. Update Miniflare to a newer version if available, as this might be a known issue that's been fixed.
  2. Modify the proxy implementation in the Sentry SDK to handle private fields differently.
  3. Use a different approach for wrapping the fetch handler that doesn't rely on accessing private fields.

I think we should try catch it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions