You are facing the issue locally or on mainnet or on both?
If only on mainnet, for what it’s worth, I faced the issue only once and it resolved itself after some time, so I just assumed I faced some networking mumbo jumbo .
Locally I never faced it so not sure what can be the issue. If that’s the case, did you update anything recently before the issue started popping up? If so, have you tried reverting your changes?
I don’t know how to resolve it, but as I said above, given that the only time it happened to me it kind of resolved by itself, I would wait a bit unless you’ve been facing the issue for days or hours. Other than that, I don’t really know unfortunately.
It sounds like you’re hitting a CBOR encoding error that only appears outside your local environment, which usually points to differences in data formatting, environment settings, or dependencies between local and deployed setups. A few things to check: make sure the data you’re encoding doesn’t contain undefined or circular values, verify that the versions of your CBOR libraries match in both environments, and confirm that any environment-specific config (like NODE_ENV or serialization settings) isn’t affecting the input. Logging the exact value that triggers the failure can also help pinpoint what’s causing the range error.
For more context, there’s a related thread on the same forum about serializing objects into CBOR in Motoko that might help you understand how CBOR encoding should be structured when making requests: https://forum.dfinity.org/t/how-do-i-serialize-an-object-into-cbor-format-in-motoko/26739/12