Workers SDK Issue Reports

← Back to Dashboard

#8510 `getPlatformProxy` invariant behavior with RPC targets

Recommendation:KEEP OPEN
Difficulty:medium
Reasoning:

Maintainer-confirmed bug: getter properties on RpcTarget not handled correctly by getPlatformProxy(). Working via wrangler dev but not via proxy. No PRs or changelog entries fix this. Issue acknowledged March 2025.

Suggested Action:

Verify if fixed on latest wrangler 4.60.0; investigate RpcProperty getter handling in miniflare proxy.worker.ts

Analysis Report

Issue #8510: getPlatformProxy invariant behavior with RPC targets

Summary

Field Value
Issue #8510
Title getPlatformProxy invariant behavior with RPC targets
State OPEN
Created 2025-03-15
Updated 2025-10-30
Labels bug
Reporter Version Wrangler 4.0.0
Current Version Wrangler 4.60.0

Problem Description

The reporter is trying to access a method on an RPC target through a service binding using getPlatformProxy(). When calling a method on an RpcTarget returned from a getter property, the following error occurs:

TypeError: proxy.env.WORKER_A.foo.getFoo is not a function

The issue is that:

  • await proxy.env.WORKER_A.foo returns [Function: foo]
  • await proxy.env.WORKER_A.getBar() works correctly (returns "bar")
  • await proxy.env.WORKER_A.foo.getFoo() throws TypeError

The same code works correctly when running via wrangler dev on actual workers.

Analysis

Maintainer Response

A maintainer (dario-piotrowicz) acknowledged the issue on 2025-03-17 and indicated the problem is likely caused by foo being a getter, with the proxy not returning the correct value in that case.

Related PRs Searched

  • PR #6301 (merged 2024-07-30): "fix: allow getPlatformProxy to handle RPC calls returning objects" - This fixed issues with RpcProperty handling but predates this issue
  • PR #10249 (merged 2025-08-15): "Support JSRPC for remote bindings" - Major RPC improvements but doesn't specifically mention getter handling

Changelog Search

  • No mention of issue #8510 in wrangler or miniflare changelogs
  • No PRs found that directly reference this issue number

Version Gap

  • Reporter used Wrangler 4.0.0
  • Current version is 4.60.0 (significant gap with many releases)

Recommendation

KEEP OPEN - This issue should remain open because:

  1. Acknowledged by maintainer: The issue was confirmed by a Cloudflare team member who identified the likely root cause (getter property handling)
  2. No fix found: No PRs reference this issue, and the issue number doesn't appear in changelogs
  3. Valid bug: The behavior difference between getPlatformProxy() and actual wrangler dev represents a genuine local development parity issue
  4. Reproduction available: The reporter provided a minimal reproduction repository

Suggested Actions

  1. Verify with current version: The reporter or maintainers should test with Wrangler 4.60.0 to see if any of the RPC improvements have inadvertently fixed this
  2. Prioritize fix: Given the impact on local development workflows involving RPC targets with getter properties, this warrants attention
  3. Consider labeling: May benefit from additional labels like miniflare or local-dev for better triage

Verdict

Recommendation Confidence Reason
KEEP OPEN High Maintainer-acknowledged bug with no evidence of a fix

Notes & Feedback (0)

No notes yet.

Add Note