haveno-dex / haveno

Decentralized P2P exchange platform built on Monero and Tor
https://haveno.exchange
GNU Affero General Public License v3.0
1.02k stars 114 forks source link

Error importing exported payment accounts #1221

Closed woodser closed 1 month ago

woodser commented 2 months ago

Importing exported payment accounts sometimes fails with an error.

I have not been able to recreate the error. Maybe it only happens with specific payment accounts.

Aug.-16 01:48:15.785 [JavaFX Application Thread] INFO  h.n.p.p.PeerManager: We have 12 connections open. Our limit is 12 
Aug.-16 01:53:57.639 [JavaFX Application Thread] INFO  h.c.u.Profiler: Total memory: 125 MB; Used memory: 65,605 MB; Free memory: 59,395 MB; Max memory: 1 GB; No. of threads: 83 
Aug.-16 01:58:56.402 [PersistenceManager-read-FiatPaymentAccounts] WARN  h.c.p.PersistenceManager: Expected encrypted persisted file, attempting to getPersisted without decryption 
Aug.-16 01:58:56.403 [PersistenceManager-read-FiatPaymentAccounts] ERROR h.c.p.PersistenceManager: Reading FiatPaymentAccounts failed with Protocol message tag had invalid wire type.. 
Aug.-16 01:58:56.404 [PersistenceManager-read-FiatPaymentAccounts] ERROR h.c.app.DevEnv: com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type. 
Aug.-16 01:58:58.733 [InputHandler-bi6zlsppjx73...] WARN  h.n.p.n.Connection: proto is null because protoInputStream.read()=-1 (EOF). That is expected if client got stopped without proper shutdown. 
Aug.-16 01:59:18.734 [PersistenceManager-read-CryptoPaymentAccounts] WARN  h.c.p.PersistenceManager: Expected encrypted persisted file, attempting to getPersisted without decryption 
Aug.-16 01:59:18.738 [PersistenceManager-read-CryptoPaymentAccounts] ERROR h.c.p.PersistenceManager: Reading CryptoPaymentAccounts failed with While parsing a protocol message, the input ended unexpectedly in the middle of a field.  This could mean either that the input has been truncated or that an embedded message misreported its own length.. 
Aug.-16 01:59:18.738 [PersistenceManager-read-CryptoPaymentAccounts] ERROR h.c.app.DevEnv: com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field.  This could mean either that the input has been truncated or that an embedded message misreported its own length. 
Aug.-16 01:59:33.970 [Connection] INFO  h.n.p.p.PeerManager: Num of latestLivePeers=10

This issue requests reproducing the error and fixing it.

boldsuck commented 1 month ago

Which payment accounts did you use?

I have traditional accounts: SEPA & SEPA Instant. Cryptocurrency: BTC, LTC, ETH all standard and Instant.

I have 2 Debian laptops & I tried:

  1. 'Export Accounts' on Haveno Client 1 and tried to 'Import Accounts' on Haveno Client 2 -> failed
  2. New Haveno Client generated, configured accounts and secured them. Stopped Haveno Client, deleted home folder and restarted. Importing exported payment accounts failed.

I tested it mostly without Haveno Wallet Password. But also twice with Password.

Accounts with full backup import works without any problems. So it's not a big problem. I'm just wondering why the error only occurs for me.