One of my favorite new dfx features is the candid assist functionality that helps developers fill out arguments when calling an endpoint via `dfx canister --ic call <canister_name> <endpoint_name>.
Just recently I noticed this feature starting to fail with the following error:
WARN: Cannot fetch Candid interface for <endpoint_name>, sending arguments with inferred types.
This was working earlier this week, so not sure what might have changed
I deployed the canister using Motoko, so it should show up automatically, right? I’m pretty sure that Motoko doesn’t have a good way to hide specific endpoints (although that would be a nice feature to have )
This is with dfx 0.21.0 btw. I did however just install dfxvm 0.24.0 on another project to play around a bit before I started having this issue
Yes, should be automatic unless you customize the metadata in dfx.json. You can double check the did file by calling dfx canister metadata <canister_id> candid:service
Looks like it’s absent? Weird…I haven’t deployed anything recently. Feels like this could be a breaking issue with installing dfx 0.24.0 with dfxvm elsewhere (different repo) and then reverting back to 0.21.0 (the dfx version currently in this project’s dfx.json).
Error: Failed to read `canidid:service` metadata of canister <my_canister>.
Caused by: The lookup path ([63616E6973746572, 00000000016061D50101, 6D65746164617461, 63616E696469643A73657276696365]) is absent in the certificate.
For clarity, I installed dfx 0.24.0 to play around in project B (different project), then I noticed candid assist stopped working there, and when I came back to project A fetching metadata no longer seems to be working.
candid:service is just the custom section name in the Wasm module, so it won’t show up in --help. One way you can try is to use ic-wasm a.wasm metadata or ic-wasm a.wasm info to list the custom sections.
For the missing metadata, maybe it’s in a different network, e.g., local vs mainnet?