Author Topic: Web Wallet - Add New Websocket API  (Read 3670 times)

0 Members and 1 Guest are viewing this topic.

jakub

  • Guest
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)
« Last Edit: January 22, 2016, 05:41:27 pm by jakub »

Offline Black Arrow

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Thanks for looking into it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline Black Arrow

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Yes. That makes sense. Do you know if there's any chance the MAX_LATENCY setting might be increased in a future version?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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 :)

Offline Black Arrow

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
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.

Offline roadscape

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)
http://cryptofresh.com  |  witness: roadscape

Offline Black Arrow

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
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?