BitShares Forum

Main => Technical Support => Topic started by: Black Arrow on November 22, 2015, 09:45:42 pm

Title: Web Wallet - Add New Websocket API
Post by: Black Arrow on November 22, 2015, 09:45:42 pm
I'm trying to migrate my bitshares 1.0 wallet to bitshares 2.0. When I go to the web wallet, it says I am not connected. There is a plus sign  next to wss://bitshares/openledger.info/ws. If I click on it, I get a message that says: Add new websocket API.  Are there any instructions that explain how to do this?
Title: Re: Web Wallet - Add New Websocket API
Post by: roadscape on November 22, 2015, 10:48:18 pm
Are you using OpenLedger, or running your own wallet?

If you're on OpenLedger, your best bet is to use the default:

wss://bitshares.openledger.info/ws

So if that's not working, I'm not sure why. I'm not seeing issues on my end..
Best bet is to reload the page and see if the problem goes away.

If you *need* to enter a new socket API just feed it the endpoint URL, for example:

ws://localhost:8090/ws (if you're running your own node)
Title: Re: Web Wallet - Add New Websocket API
Post by: Black Arrow on November 23, 2015, 05:39:52 am
Thanks for response. After  several retries I eventually got a connection. I think may be the problem had to do with a slow internet connection as I have a satellite connection.
Title: Re: Web Wallet - Add New Websocket API
Post by: xeroc on November 23, 2015, 08:42:54 am
Thanks for response. After  several retries I eventually got a connection. I think may be the problem had to do with a slow internet connection as I have a satellite connection.
In your case I think it is more about the delay than the "speed" .. the wallet expects a certain max latency :)
Title: Re: Web Wallet - Add New Websocket API
Post by: Black Arrow on November 24, 2015, 02:06:55 am
Yes. That makes sense. Do you know if there's any chance the MAX_LATENCY setting might be increased in a future version?
Title: Re: Web Wallet - Add New Websocket API
Post by: xeroc on November 24, 2015, 08:02:04 am
https://github.com/cryptonomex/graphene-ui/issues/530
Title: Re: Web Wallet - Add New Websocket API
Post by: Black Arrow on December 04, 2015, 10:26:07 pm
Thanks for looking into it.
Title: Re: Web Wallet - Add New Websocket API
Post by: jakub on January 21, 2016, 10:17:50 pm
I'm running a witness node locally with rpc-tls-endpoint enabled:
Code: [Select]
witness_node --rpc-tls-endpoint 127.0.0.1:8089
And I've set the API connection in the GUI to this:
Code: [Select]
wss://127.0.0.1:8089
But still I get this error in the GUI:
Code: [Select]
WebSocket connection to 'wss://127.0.0.1:8089/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Anyone knows what I've done wrong?

EDIT: This issue is solved here:
https://bitsharestalk.org/index.php/topic,8390.msg273655.html#msg273655

It turns out that your locally run witness node can work with a GUI only if you use either of these:
- a light wallet GUI running locally on your machine
- a hosted GUI, provided it is not using a secure domain (i.e. only works with plain http, not https)

Thus the OpenLedger GUI cannot be connected to your locally run witness node, as it uses https.
(If you really wanted to connect it, you could do it with "a TLS certificate and a proxy server for incoming traffic that proxies the ws server of the witness node" - as svk explains it here (https://bitsharestalk.org/index.php/topic,8390.msg273663.html#msg273663))