For some reason, dfx refuses to clean the state and I cannot reinstall the canisters - i.e. I end up with canisters that are not found.
In a terminal:
❯ sudo rm -r .dfx
❯ dfx start --clean
Running dfx start for version 0.20.0
Using project-specific network 'local' defined in /Users/daviddalbusco/projects/opensource/proposals.network/dfx.json
Initialized replica.
Dashboard: http://localhost:65088/_/dashboard
In another terminal
❯ dfx deploy internet_identity
Deploying:
All canisters have already been created.
Building canisters...
WARN: .did file for canister 'internet_identity' does not exist.
Installing canisters...
Deployed canisters.
❯ dfx canister call internet_identity init_salt
WARN: DEPRECATION WARNING: Cannot fetch Candid interface from canister metadata, reading Candid interface from the local build artifact. In a future dfx release, we will only read candid interface from canister metadata.
WARN: Please add the following to dfx.json to store local candid file into metadata:
"metadata": [
{
"name": "candid:service"
}
]
WARN: Cannot fetch Candid interface for init_salt, sending arguments with inferred types.
Error: Failed update call.
Caused by: Failed update call.
The replica returned a rejection error: reject code DestinationInvalid, reject message Canister qhbym-qaaaa-aaaaa-aaafq-cai not found, error code Some("IC0301")
As you can notice in the last error message, the canister is not found. I don’t think it’s related to candid, I got the similar issue for any canisters.