Error: Socket Exception while trying to access kmd

This is a duplicate of Connection refused, errno = 111, address = localhost, port = 57838 #0

As explained, doing that is very dangerous from a security point of view.
If you want to derive multiple accounts from the same passphrase, you need to implement the logic in the wallet itself and not rely on an external kmd which opens to a lot of attacks.

If you absolutely want kmd, the issue is most likely that:

  • the port is incorrect
  • or the address 127.0.0.1 is incorrect. Importantly, 127.0.0.1 means that kmd must be running on the same computer as the computer running the flutter app. iOS/Andoid simulator may be considered a different computer. And running the wallet as an iPhone/Android app on a real phone will never work with 127.0.0.1 because 127.0.0.1 is the local IP address of the phone that is not running kmd.
  • or kmd is not started properly (goal kmd start)

The error indeed indicate that the connection is refused, which usually means kmd is not running at 127.0.0.1:44824
If you are using sandbox, the port should be 4002.
Note that you can easily check whether kmd works on the above by using in command line:

 curl 127.0.0.1:44824/swagger.json

It should return a lot of lines of JSON.
If it does not the port or the address is not ok. Or kmd is not started.

PS: I would kindly ask you not to post again the same message. If you have a specific question after following any of the steps above (verifying address, port, kmd started, and running curl ...), please answer to this thread with the following information:

  • where is kmd running?
  • how did you install the Algorand software (sandbox, Debian package, …)?
  • where is the flutter app running?
  • what is the output of the above curl command?
  • how did you find the port 44824?