Post
Topic
Board Armory
Merits 6 from 3 users
Topic OP
Current issues loading wallet files in dev loading_wallets branch
by
Aethereal
on 12/03/2025, 15:29:27 UTC
⭐ Merited by ABCbits (3) ,nc50lc (2) ,goatpig (1)
Warning: This issue only affects digital backups on the current dev version. Paper Backups are safe and working

Hello @goatpig

I had some more test with wallets (all of them were done with the --offline flag).

First of all, the Import feature is still not working (I suppose you are aware of that). Choosing "Import digital backup or watchiong-only wallet" the file dialog comes up, you can select a .wallet file, but when you click "Open" nothing happens and you are back to the "Restore Wallet from Backup" window. The log reports this error:

Code:
(ERROR) Traceback (most recent call last):
File "/home/lab/BitcoinArmory/qtdialogs/DlgUniversalRestoreSelect.py", line 99, in clickedOkay
self.main.execGetImportWltName()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/lab/BitcoinArmory/ArmoryQt.py", line 2758, in execGetImportWltName
wlt = PyBtcWallet().readWalletFile(fn, verifyIntegrity=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PyBtcWallet' object has no attribute 'readWalletFile'

Also I had an old backup of a previous Armory config dir (~/.armory/) so I tried to launch the current dev version against it (emulating an "upgrade" scenario).

There were 2 wallets in this old Armory: a crypted wallet and a read-only watch wallet.

The presence of the encrypted wallet causes an immediate error just after the -bridge port: line in the log with the following:

Code:
terminate called after throwwing an instance of 'Armory::Wallets::IdException'
  what():   [EncryptionKeyId] invalid key size

If I remove the encrypted wallet file and leave the watch-only wallet, I get this error at the first launch:

Code:
╭─lab@AI in repo: BitcoinArmory on  loading_wallets [?] via △ v3.31.6 via  v3.13.2
╰─λ python ArmoryQt.py --offline
********************************************************************************
Loading Armory Engine:
Armory Version:       0.96.99
Armory Build:         None
PyBtcWallet  Version: 1.99
Detected Operating system: Linux
OS Variant            : ('Garuda Linux', 'Soaring', 'Broadwing')
User home-directory   : /home/lab
Satoshi BTC directory : /home/lab/.bitcoin
Armory home dir       : /home/lab/.armory/
ArmoryDB directory     : /home/lab/.armory/databases
Armory settings file  : /home/lab/.armory/ArmorySettings.txt
Armory log file       : /home/lab/.armory/armorylog.txt
Do wallet checking    : True
(ERROR) Settings.py:203 - Unsupported language  specified. Defaulting to English (en)
-INFO  - 2025-03-12 - 16:52:49.575: (../../cppForSwig/BridgeAPI/BridgeMain.cpp:58) bridge log: /home/lab/.armory/bridgeLog.txt
-INFO  - 2025-03-12 - 16:52:49.575: (../../cppForSwig/BridgeAPI/BridgeMain.cpp:59) cppbridge args:
- datadir: /home/lab/.armory/
- offline: 1
- auth mode: 1
- db port: 9001
- bridge port: 56514
-WARN  - 2025-03-12 - 16:52:50.886: (../../cppForSwig/Wallets/WalletFileInterface.cpp:404) No control passphrase provided, wallet file will not be encrypted
-WARN  - 2025-03-12 - 16:52:52.135: (../../cppForSwig/Wallets/WalletFileInterface.cpp:404) No control passphrase provided, wallet file will not be encrypted
-WARN  - 2025-03-12 - 16:52:52.746: (../../cppForSwig/Wallets/Accounts/AddressAccounts.cpp:349) empty inner account id, defaulting to outer account id
-ERROR - 2025-03-12 - 16:53:06.912: (../../cppForSwig/SocketObject.cpp:381) POLLERR error in readFromSocketThread
-INFO  - 2025-03-12 - 16:53:06.912: (../../cppForSwig/BridgeAPI/BridgeMain.cpp:98) exiting
(ERROR) ArmoryQt.py:4952 - Strange error during shutdown
Traceback (most recent call last):
File "/home/lab/BitcoinArmory/ArmoryQt.py", line 4944, in closeForReal
TheBridge.service.shutdown()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/lab/BitcoinArmory/armoryengine/CppBridge.py", line 405, in shutdown
self.bridgeSocket.stop()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/lab/BitcoinArmory/armoryengine/CppBridge.py", line 146, in stop
self.clientFut.result()
~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/lab/BitcoinArmory/armoryengine/CppBridge.py", line 367, in readBridgeSocket
callbackFunc.process(callbackData)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/home/lab/BitcoinArmory/armoryengine/CppBridge.py", line 1353, in process
self.parseProtoPacket(protoPacket)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/lab/BitcoinArmory/armoryengine/CppBridge.py", line 1349, in parseProtoPacket
raise Exception("override me")
Exception: override me

Armory is still running but not showing anything in the wallet window.
But if I close it and then open it again, it doesn't throw errors anymore and instead the watch-only wallet appears correctly in the wallets window. It also appears to show the addresses I was using with the same labels I added at the time, so I assume that even if an error occurred, the config was correctly updated and the watch-only wallet is working.
Since I'm still on a --offline system, I can't do additional tests.

I hope to have been helpful.
All the above tests are repeteable, so I'll try again against future updates of the code.