vault713 / wallet713

A wallet that makes it easy to send, store, and swap Grin.
Apache License 2.0
196 stars 74 forks source link

Improve error handling of reconnection/disconnection #109

Closed lehnberg closed 5 years ago

lehnberg commented 5 years ago

This is a low priority issue. I unintentionally kept wallet running in background and noticed the following behaviour:

lehnberg@Daniels-MBP ~/d/v/w/t/release> ./wallet713

Welcome to wallet713

Unlock your existing wallet or type `init` to initiate a new one
Use `listen` to connect to grinbox or `help` to see available commands

wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
wallet713> Encountered an error: WebSocket Protocol Error: Handshake failed.
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Encountered invalid opcode: 12
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Handshake failed.
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Encountered invalid opcode: 12
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Handshake failed.
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Encountered invalid opcode: 12
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Handshake failed.
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Encountered invalid opcode: 12
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Handshake failed.
Enable a logger to see more information.
Encountered an error: WebSocket Protocol Error: Encountered invalid opcode: 12
Enable a logger to see more information.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
slate [031fb5f6-7fd1-4939-a5b0-5f92515f1dcc] received from [gVwNHG4STzQEWa3i9Mvkg7cBWyPwMb1FSozRvn3UmpAHMJZ9Vf3T] for [0.001000000] grins
slate [031fb5f6-7fd1-4939-a5b0-5f92515f1dcc] sent back to [gVwNHG4STzQEWa3i9Mvkg7cBWyPwMb1FSozRvn3UmpAHMJZ9Vf3T] successfully
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: timed out
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
slate [4effeea5-8b0a-4912-84b1-30e2367783e5] received from [gVvKqB2jxXjBhuEWarzHJnzFL4Nvh1Pk5W71kRDSoc5S7c7zDewk] for [0.001000000] grins
slate [4effeea5-8b0a-4912-84b1-30e2367783e5] sent back to [gVvKqB2jxXjBhuEWarzHJnzFL4Nvh1Pk5W71kRDSoc5S7c7zDewk] successfully
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: timed out
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: timed out
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: timed out
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> Encountered an error: connection reset
Enable a logger to see more information.
WARNING: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] lost connection. it will keep trying to restore connection in the background.
INFO: listener [gVwcktstZH4w2gfmZwCYkz2n9NdTG8vXxdbsJCTy5JaoeZXtVv18] reestablished connection.
wallet713> exit
lehnberg@Daniels-MBP ~/d/v/w/t/release> 

Basically, this is currently pretty much expected behaviour (as you close/open laptop, and as you drop/establish internet connection).

It would be nice to see this messaging handled a bit better.

ravidio commented 5 years ago

Agree! It's a bit of a mystery where this message comes from:

Encountered an error: connection reset
Enable a logger to see more information.

It's not something we print out intentionally. I'll see if I can track it down.

jclamar100 commented 5 years ago

Im not understanding what going on..is some body trying to get in my accounts..?

jclamar100 commented 5 years ago

Will not happen..lol