aragon / aragon-desktop

(Aragon 1) Managing an decentralized organization on a desktop near you
GNU General Public License v3.0
37 stars 17 forks source link

Error when Ledger goes to sleep #60

Open john-light opened 5 years ago

john-light commented 5 years ago

When using the desktop client, my Ledger went to sleep. I tried unlocking it and voting on a proposal and got this error:

You need to be connected to the main network in order to perform "Vote yes in vote #1" on Voting. Please connect your Ethereum provider to the main network.

However Frame was open, my Ledger was unlocked, and Frame had permission to talk to the Aragon desktop client. I restarted the desktop client with Frame open and the Ledger unlocked, and could then vote on the transaction.

Since the Ledger goes to sleep quite often, it would be good if just unlocking them was enough for the desktop app to be able to use it again rather than having to restart the desktop app every time this happens.

sohkai commented 5 years ago

@john-light This is most likely an issue with frame not handling the Ledger sleeping cc @floating.

Which version of the firmware are you on?

floating commented 5 years ago

Currently when the Ledger goes to sleep the account will close in Frame, but when you wake the device, the account should be able to open and be continue being used without restarting dapps. I'm happy to look into anything on my end if this is not the case.

This will all be much nicer soon with the planned persistent accounts UX that will gracefully handle changes in device availability.

sohkai commented 5 years ago

Maybe it's related to eth-provider not reconnecting in the case of the Ledger being unlocked. I think it polls on an interval, so perhaps @john-light got unlucky and tried to vote before eth-provider was able to reconnect?

Maybe it's related to how we handle account disconnects and reconnects (Metamask is always on, so it's not a problem).