cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.42k stars 594 forks source link

🚀 Feature Request: Allow local Service Bindings to proxy to a `wrangler dev --remote` session #5578

Open thipperz opened 2 months ago

thipperz commented 2 months ago

Describe the solution

When I try to acess a rpc Service Binding in my next-on-pages application:

Error: Cannot access 'ImageSearch' as we couldn't find a 'wrangler dev' session for service 'vectorize-worker' to proxy to.

As the error says, I should run wrangler dev to test locally and it works when running wrangler pages dev (it do not work with next dev but that is another story.

However, my "vectorize-worker" do need to access both Vectorize, and production R2 buckets.

For Vectorize, this means it needs wrangler dev --remote to work, as it says:

Vectorize bindings are not currently supported in local mode. Please use --remote if you are working with them.

And so does R2 non-preview buckets.

Then we can go back to my initial error: Error: Cannot access 'ImageSearch' as we couldn't find a 'wrangler dev' session for service 'vectorize-worker' to proxy to.

The only way out of my situtation would be if it could proxy to a "wrangler dev --remote" session too.

I hope this makes sense!

smallbraingames commented 5 days ago

Is this fixed yet? or does vectorize only work in prod still