soramitsu / iroha-wallet-js

Sample wallet application for Iroha
Apache License 2.0
27 stars 18 forks source link

Problem with loging into account with web browser "Login error" #41

Open baziorek opened 4 years ago

baziorek commented 4 years ago

All steps I've done in clean newest Kubuntu 19.10 with all updates (Kubuntu installed only to run wallet, no more programs installed):

$ sudo apt install git npm docker-compose -y
$ git clone --depth=1 https://github.com/soramitsu/iroha-wallet-js.git
$ cd iroha-wallet-js/
$ git rev-parse --short HEAD # current version hash is: 8ee46b0

Then I tried to run docker: sudo docker-compose -f docker/docker-compose.yaml up but I've received error: ERROR: Service 'grpcwebproxy' failed to build: The command '/bin/sh -c dep ensure' returned a non-zero code: 2 which I've solved with: sudo apt-get install libgrpc6 golang-grpc-gateway golang-github-grpc-ecosystem-go-grpc-prometheus-dev -y, because after that the docker's command run succesfully. While previous command was running in one console tab, I've done in next tab:

$ npm install
(...)
added 1577 packages from 1188 contributors in 92.432s
$ node scripts/setup.js

After that I installed yarn as described here: https://stackoverflow.com/a/47680012 then I prepared environment and run service with success:

$ yarn install
(...)
Done in 127.26s.
$ yarn serve

After that I've seen URL address: localhost:8080, so I've entered the URL filling all fields with: username: admin@iroha key: 0f0ce16d2afbb8eca23c7d8c2724f0c257a800ee2bbd54688cec6b898e3f7e33 (taken from iroha-wallet-js$ cat scripts/admin@iroha.priv Node IP: localhost After pressing the LOGIN button message "Login error" was displayed.

So how can I log in? logError

It is similar closed issue, but without answer: https://github.com/soramitsu/iroha-wallet-js/issues/29

Pobepto commented 4 years ago

Hi! Try to set http://localhost:8081 value to node ip field

baziorek commented 4 years ago

It is working, thanks! BTW: I suggest to update README.md with information about this.

baziorek commented 4 years ago

I've also tried to use the wallet with docker images created according to iroha's documentation, so I've typed:

$ docker network create iroha-network
$ docker run --name some-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 --network=iroha-network -d postgres:9.5 -c 'max_prepared_transactions=100'
$ docker volume create blockstore
$ git clone -b master https://github.com/hyperledger/iroha --depth=1
$ docker run --name iroha -d -p 50051:50051 -v $(pwd)/iroha/example:/opt/iroha_data -v blockstore:/tmp/block_store --network=iroha-network -e KEY='node0' hyperledger/iroha:latest
$ docker exec -it iroha /bin/bash # this is just to check if OK

Then I've run the wallet: $ yarn serve After that I've tried to login: username: admin@iroha key: f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70 (taken from official iroha's example: $ cat iroha/example/admin@test.priv f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70) Node IP: I've tried:

Finally I've used grpcwebproxy manually: ./grpcwebproxy-v0.12.0-linux-x86_64 --backend_addr=localhost:50051 --run_tls_server=false --allow_all_origins=true --server_http_debug_port=8081 then it worked with IP address: http://localhost:8081, but it is not mentioned in README.md, so I'm not sure if it is official way to log in? So my question is - is it possible to login into iroha's images created according to official iroha's documentation without grpcwebproxy? If so, what address shout be used?