Are Cached Types a Known Issue?

I am writing a backend canister smart contract in Typescript using Azle. I recently ran into an issue where I updated the type of a parameter that I passed into a function, generated new service files, deployed, and upon running the function on my Candid UI, I was getting an error that I was still using the previous type. Similar to this:

Candid decode error: “type mismatch: type on int32 but expected int8

I attempted to resolve this error by deleting .azle and .dfx but to no avail.

In order to resolve this error, I had to create completely new canisters.

Is this a known issue? Perhaps the canister is saving a cache somewhere?

Canisters don’t cache anything. It has to be a problem with the build setup or something along these lines. The only caching problem outside of the build process that I can imagine is that you may not have refreshed the Candid UI

Thank you for letting me know! I’ll take a look if I can replicate again. What is the best way to refresh the Candid UI? Would I refresh the webpage?

I don’t know much about the UI, but Shift+Refresh should certainly do the trick

1 Like