Debugging service binding

Hey folks, I have a service binding I call like this:
const result = await ctx.runtime.env.CRYPTO.encrypt(arg)
const result = await ctx.runtime.env.CRYPTO.encrypt(arg)
The service is bound on my pages project, but I get this:
TypeError: ctx.runtime.env.CRYPTO.encrypt is not a function
TypeError: ctx.runtime.env.CRYPTO.encrypt is not a function
I can confirm the encrypt method is on the class when I do edit code. I'm kind of at a loss for what else to try.
1 Reply
Walshy
Walshy2mo ago
make sure you have your service binding setup correctly to point to your entrypoint - https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/rpc/ if you can share your config and code we could help spot where it isn't setup right
Want results from more Discord servers?
Add your server