I have a little issue breaking my deplyment pipelines since migrating to dfx 12.1. dfx deploy --network=xxx works fine to deploy all the canisters
Yet, deploying a single does not work and throw an error I have never faced before:
All canisters have already been created.
Building canisters...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
Failed to build call canisters.
Failed while trying to build all canisters.
[...]
Stdout:
Stderr:
/Users/shef/projects/theshelf/dfinity-infra/backend/dfinity/user_db/user_db.mo:17.1-17.47: import error [M0009], file "/Users/shef/projects/theshelf/dfinity-infra/.dfx/ic/canisters/idl/aq43c-6yaaa-aaaao-aaxfa-cai.did" does not exist
The line in question is canister import: import SocialNetwork "canister:social_network";
The reason why I need this, is that I need to deploy --mode=reinstall quite frequently, which only works for single-canister deploys.
What version were you using previously and do you have something that I could play around with? I’ve seen the same error a few times now but couldn’t get my hands on an example to test a potential fix on
I was using dfx 11.2 previously.
I don’t have enoigh resource to build an example right now, but as you’re part of the dfinity team, I guess I could give you acces to the codebase temporarily - would that work for you?
just an fyi regarding the current fix: the same error still get thrown if the deployer’s identity is not authorized.
Without the --mode=reinstall, the CLI would return: The replica returned an HTTP Error: Http Error: status 403 Forbidden, content type "application/cbor", content: Only controllers of canister aq43c-6yaaa-aaaao-aaxfa-cai can call ic00 method install_code, which makes sense.
Perhaps a little misleading for people who are not in the know
Anyway, thought you might want to know as you were interested in this original error message
Clarification: You mean you still get a compilation error if you use a different identity? In the test case I wrote I get a 403 forbidden in both cases.