I installed the cli tool following the docs, but after creating a new project with dfx new what (ignore the dirname… lol), running dfx start (from the what dir) spits out this error:
➜ what git:(main) ✗ dfx start
Running dfx start for version 0.15.1
Using the default definition for the ‘local’ shared network because /Users/calebreyes/.config/dfx/networks.json does not exist.
thread ‘main’ panicked at ‘Conversion from protobuf should not fail: Other(“Missing required struct field: UnmaskedTranscriptWithAttributes::attributes”)’, rs/artifact_pool/src/rocksdb_pool.rs:541:22
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
more details:
➜ what git:(main) ✗ which dfx
/usr/local/bin/dfx
➜ what git:(main) ✗ dfx -V
dfx 0.15.1
➜ what git:(main) ✗ dfx diagnose
Error: An error happened during communication with the replica: error sending request for url (http://127.0.0.1:4943/api/v2/status): error trying to connect: tcp connect error: Connection refused (os error 61)
I also deleted and re-installed the cache via dfx cache, to no avail.
same issue. upon running: dfx start, error: Running dfx start for version 0.17.0
Using the default definition for the ‘local’ shared network because /home/rk/.config/dfx/networks.json does not exist.
Initialized replica.
Dashboard: htp://localhost:40683/_/dashboard - Nothing is showing if i open this AND upon running: dfx stop, error: Using the default definition for the ‘local’ shared network because /home/rk/.config/dfx/networks.json does not exist. - I have tried modifying the dfx.json file with the help of google’s gemini but of no use
It seems that you did successfully start a local replica and then stop it.
The message you saw when running both dfx start and dfx stop was not an error message.
Using the default definition for the ‘local’ shared network because /home/rk/.config/dfx/networks.json does not exist.
It informed you that it didn’t find a networks.json file at the path which can be used to configure the local replica behavior. So it proceeded with a default setting to start and stop the local replica.
After running dfx run, you said “Nothing is showing”. This is expected behavior since there was no interaction with the started replica. In a different CLI window, you can execute other dfx commands, e.g. dfx deploy.
@lwshang Hello, i am facing the same problem as @Cakeday
you said it didn’t find networks.json file in the path and i am facing the same issue so how can i add networks.json in the path? and where to find it from?
You don’t need a networks.json file to start a local replica.
Without the networks.json, dfx start will start the local replica with default configuration.
You can customize some configuration by providing a networks.json file at the suggested path. This is optional.
Cakeday solved the original issue by running dfx start --clean.
The error message in the top of this forum thread implied that there might be some unload-able replica state data. That was likely caused by a previous run of dfx start using an old dfx version. After upgrading dfx, the state data format changed and the old data cannot be loaded.
The --clean flag will delete the previous local replica state data and start a new local replica instance with fresh clean state.