cannot send transactions with ledger nano hardware wallet
I am using electrum 2.7.18 from tarball on linux (debian stretch).
After clicking send and clicking yes to the "proceed?" question I get the dialog saying "confirm transaction on your ledger device" then a few seconds go by and it sometimes crashes, sometimes gets to the next step ("signing transaction" dialog). In all cases I just wait doing nothing.
What I'd expect is a new confirm request appearing on my android ledger app (as the nano doesn't have a display like the nano s does) so I can proceed, but I get nothing.
Ledger nano unlocks correctly and gets to green status (even though I can see my transaction history even before I enter the pin, which looks bad to me but is not the issue at hand).
Some example output I get in my terminal (where I launch electrum with python electrum) when it just crashes:
Traceback (most recent call last):
File "/home/dieeasy/src/Electrum-2.7.18/plugins/ledger/qt.py", line 50, in auth_dialog
self.message_dialog(e)
File "/home/dieeasy/src/Electrum-2.7.18/plugins/ledger/qt.py", line 41, in message_dialog
l = QLabel(msg)
TypeError: arguments did not match any overloaded call:
QLabel(parent: QWidget = None, flags: Qt.WindowFlags = 0): argument 1 has unexpected type 'exceptions.ImportError'
QLabel(QString, parent: QWidget = None, flags: Qt.WindowFlags = 0): argument 1 has unexpected type 'exceptions.ImportError'
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
python: ../../src/xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted
*** Error in `python': double free or corruption (fasttop): 0x00007fa394017800 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7fa3ba9f3bcb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x7fa3ba9f9f96]
/lib/x86_64-linux-gnu/libc.so.6(+0x7778e)[0x7fa3ba9fa78e]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XEventsQueued+0x55)[0x7fa393476b15]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XEventsQueued+0x69)[0x7fa393468789]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26e01c)[0x7fa39db5b01c]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_check+0x1d9)[0x7fa39c73f3f9]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a994)[0x7fa39c73f994]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7fa39c73fb0c]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x86)[0x7fa39d5b5876]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26e5d6)[0x7fa39db5b5d6]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x3f)[0x7fa39d5837ef]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x1b5)[0x7fa39d583b55]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99)[0x7fa39d589bd9]
/usr/lib/python2.7/dist-packages/PyQt4/QtGui.x86_64-linux-gnu.so(+0x5676db)[0x7fa39eb426db]
python(PyEval_EvalFrameEx+0x69a)[0x55bf0d5683ca]
python(PyEval_EvalCodeEx+0x255)[0x55bf0d566535]
python(PyEval_EvalFrameEx+0x6968)[0x55bf0d56e698]
python(PyEval_EvalFrameEx+0x5eef)[0x55bf0d56dc1f]
python(PyEval_EvalCodeEx+0x255)[0x55bf0d566535]
python(PyEval_EvalCode+0x19)[0x55bf0d5662d9]
python(+0x128e3f)[0x55bf0d595e3f]
python(PyRun_FileExFlags+0x82)[0x55bf0d590d52]
python(PyRun_SimpleFileExFlags+0x19e)[0x55bf0d59089e]
python(Py_Main+0x6c1)[0x55bf0d541af1]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7fa3ba9a32b1]
python(_start+0x2a)[0x55bf0d54131a]
======= Memory map: ========
55bf0d46d000-55bf0d790000 r-xp 00000000 00:14 2728326 /usr/bin/python2.7
55bf0d990000-55bf0d992000 r--p 00323000 00:14 2728326 /usr/bin/python2.7
55bf0d992000-55bf0da09000 rw-p 00325000 00:14 2728326 /usr/bin/python2.7
...
Example output when it gets to the "signing transaction" step:
Traceback (most recent call last):
File "/home/dieeasy/src/Electrum-2.7.18/plugins/ledger/qt.py", line 50, in auth_dialog
self.message_dialog(e)
File "/home/dieeasy/src/Electrum-2.7.18/plugins/ledger/qt.py", line 41, in message_dialog
l = QLabel(msg)
TypeError: arguments did not match any overloaded call:
QLabel(parent: QWidget = None, flags: Qt.WindowFlags = 0): argument 1 has unexpected type 'exceptions.ImportError'
QLabel(QString, parent: QWidget = None, flags: Qt.WindowFlags = 0): argument 1 has unexpected type 'exceptions.ImportError'
As an additional note, version 2.7.9 in debian repos can't send either but yields a dialog with just a "0" in it.
I have the same issue with the Ledger HW.1 It works in 2.7.15 and seems broken since 2.7.16. In da7e48f3a7e00689e71628f9a39242e10c7b45d4 the plugin was heavily altered, did this introduce this bug?
@btchip any idea? should I revert @neocogent's commit?
No idea but no need to revert IMHO, worst case scenario you should be able to select the other confirmation method and use the keycard as you did before. It'd be interesting to see what causes this crash though, as this seems to be UI related
the python traceback should be fixed by ddcdbfa181b74f1fb62666d48fdb40904bea8d0a the crash is probably a threading issue
I tried with 2.8.0. and now I noticed the problem was a missing dependency while importing auth2fa (websocket). ddcdbfa181b74f1fb62666d48fdb40904bea8d0a fixed the error message. @dieeasy does it work for you too?
@tompre thanks for the pointer
tried with 2.8.0 and first two times it just crashed with:
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
python: ../../src/xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted
and
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted
Third time, though, it didn't crash and I got the "No module named websockets" message back, confirming your hyphotesis. So I installed the python-websocket package and tried again but alas it again crashed 3+ consecutive times with the same errors.
Before giving up, given the errors always had to do with multi-threading, I launched electrum setting cpu affinity to a specific core with taskset -c 0 python electrum and it stopped crashing and after a short delay it asked for verification.
There appears to be an issue with mobile pairing, as it says (third option) "Mobile - Not paired" and "Click Pair button to begin pairing a mobile phone." but I see no "Pair" button, so I proceeded with (second option) "Security Card Challenge" and it went on... to crash with:
python: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
But, feels like swimming through issues, I noticed errors probably were changing in response to the ledger having just been plugged in (after starting electrum that is, in which case it asks me for the pin) or being plugged in already (before electrum starts and already unlocked in the previous test run, in which case it doesn't ask for the pin but the ledger icon in the lower right corner turns green nonetheless, which also itches me but that's another issue). I had initially skipped this detail to avoid delving into more than one issue at a time but given it was still failing I decided to give it a try and indeed it seems like if I unplug the ledger, start electrum, plug and unlock it with the pin, then it goes further and instead of crashing after security card challenge it successfully signs the transaction and broadcasts it (I briefly saw the dialog telling that)... even though it doesn't work and stops displaying:
error: The transaction was rejected by network rules. (16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation))
[010000... <- long number apparently truncated (no closing square bracket)
Upon further testing it started crashing again with the initial errors so I guess I'm done for now.
Experiencing similar trying to 'Send' with my brand-new Nano S. Running Electrum Rev. 2.8.1 with latest 1.3.1 firmware. Ledger Cust Support say these are 'known' problems with Electrum. It will occasionally work alright, but have to try several times unplugging & reconneting the Nano S dev and killing, restarting Electrum every time. Any help for this?
I'm the one who updated the plugin to support Mobile 2FA mode. I am aware of the issues and often I have to restart Electrum to get a successful send. I have debugged this a lot and not been able to locate any problem with my code. It does appear to be threading related and to do with Qt/X windows interaction. I have tried looking specifically at that and as far as I can tell it is something lower level perhaps in usb/serial handling.
I don't currently have time to dig deeper and so even for me right now I just restart Electrum and try again, since I don't need to send very often. During development it worked first time typically 8 out of 10 times but now in normal use I'd guess it's just as likely to fail as to work.
Note, the only error I ever get is crash after authorizing when it is trying to send the tx. I usually choose Preview and then build/send the tx as two steps. Other errors related to finding/loading WebSockets I am unaware of as I have always had websockets module installed and operable, and that module as optional was edited after my involvement.
For sure I'd like to be able to reproduce it on my day to day development laptop to dig into that. This seems to be highly configuration / timing dependent.
Any update on this issue?
I have the "joy" of experiencing this issue as well. Just ran the following command to generated some logs:
electrum -v >/tmp/electrum.ledger.hw1.log 2>/tmp/electrum.ledger.hw1.error.log
Happy to share these logfiles as attached. Hoping they might help with finding what is causing this issue. Currently I am getting the error almost always. Certainly often enough that I am using the Ledger chrome app instead.
electrum.ledger.hw1.log:
=> f026000000 <= 6d00 => e0c4000000 <= 012001000101109000 => e024000000 <= 019000 => e02280000130 <= 63c3 => e026000001ab <= 6a80 => e040000009028000002c80000000 <= 4104c97fbd91d1225c501ca23d2b956ae699082638231d77c072c90cc8e05b01cc9ab2c59d66a574bd3a5ca195a7073e744445e9512bafd1518a7791504cb758dbe822314871753876375571354d386d4632686f665a78797a594c5941396d595853413148bead0765dce0231f2e3660d03a9db9a4492f69828fe80759017caaa865f92aac9000 => e04000000d038000002c8000000080000000 <= 4104de742af92ea3b6f14c118dc851a52e13a8940bcb2a2785660cfcc76ffb51d0e9b1df67eb31cccb987aaa8bda253179b06341d3f0ce78aee91529396b28d56645223144333346414c557877626f68637433433636326a4557554a39396a6458667a71354534c61dfd25159f88e9f9080f8aaf71c570ec4c57838d4811355ac15e4cc7629000 => e042000009000000010100000009 <= 9000 => e042800025466e459c742ea9bc1cf2230f8b02769e03a7813742185f0489537df6667ba404010000006b <= 9000 => e04280006f483045022100a50bb3dbee9269739b31dcfd8dd97ef43203cb3033abb3e0b3b071f84bb074f502206faae8a7d5907b312aa418d9d1465e31f43eb7690686874d8f730b9a9234e65901210309da4de1e14dbc7aaeb489bc5b4830522ecb1cde14707f7c6e2602137fba2591ffffffff <= 9000 => e0428000250681dccf02d11368f72c4c40494cde1296cd2e0ee66c557691741a6dea3711ef000000006a <= 9000 => e04280006e47304402200f1420d3c43846933ac54a395b43983c5fc7e0a865b7beb751ffefa7b1b955ab0220795e79bf434d7ab6de95cacdcfed24a6eeaee84276811ed37d20077d213ebe250121026b69e8f8397ebce4b93486958ae3005476f57d6edc32054f014de622db5c9889ffffffff <= 9000 => e042800025e17db0c4c57e197b78479827fe362eb462d085a0d1f36bbc345f12a3be4a4799000000006a <= 9000 => e04280006e4730440220697a4fe474153ae4560f689edde26a80c126d968b34e82771fb3bf093ae76f4202202859df60286ab0b1cf6faed85852c3157c5210cc03b7d77dfc612b8c2835b3bc01210274750949db8fcb9436965061c460755f41b17ee34a205c960f720218379e6a3fffffffff <= 9000 => e04280002558503578df23545941873dadc8486fddf0e724a1fafc5d04ce7360fc4ce13914010000006b <= 9000 => e04280006f4830450221009c1ea945aa70120e785176488879233a94688ede3fe53fad69f53fbad3cd1773022074f00e194da86f8d6bad0ee2ea34a9f9fd4631bc2c3d28712073c7fd02f4f3ec01210356b155e7c4f7940bd1dc9307c733acbebba9cde314db3b6c3209710b4b2641afffffffff <= 9000 => e042800025e4488ac83f92a54fec8a3acc737b36614bae37597c849cbc9f12d110b70d1c80000000006b <= 9000 => e04280006f483045022100b71a39290e40e6a49732315871ee962349a81ac258ec167befa2eeed72a499280220750cf40221ff45031476ce3c5669381e3221d933e6b16ca16f32890fef9c7586012103f3ffd17834d9b6cb63532e16252fa1573e1156a71b0f0b6149d5c8a45b033761ffffffff <= 9000 => e0428000251d90923764ebe1d16b87bfb2f49391e9729fea65512e6d195bc8c604cf650f3e010000006b <= 9000 => e04280006f483045022100c920cece1d191d79aae2eb6dc5cfc61bc5c0c3f2a57e7a0a0ab06706bba71313022061c8d1b7ed7361742d9c919222f548c6a66f5ee1cfe2723ab7d05b0150c60d7a012102fc6976a0922b4b75fea0aaeeeb46897a88692569d75ee4eb7eb44a13e15b83c9ffffffff <= 9000 => e042800025643e78af5c6319f816ef2804d91bc28bda0d37bdda0a63eff2a7bc267e7e9151000000006b <= 9000 => e04280006f483045022100e0e35decd4800e7a618804b61519c81116821ed33274b10fff0f16a7c92ad95f02204160f3a25921db90627499cbbfd8de9de651f7d2c375470f6e17b30f051eb6810121039e897a190a4d27b052342b16bf1754534b77e3a4ac95d471e28b1e2ba0aa62ceffffffff <= 9000 => e042800025e6e87af98ed0dd486d7b582cac6f0e78c2bc92ab1f16079ee283154f2d088e05000000006a <= 9000 => e04280006e473044022026ff7fb07759997632b4006b15e4a40a198ffae51f2afbc91fc9d6a59212c82202202e5d0c66ad177ea28afbee39aed20902ba534bc038e75dd02d0c220ab1c861a5012102793a5520df42509856daa8e998930f4e4ecdb2e8b40888827c9b885db0cac0e2ffffffff <= 9000 => e0428000251a12af230c84aee7f408b5d2ab42ea5fa1eca326dd37105b3377df41a7faafdf010000006b <= 9000 => e04280006f4830450221008ae2d91460a8b58fa969dd4e71744b6fcf837544f162ce690b6b0e681806aba802200405b6b5dd182166d158567e1eb4f68077e1fbdf713d4b75f8748801c1fdc1e90121035ee05e5a9d48151f26377cc2f4fa35f8c2b6e8d0eb8a53803b32505df972e2dfffffffff <= 9000 => e04280000102 <= 9000 => e042800009d84c88020000000017 <= 9000 => e042800017a914e905f810af5bfde992a4afb637079966af215a3487 <= 9000 => e0428000094bdf04000000000019 <= 9000 => e04280001976a91447ca679a9592fe3dd91248b60c7e3682fa76f15d88ac <= 9000 => e04280000400000000 <= 3200d5a3d73dcb5bb213394f7abfdf62717f41624a45ff5753172b0f862e22dfc69d7899010000004bdf040000000000fda94adfaf7fd0389000 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/electrum_plugins/ledger/ledger.py", line 347, in sign_transaction self.get_client().enableAlternate2fa(False) AttributeError: btchip instance has no attribute 'enableAlternate2fa'
electrum.ledger.hw1.error.log:
[SimpleConfig] electrum directory /home/mark/.electrum [Plugins] registering hardware digitalbitbox: ('hardware', 'digitalbitbox', u'Digital Bitbox wallet') [Plugins] loaded greenaddress_instant [Plugins] registering hardware keepkey: ('hardware', 'keepkey', u'KeepKey wallet') [Plugins] loaded labels [Plugins] registering hardware ledger: ('hardware', 'ledger', u'Ledger wallet') [Plugins] registering hardware trezor: ('hardware', 'trezor', u'TREZOR wallet') [Plugins] registering wallet type ('2fa', 'trustedcoin') [profiler] init 0.0472 [Network] starting network [Network] setting proxy {'user': u'', 'host': u'127.0.0.1', 'password': u'', 'mode': u'socks5', 'port': u'9050'} [Network] connecting to 4yi77lkjgy4bwtj3.onion:50002:s as new interface [FxThread] using exchange BitcoinAverage [WalletStorage] wallet path /home/mark/.electrum/wallets/Ledger BUDA [Plugins] loaded ledger [profiler] load_transactions 0.0011 [profiler] build_reverse_history 0.0001 [profiler] check_history 0.0002 [BitcoinAverage] requesting fx history for AUD [BitcoinAverage] getting fx quotes for AUD [profiler] on_update 0.0095 [DeviceMgr] getting client for keystore [DeviceMgr] scanning devices... [labels] wallet Ledger BUDA nonce is 3 [labels] asking for labels since nonce 2 [DeviceMgr] Registering <electrum_plugins.ledger.ledger.Ledger_Client instance at 0x7f1148eea320> [profiler] on_update 0.0175 [us11.einfachmalnettsein.de] failed to connect 0x05: Connection refused [Electrum.hsmiths.com] SSL error: ('_ssl.c:574: The handshake operation timed out',) [kirsche.emzy.de] SSL error: ('_ssl.c:574: The handshake operation timed out',) [electrum.no-ip.org] SSL error: ('_ssl.c:574: The handshake operation timed out',) [66.23.245.121] SSL error: ('_ssl.c:574: The handshake operation timed out',) [4yi77lkjgy4bwtj3.onion] connected [Network] switching to 4yi77lkjgy4bwtj3.onion:50002:s [Network] sending subscriptions to 4yi77lkjgy4bwtj3.onion:50002:s 0 0 [erbium1.sytes.net] SSL error: ('_ssl.c:574: The handshake operation timed out',) [DeviceMgr] end client for keystore [electrum.villocq.com] SSL error: ('_ssl.c:574: The handshake operation timed out',) [node.xbt.eu] SSL error: ('_ssl.c:574: The handshake operation timed out',) [btc.smsys.me] SSL error: ('_ssl.c:574: The handshake operation timed out',) [4yi77lkjgy4bwtj3.onion] requesting header 463703 [Network] fee_estimates[25] 136436 [Network] fee_estimates[10] 148481 [Network] fee_estimates[5] 162649 [BitcoinAverage] received fx quotes [profiler] on_update 0.0209 [Network] fee_estimates[2] 219046 [Network] relayfee 1000 [s7a3q57rg5qy567w.onion] SSL error: ('_ssl.c:574: The handshake operation timed out',) [profiler] write 0.0000 [profiler] save_transactions 0.0019 [BitcoinAverage] received fx history for AUD [4yi77lkjgy4bwtj3.onion] requesting header 463702 [profiler] on_update 0.0292 [profiler] on_update 0.0222 [4yi77lkjgy4bwtj3.onion] requesting header 463701 [labels] received 2 labels [labels] set Ledger BUDA nonce to 1 [4yi77lkjgy4bwtj3.onion] requesting header 463700 [electrum.trouth.net] failed to connect Socket error: timed out [elec.luggs.co] SSL certificate signed by CA [elec.luggs.co] connected [4yi77lkjgy4bwtj3.onion] requesting header 463699 [gh05.geekhosters.com] connected [electrum.anduck.net] connected [elex01.blackpole.online] connected [4yi77lkjgy4bwtj3.onion] requesting header 463698 [4yi77lkjgy4bwtj3.onion] requesting header 463697 [4yi77lkjgy4bwtj3.onion] requesting header 463696 [b.1209k.com] failed to connect Socket error: timed out [4yi77lkjgy4bwtj3.onion] requesting header 463695 [4yi77lkjgy4bwtj3.onion] requesting header 463694 [electrum.be] connected [4yi77lkjgy4bwtj3.onion] requesting header 463693 [ecdsa.net] connected [profiler] estimated_size 0.0002 [profiler] estimated_size 0.0002 [4yi77lkjgy4bwtj3.onion] requesting header 463692 [fdkbwjykvl2f3hup.onion] failed to connect Socket error: timed out [profiler] estimated_size 0.0002 [profiler] estimated_size 0.0001 [profiler] estimated_size 0.0001 [4yi77lkjgy4bwtj3.onion] requesting header 463691 [4yi77lkjgy4bwtj3.onion] requesting header 463690 [DeviceMgr] getting client for keystore [DeviceMgr] scanning devices... [DeviceMgr] end client for keystore [DeviceMgr] getting client for keystore [DeviceMgr] scanning devices... [DeviceMgr] end client for keystore [DeviceMgr] getting client for keystore [DeviceMgr] scanning devices... [DeviceMgr] end client for keystore [DeviceMgr] getting client for keystore [DeviceMgr] scanning devices... [DeviceMgr] end client for keystore [DeviceMgr] getting client for keystore [DeviceMgr] scanning devices... [DeviceMgr] end client for keystore btchip instance has no attribute 'enableAlternate2fa' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/electrum_gui/qt/util.py", line 582, in run result = task.task() File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 1118, in sign_transaction k.sign_transaction(tx, password) File "/usr/local/lib/python2.7/dist-packages/electrum_plugins/ledger/ledger.py", line 382, in sign_transaction self.give_error(e, True) File "/usr/local/lib/python2.7/dist-packages/electrum_plugins/ledger/ledger.py", line 197, in give_error raise Exception(message) Exception: btchip instance has no attribute 'enableAlternate2fa' [4yi77lkjgy4bwtj3.onion] requesting header 463689 [4yi77lkjgy4bwtj3.onion] requesting header 463688 [4yi77lkjgy4bwtj3.onion] requesting header 463687 [4yi77lkjgy4bwtj3.onion] requesting header 463686 [ElectrumWindow/Ledger BUDA] close_wallet /home/mark/.electrum/wallets/Ledger BUDA [Plugins] stopped [profiler] save_transactions 0.0010 [Network] stopping network [Network] stopped [WalletStorage] saved /home/mark/.electrum/wallets/Ledger BUDA [profiler] write 0.0089 [Daemon] shutting down network [Daemon] stopped
I am getting python: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. error on ubuntu 16.04 in virtualbox after signing a message.
@btchip try reproducing it in virtualbox. I also got these two errors after increasing the number of cpus to 2:
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/electrum_gui/qt/util.py", line 582, in run
result = task.task()
File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 1553, in sign_message
return self.keystore.sign_message(index, message, password)
File "/usr/local/lib/python2.7/dist-packages/electrum_plugins/ledger/ledger.py", line 228, in sign_message
self.give_error(e, True)
File "/usr/local/lib/python2.7/dist-packages/electrum_plugins/ledger/ledger.py", line 197, in give_error
raise Exception(message)
Exception: Exception : Invalid status 6985
python: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
Was there any update on trying to get a ledger nano (not the nano S) to sign the transaction? Made the mistake of trying to setup a multisig with the old nano on 2.8.3, and there is no security card prompt. Does anyone have an idea of how I could build the transaction to broadcast? Any options here...?
Same issue here with a transaction via electrum. Worked fine on the chrome app: 16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)
that's a totally different issue (which unfortunately I don't have the time to debug either)
Same issue as jus - 16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)
Electrum is dead for me. Forced to switch to chrome wallet.
This is an error returned by the electrum server. It originates from underlying bitcoind for almost all errors which the server doesn't handle, ie. generic error even though message implies otherwise.
It's has been returned lately because of users trying to do BCC/BTC on mismatched chain.
I know this because I traced it back through server to the underlying rpc call a couple days ago. It's not specific to Ledger Nano.
Ideally, the server should provide a better description for what whatever the RPC call returns so that users can understand and differentiate various problems.
The 16: mandatory-script-verify-flag-failed error (which is not what this issue was originally about and probably should have it own) happened to me today and I took some time to try and track it down. I wanted to add some info here about this.
I did my first ledger tx in 6 months and so this appears to be something new (worked fine before with same wallet and nano). I tried several times and even varied the inputs, though always between 2 - 4 inputs. It happened in every case. I recorded the raw tx result that failed and then restored my ledger seed in an electrum offline wallet and created an identical 4 input tx to match. This one broadcast perfectly ok.
So I started comparing the raw hex tx data and everything matches except actual DER encoded signature data. That is, all outputs data and inputs data is identical. The DER encoded pubkey appended to each input signature is identical. But the DER encoded signature data for every input changed. Now I believe this should happen due to random values being used in the signing, but this tells me that beyond just that, the only difference is something internal to signing results.
At first I thought this was a DER encoding error since the prefix/length values were changing on inputs but further study of this showed the encoding appears fine.
Having a look back at commits over the last few months I see one in particular that updates the pre-image for signing to be segwit compatible which could possibly now be invalid. I have not had a chance yet to revert before that commit and test if the error goes away and what may be causing it. I'd like to test further but I will need to use testnet due to lack of small change and not wanting to mess with my offline wallet.
@btchip Does the nano/hw1 work with testnet? Can I just wipe it and create a testnet wallet to go back and do some trials and compare between tx data using testnet? I'd like to track this down as otherwise the hardware is defunct (which would make me very unhappy). Thx.
yes, it works fine with testnet - if you don't initialize it manually it'll return an invalid prefix though but you don't really care about that. Also the Segwit patch should also be good as I tested it back in the days - you can test it with Nano/HW.1 after upgrading to firmware 1.0.2 with our latest Chrome appilcation (or https://fup.hardwarewallet.com)
I unfortunately didn't have the time to look at the issue yet, but I'd suggest the following based on previous experience :
- Check that the input sequence is properly sent to the Python API (otherwise you'd end up signing with a default sequence number of FFFFFFFF, which invalidates the signature)
- Same for the TX version (default is 1) - this was wasn't included in 1.0.20, so might be a likely candidate
- Same for locktime (default is 0)