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.
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 runningwrangler pages dev
(it do not work withnext 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!