LedgerHQ / ledger-live-desktop

⛔️ DEPRECATED - Ledger Live (Desktop)
https://www.ledger.com/live
MIT License
954 stars 298 forks source link

Ripple bug: 'not exactly one'.. #1186

Closed gre closed 6 years ago

gre commented 6 years ago

i've been reported this bug from one user that tried to send a big amount of XRP (e.g. 1k)

"works with 100 but not 1k"

img_4304

might just be related to ripple-lib.

gre commented 6 years ago

not sure if related https://github.com/LedgerHQ/ripple-recovery-tool/issues/4

gre commented 6 years ago

https://github.com/ripple/ripple-lib/issues/829

NeoOne117 commented 6 years ago

My friend says it worked with 999 XRP, but not 1000. I'll also try to duplicate this.

NeoOne117 commented 6 years ago

I tried sending 10 XRP, 999 XRP, and i get this different error (on both) :

screen shot 2018-07-18 at 5 23 35 pm

I get the original error posted here when i try to send any XRP amount >=1000

screen shot 2018-07-18 at 5 26 42 pm

Btw, using the old native Ledger Wallet Ripple, sending out any amount of XRP is still good.

gre commented 6 years ago

I think, for "ledger sequence too high" it means you have try to send twice too fast, without synchronizing again. it often happen, but disappear if you wait synchronization to finish (you can click on sync button to force it)

NeoOne117 commented 6 years ago

No, I just opened the app, waited for the sync to finish and then tried. But as per your request I've force synced it and tried and every time the same error (<1000 XRP, same error).

michaeljfazio commented 6 years ago

Hit this one today myself. Gave up on it and reverted back to legacy ripple wallet.

gre commented 6 years ago

status update: I can reproduce the problem and am investigating a solution.

gre commented 6 years ago

The issue is simply because numbers get formatted as 1,000.00 instead of 1000.00 , therefore the bug above 999

the fix should arrive in next patch we'll do.

Thanks for your patience

NeoOne117 commented 6 years ago

@gre I'm still getting the 'Ledger Sequence too high' error. Can't send any XRP out.

On another note, when i reconnected my Nano S to try again, the device randomly gave me this message instead of the PIN screen : ‘MCU firmware is not genuine’. Upon reconnecting again, it showed the PIN input screen as usual. Any idea why this happened ? One of my buttons seems to have problems responding to click, if that has anything to do with this (since MCU controls the buttons, screen USB conn etc).

gre commented 6 years ago

Please contact tech support because their might be able to offer an exchange for defected hardware (to be checked with them). I think the mcu not genuine can technically happen if there are USB issues like bad contact of the cable.

I'm going to investigate about this Ledger sequence too high related to ripple API, have you tried to Clear Cache ? This sometimes help retriggering a full resync

NeoOne117 commented 6 years ago

@gre I cleared the cache and the app told me it'd force a resync. The app went back to login screen, I logged in and tried again. I'm getting the same 'Ledger Sequence too high' error on sending any XRP <1000. (>=1000, the other error comes, which you have debugged already).

*I had trustlines and tokens on my Ledger XRP address before, but I removed both a while ago. Currently there are no tokens or trustlines, just XRP.

gre commented 6 years ago

@ferozkhanhamid you might want to validate the TX on your device a bit faster. this is due to using the default timeout of Ripple-lib which is way too fast.

had to define a maxLedgerVersionOffset that is a bit higher than the default one

NeoOne117 commented 6 years ago

@gre Oh this makes sense. I've waited to see the XRP amount, dest address and fee to press the button to approve, just to be secure. But this is how Ledger suggests as well to users right. So a higher timeout can be expected on Ledger Live 1.0.4 for this ?

*EDIT : Just tried validating a bit faster and it worked. The transaction went through, so what you said above seems right. Awaiting the fix which includes higher timeout.

gre commented 6 years ago

@ferozkhanhamid validating everything is definitely how you're supposed to use the Ledger device, always trust and validate all on device. so yeah definitely need a bigger timeout, we might even consider bigger timeout if we see people raising again the error.

NeoOne117 commented 6 years ago

@gre So would there be a bigger timeout in v1.0.4 ?

gre commented 6 years ago

yes. we've set it to 12 ledgers (ledger = block) like it was on the previous app