I upgrade my dfx from 0.24.0 to 0.26.0, then i keep getting error said CanisterIdNotFound
Also, when run ‘dfx start --clean --background’, it looks like not actually running at background, i can’t keep typing any other command, need open another tab to type command
dfx start -vv --clean
Trace mode enabled. Lots of logs coming up.
Running dfx start for version 0.27.0
Using the default configuration for the local shared network.
Local server configuration:
bind address: 127.0.0.1:4943
bitcoin: disabled
canister http: enabled
log level: Error
replica:
subnet type: Application
log level: Error
data directory: /Users/heyuanxun/Library/Application Support/org.dfinity.dfx/network/local
scope: shared
Starting PocketIC...
Configuring PocketIC server
Waiting for replica to report healthy status
Initialized PocketIC.
replica ready on http://localhost:56957/instances/0/, so re/starting HTTP gateway
Starting pocket-ic gateway...
⠐ Starting local network... 2025-06-17T08:30:58.346126Z INFO pocket_ic_server: The PocketIC server is listening on port 56968
Configuring PocketIC gateway
Initialized HTTP gateway.
Replica API running on 127.0.0.1:4943. You must open a new terminal to continue developing. If you'd prefer to stop, quit with 'Ctrl-C'.
dfx ping
Error: Failed while waiting for agent status.
Caused by: The replica returned an HTTP Error: Http Error: status 400 Bad Request, content type "text/plain; charset=utf-8", content: CanisterIdNotFound
@Frankessa@heyuanxun are you starting dfx from a directory that has a dfx.json file with a network definition? If yes, can I see what you dfx.json looks like?
That doesn’t look like it should be a problem.
Can you confirm what you’re running this on (macos / windows wsl… and any applicable version numbers)?
Can I see the output of these commands - please run them outside of your project folder:
# to see the networks file you are using if any
dfx info networks-json-path
# to see the contents of the file
cat "$(dfx info networks-json-path)"
# stop dfx just in case
dfx stop
# start dfx
dfx start -vvvv --clean
# From another terminal
dfx ping
I have tried on macos and ubuntu, I found that the latest version can work smoothly on ubuntu, but on macos, not only this type of error, but also with high cpu useage problems.