Failed to get wallet canister caller for identity 'default' on network 'local'

When deploying a project on dfx 0.13.1 I get this error everytime I start the replica without the
–clean argument.

Failed to get wallet canister caller for identity ‘default’ on network ‘local’

When the replica starts I also get this warning, not sure if it could be related:

Using the default definition for the ‘local’ shared network because /home/user/.config/dfx/networks.json does not exist.

Hmm, this sounds weird. Maybe the wallets don’t get updated properly? Can you inspect this file a bit closer at different stages in the process? And say what kind of system you’re on (Linux, Macos)?

$HOME/.local/share/dfx/network/local/wallets.json (Linux)
$HOME/Library/Application Support/org.dfinity.dfx/network/local.json (Macos)

Also, can you please confirm the minimal steps required to reproduce the problem are as follows:

  1. dfx start --clean
  2. dfx deploy
  3. dfx stop
  4. dfx start
  5. dfx deploy ← fails with the above error

I’m on Linux, this is what’s inside wallet.json:

“identities”: {
“default”: {
“local”: “rwlgt-iiaaa-aaaaa-aaaaa-cai”
}

When I start with --clean it gets deleted and when doing dfx start it gets recreated with the same value.

Yes that is correct

Perfect, thanks. I’ll note it in our bug reports (note to self: ticket), but I can’t make any promises - this looks like a bug that is very hard to reproduce.