mailchain / mailchain-legacy

Using Mailchain, blockchain users can now send and receive rich-media HTML messages with attachments via a blockchain address.
https://mailchain.xyz
Apache License 2.0
143 stars 51 forks source link

network not found for protocol #735

Open jnorthrup opened 2 years ago

jnorthrup commented 2 years ago

hello

i have installed the mailchain binaries, obtained an address from metamask and its private key, and done my best to mitigate the docs form 0.0.36 to 0.0.78

my platform linux ubuntu 21.10 $ uname -a Linux asdasdad 5.12.19-zen+ #1 ZEN SMP PREEMPT Thu Jul 29 10:43:35 +08 2021 x86_64 x86_64 x86_64 GNU/Linux

$ mailchain version Version: v0.0.78

my problem

mailchain account add --key-type secp256k1  --protocol ethereum --network mainnet   --private-key xxxx 2021/09/26 00:46:56 network not found for protocol

for completeness sake, i tried mailchain account add --protocol=ethereum --network=mainnet --private-key=[PRIVATE-KEY-VALUE] --key-type=secp256k1 format first, same results.

i notice other bugs, but first this issue seems most important.

my yaml file is bone stock for this version, not shown. i made no alterations to it

tboeckmann commented 2 years ago

Hi @jnorthrup, thanks for raising this.

I wasn't able to reproduce the error using version v0.0.78 on Ubuntu 21.04 (AWS instance). See the output below for steps I took from https://docs.mailchain.xyz/installation#manual-install, copying your command from above.

Could try the following:

  1. Double check the command was entered using the right protocol and network without typos?
  2. Try another network (e.g. ropsten)?

It's the only thing I can think of because mailchain version works for you.

Mailchain setup:

ubuntu@ip-172-xxx-xxxx-xxx:~$ mkdir -p ~/.mailchain/bin
ubuntu@ip-172-xxx-xxxx-xxx:~$ cd .mailchain/bin/
ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ wget https://github.com/mailchain/mailchain/releases/download/v0.0.78/mailchain-v0.0.78-Linux-64bit.tar.gz
--2021-09-25 19:18:01--  https://github.com/mailchain/mailchain/releases/download/v0.0.78/mailchain-v0.0.78-Linux-64bit.tar.gz
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/180845703/93e9f580-c4aa-11eb-89cf-103cddab5c77?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210925%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210925T191801Z&X-Amz-Expires=300&X-Amz-Signature=f21ed5f80d9019431dbc96204abb30bd63584d6e2510d888f4f4ee40bdb28845&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=180845703&response-content-disposition=attachment%3B%20filename%3Dmailchain-v0.0.78-Linux-64bit.tar.gz&response-content-type=application%2Foctet-stream [following]
--2021-09-25 19:18:01--  https://github-releases.githubusercontent.com/180845703/93e9f580-c4aa-11eb-89cf-103cddab5c77?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210925%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210925T191801Z&X-Amz-Expires=300&X-Amz-Signature=f21ed5f80d9019431dbc96204abb30bd63584d6e2510d888f4f4ee40bdb28845&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=180845703&response-content-disposition=attachment%3B%20filename%3Dmailchain-v0.0.78-Linux-64bit.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.109.154, 185.199.110.154, 185.199.111.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.109.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20053479 (19M) [application/octet-stream]
Saving to: ‘mailchain-v0.0.78-Linux-64bit.tar.gz’

mailchain-v0.0.78-Linux-64bit.tar.gz                 100%[======================================================================================================================>]  19.12M  62.0MB/s    in 0.3s    

2021-09-25 19:18:02 (62.0 MB/s) - ‘mailchain-v0.0.78-Linux-64bit.tar.gz’ saved [20053479/20053479]

ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ tar -xf mailchain-v0.0.78-Linux-64bit.tar.gz 
ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ export PATH=$PATH:$HOME/.mailchain/bin
ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ mailchain version
Version: v0.0.78

Mailchain account add:

ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ mailchain account add --key-type secp256k1  --protocol ethereum --network mainnet   --private-key xxxxxxxxxxx
Note: To derive a storage key passphrase is required. The passphrase must be secure and not guessable.
Passphrase: *********█
Repeat Passphrase: *********█
{
  "message": "private key added",
  "public-key": "0xxxxxxxx...",
  "public-key-encoding": "hex/0x-prefix",
  "address": "0xxxxxx",
  "address-encoding": "hex/0x-prefix",
  "protocol": "ethereum",
  "network": "mainnet"
}

Version details:

ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ uname -a
Linux ip-172-xxx-xxxx-xxx 5.11.0-1017-aws #18-Ubuntu SMP Fri Aug 20 00:36:41 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:    21.04
Codename:   hirsute
ubuntu@ip-172-xxx-xxxx-xxx:~/.mailchain/bin$