0

Does anyone know the solution to this? I am new to this and learning. I am on Macbook Air m1.

  1. This is the end code while running dfx start in the terminal:

thread 'replica-actor' panicked at 'called Result::unwrap() on an Err value: Cannot start the replica: Timeout', src/dfx/src/actors/replica.rs:279:78
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

  1. This is what happens while running dfx deploy in terminal:

Error: An error happened during communication with the replica: error sending request for url (http://127.0.0.1:8000/api/v2/status): error trying to connect: tcp connect error: Connection refused (os error 61)

Does anyone know anything about this?

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • May you share us your dfx version ? You can get it by typing `dfx -V`. – Benjamin Loison Jul 27 '22 at 08:35
  • dfx version is 0.9.3 – Niell_ray28 Jul 27 '22 at 14:00
  • May you try with [dfx 0.11.0](https://github.com/dfinity/sdk/releases/tag/0.11.0) ? – Benjamin Loison Jul 27 '22 at 15:21
  • I tried it, but the problems still continue. – Niell_ray28 Jul 27 '22 at 16:23
  • Is your dfx project open-source ? Likewise we could try and possibly debug on our own. – Benjamin Loison Jul 27 '22 at 19:19
  • I dont know whether its open-source or not. how do you check that ? – Niell_ray28 Jul 28 '22 at 02:35
  • "Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose." Source: [Wikipedia](https://en.wikipedia.org/wiki/Open-source_software) So if you created every component of the project and you're fine with distributing it on GitHub, please share the GitHub repository link otherwise ask the persons who did the components of your project. – Benjamin Loison Jul 28 '22 at 07:35
  • the code is basic hello of dfinity, i.e., "dfx new hello". I am just starting with this and this problems occurred with the basic hello file that dfinity itself has made. – Niell_ray28 Jul 28 '22 at 12:25
  • @BenjaminLoison dfx is open source: https://github.com/dfinity/sdk and is Dfinity's sdk for their distributed ledger computing and hosting platform ICP. – Ashton Engberg Jun 21 '23 at 20:53
  • @AshtonEngberg I know that Dfinity's SDK is on GitHub, I've been working for Dfinity. I was requesting Niell_ray28 to share his code if it was open-source in order to have [a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – Benjamin Loison Jun 21 '23 at 20:58
  • Apologies, totally misread that comment earlier. – Ashton Engberg Jun 21 '23 at 22:18

2 Answers2

0

Found the solution to the problem. I was running the code while it was stored in an external drive. When I created the same folder on my desktop and ran everything the same way, the problem got solved and I no longer have those errors in my terminal. I don't know how it is happening, but I just discovered it right now.

0

Try "dfx start --emulator"

Emmanuel Bull
  • 301
  • 3
  • 5