Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI wallet suddenly not opening through Trezor Model T #4105

Open
Benjvoo opened this issue Jan 18, 2023 · 93 comments
Open

GUI wallet suddenly not opening through Trezor Model T #4105

Benjvoo opened this issue Jan 18, 2023 · 93 comments

Comments

@Benjvoo
Copy link

Benjvoo commented Jan 18, 2023

Hello and best wishes to you all. A quick question from a beginner to Monero gui wallet. I was able to set up GUI wallet and use it through the Trezor Model T. The set up was working great. Had not opened the wallet for a month and when I recently tried to open it I could not get past the second password requirement (which asks for the Trezor device password, the primary XMR GUI password is accepted). Getting an error message "Couldn't open wallet cannot get a device address." I've turned off all anti virus programs, even tried outside VPN. No luck. Has anyone encountered this problem or have any suggestions? Thanks so much

@selsta
Copy link
Collaborator

selsta commented Jan 21, 2023

Can you add a screenshot of the exact error?

Also did you try entering an empty passphrase?

@plowsof
Copy link
Contributor

plowsof commented Jan 21, 2023

@selsta monero-project/monero#8713 related?

@Benjvoo
Copy link
Author

Benjvoo commented Jan 22, 2023

I should mention I'm on Windows 10. The passwords must be correct because the Trezor password opens Trezor Suite software and the initial log in window for Moneru GUI wallet works. It is the 2nd password step that is failing (into which I am to enter the Trezor password). I have tired the 2nd password screen with no password and it is the same error. I will paste screenshot below. Any ideas would be greatly appreciated. The screenshot the error screen I am receiving directly after inputting the 2nd step (Trezor) password.
Fullscreen capture 1222023 25555 PM

@Benjvoo
Copy link
Author

Benjvoo commented Jan 22, 2023

@selsta monero-project/monero#8713 related?

yes same , sorry if I added confusion

@selsta
Copy link
Collaborator

selsta commented Jan 26, 2023

@ph4r05 any idea here?

@ph4r05
Copy link
Contributor

ph4r05 commented Jan 26, 2023

It would be great if we can get the Monero GUI logs. Message "Cannot get a device address" is from the first message call to the Trezor, there are various checks performed, so having logs could help identifying the culprit.

@Benjvoo, pls check if TrezorSuite enabled Passphrase for Trezor. The thing is that any passphrase works in principle with Trezor. No error will be shown if you type totally different passphrase, as it generates new wallet secrets for that particular passphrase (to any passphrase exists some wallet secret, plausible deniability). So if you created a Monero wallet with another passphrase that you are using now, you will be getting errors like this. Try various possible passphrases.

Then there is a wallet password - totally unrelated to Trezor. Any Monero wallet has it, it is used to encrypt wallet file on the PC.

Few suggestions:

  • Try reconnecting Trezor
  • TrezorSuite cannot be running simultaneously with Monero wallet
  • Make sure Trezor bridge is installed
  • Try empty passphrase

@HumanG33k
Copy link

Not sure it's related but on my macOs when i first updated to last version the app crash after password asking form. After i read the stacktrace i see it's try to open the previous version. So instead of replace current .app in software i delete existing one and install the new version (drag & drop). And it works. If dev need the stacktrace i made a backup.

@thestinger
Copy link

I can reproduce this issue on Arch Linux where monero-gui-wallet is dynamically linked against libusb (1.0.26) and hidapi (0.13.1) so I don't think the issue is caused by out-of-date dependencies. Trezor Suite works fine. Issue occurs with or without running trezord (Trezor Bridge), which I've never needed to run separately before. Downgrading to an old release of the Monero software doesn't resolve the issue so I suspect it was caused by a recent Trezor Model T firmware update, but that doesn't mean the problem is in the Trezor Model T firmware rather than the Monero wallet.

@thestinger
Copy link

@ph4r05 The hardware wallet passphrase entry dialog never appears after entering the wallet passphrase. monerod crashes. I haven't yet gotten a useful traceback since Arch packages have debug symbols stripped. There are split debug packages and I can translate the traceback later when I have time.


2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:133	Exception: boost::wrapexcept<boost::system::system_error>
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:134	Unwound call stack:
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [1] /usr/bin/monerod(+0x5eaad) [0x5c334378daad]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [2] /usr/bin/monerod(+0x192b96) [0x5c33438c1b96]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [3] /usr/bin/monerod(+0x276503) [0x5c33439a5503]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [4] /usr/bin/monerod(+0x27c3e6) [0x5c33439ab3e6]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [5] /usr/bin/monerod(+0x2aa1a0) [0x5c33439d91a0]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [6] /usr/bin/monerod(+0x2ad572) [0x5c33439dc572]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [7] /usr/bin/monerod(+0x1749e2) [0x5c33438a39e2]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [8] /usr/lib/libc.so.6(+0x23790) [0x71667943c790]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [9]  0x8a) [0x71667943c84a]:__libc_start_main+0x8a) [0x71667943c84a]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	    [10] /usr/bin/monerod(+0x1885c5) [0x5c33438b75c5]
2023-02-17 04:05:30.873	    716679ceda00	INFO	stacktrace	src/common/stack_trace.cpp:172	

@prusnak
Copy link
Contributor

prusnak commented Feb 17, 2023

a recent Trezor Model T firmware update

What version of Trezor firmware are you using right now?
Do you remember what version you were using before the update?

Here's the list of Trezor Model T updates which might help figuring the versions out:

  • 2.5.3 (16th November 2022)
  • 2.5.2 (17th August 2022)
  • 2.5.1 (18th May 2022)
  • 2.4.3 (8th December 2021)

@prusnak
Copy link
Contributor

prusnak commented Feb 17, 2023

Worth checking out - can these be related? trezor/trezor-firmware#2811

@thestinger
Copy link

Currently on 2.5.3 and likely have been since early December at at the latest. Would have previously been on 2.5.2 since early September at the latest. It could be that it stopped working after updating to 2.5.3.

I send a Bitcoin transaction every month to fund multiple other developers but I don't regularly use the other cryptocurrencies. Been checking on the Monero every few months to see how much is available and noticed a few days ago that it was no longer working. This issue was fairly issue to find.

After entering the Monero GUI wallet decryption password, the Trezor Model T prompts for the passphrase but the Monero GUI wallet shows an error caused by the issue above instead of showing the usual prompt for choosing between entry on the computer or the hardware wallet.

I tried several older Arch Linux releases of the Monero GUI wallet which required running it in a container where I had to install OpenSSL 1.1.x and downgrade Boost since it was linked against older library versions. I tried ones from mid-2022 back when it was definitely working.

I don't know what has changed in the Trezor firmware recently but my suspicion was that it's either a firmware bug or a Monero GUI wallet bug that was previously not triggered until after a firmware update. Not necessarily a firmware bug but I think it was caused by a firmware change even if the bug is on the Monero wallet side of things.

@selsta
Copy link
Collaborator

selsta commented Feb 17, 2023

@thestinger can you reproduce with the getmonero.org binaries?

@thestinger
Copy link

I'll try that next.

I just tried moving away my current wallet state and restoring which didn't work and triggered a similar error.

@prusnak
Copy link
Contributor

prusnak commented Feb 17, 2023

@thestinger you can also try downgrading to 2.5.2 via trezorctl firmware update --version 2.5.2 (the seed will not be erased because the minor version stays the same, but anyway, don't do this unless you are 100% sure you can recover if something goes bad).

@thestinger
Copy link

@prusnak I have proper seed phrase backups and could do a dry run test and then test that.

@thestinger
Copy link

thestinger commented Feb 17, 2023

@selsta Doesn't help. This is the error I get running it without trezord:

2023-02-17 20:53:44.558	E Get public address exception: Trezor returned unexpected message: 17
2023-02-17 20:53:44.559	E !dev_cold->get_public_address_with_no_passphrase(device_account_public_address). THROW EXCEPTION: error::wallet_internal_error
2023-02-17 20:53:44.559	E Error opening wallet: Cannot get a device address
2023-02-17 20:53:44.559	E Error opening wallet with password:  Cannot get a device address

This is the error with trezord running separately:

2023-02-17 20:56:24.200	    76b2c4c566c0	WARNING	wallet.wallet2	src/wallet/wallet2.cpp:4482	Account on device. Initing device...
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:133	Exception: std::runtime_error
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:134	Unwound call stack:
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [1] monero-wallet-gui(+0x1566c6) [0x5eb829f786c6]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [2] monero-wallet-gui(+0x4ca45d) [0x5eb82a2ec45d]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [3] monero-wallet-gui(+0x30a7ba) [0x5eb82a12c7ba]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [4] monero-wallet-gui(+0x284cb7) [0x5eb82a0a6cb7]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [5] monero-wallet-gui(+0x2aba1f) [0x5eb82a0cda1f]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [6] monero-wallet-gui(+0x23381d) [0x5eb82a05581d]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [7] monero-wallet-gui(+0x233bb5) [0x5eb82a055bb5]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [8] monero-wallet-gui(+0x23d6a6) [0x5eb82a05f6a6]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [9] /usr/lib/libQt5Core.so.5(+0xe8251) [0x76b2cb6e8251]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [10] /usr/lib/libQt5Core.so.5(+0xe432a) [0x76b2cb6e432a]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [11] /usr/lib/libc.so.6(+0x85bb5) [0x76b2caa9ebb5]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	    [12] /usr/lib/libc.so.6(+0x107d90) [0x76b2cab20d90]
2023-02-17 20:56:24.200	    76b2c4c566c0	INFO	stacktrace	src/common/stack_trace.cpp:172	

@thestinger
Copy link

Note: that traceback is from the getmonero.org release rather than the Arch Linux build like the previous one above.

@thestinger
Copy link

thestinger commented Feb 17, 2023

That get_public_address_with_no_passphrase method call is suspicious because I do have a BIP39 passphrase for it so it looks like it's doing the wrong thing.

@thestinger
Copy link

Worth checking out - can these be related? trezor/trezor-firmware#2811

This does seem related.

@matejcik
Copy link

message 17 is Features.

This looks more like some sort of crosstalk: Monero is expecting a response for GetPublicKey (or the Monero equivalent) but is getting back Features. This is not something a Trezor device will just randomly do in a firmware upgrade. Either there is another program talking to the device at the same time (?) or Monero introduced a bug where they call Initialize or GetFeatures and then don't read the response. The subsequent call would send a new message, but read the previous response.

@thestinger
Copy link

There's nothing else running and Trezor Suite runs fine, so it must be a Monero GUI Wallet bug. I'm not sure why older releases didn't work for me. I could try older releases from the official site next instead of older Arch packages which may simply be having issues due to not downgrading enough packages in the container where I tried to get that to work.

@thestinger
Copy link

It could be from a dependency that got updated both in the Monero GUI Wallet and in Arch Linux.

@ph4r05
Copy link
Contributor

ph4r05 commented Feb 18, 2023

I can check @matejcik 's suggestion on reading Features / Initialize response correctly

@ph4r05
Copy link
Contributor

ph4r05 commented Feb 18, 2023

@thestinger

There's nothing else running and Trezor Suite runs fine

Just to clarify, when using Monero GUI, Trezor Suite is not running, correct?
Ideally:

  • stop all applications that may be using Trezor device (Trezor suite, maybe https://suite.trezor.io/web/ is running in some web browser tab)
  • kill even monero-gui
  • reconnect Trezor to make sure it is reset to a default state
  • start Monero GUI

Another option is to recompile Monero from sources on your machine with debugging (@selsta it is make debug, right?), if possible. We could get more useful info, including debugging logging messages.

Function get_public_address_with_no_passphrase being called is OK, in the linked flow we firstly try opening Trezor without passphrase and match it to the address stored in your wallet. If this fails, Passphrase will be prompted. https://github.com/monero-project/monero/blob/75d80d431a9586996c559cb39f3eabebad3da60a/src/wallet/wallet2.cpp#L4501

You get an error during the first logical message message to the Trezor. It seems that it may be left in invalid state or something else was talking to it.

@matejcik I presume there was no change of the init / passphrase flow since the last upgrade which we integrated to monero codebase, right?

I will go through passphrase logic in monero codebase in the following days and do some cleanup, remove old code and backward compatibility with old devices, this should make code simpler.


@matejcik

message 17 is Features.

This looks more like some sort of crosstalk: Monero is expecting a response for GetPublicKey (or the Monero equivalent) but is getting back Features. This is not something a Trezor device will just randomly do in a firmware upgrade. Either there is another program talking to the device at the same time (?) or Monero introduced a bug where they call Initialize or GetFeatures and then don't read the response. The subsequent call would send a new message, but read the previous response.

This is a good hypothesis. I've just checked it out, I initialize Trezor with
https://github.com/monero-project/monero/blob/da9aa1f7f802552b9de459f331a2f39c84898009/src/device_trezor/device_trezor_base.cpp#L385

But client_exchange https://github.com/monero-project/monero/blob/da9aa1f7f802552b9de459f331a2f39c84898009/src/device_trezor/device_trezor_base.hpp#L143

always calls call_raw https://github.com/monero-project/monero/blob/da9aa1f7f802552b9de459f331a2f39c84898009/src/device_trezor/device_trezor_base.cpp#L281 which is basically write and read. We should always read the response.

@thestinger
Copy link

Trezor Suite and other applications that may use it aren't running and it happens with it freshly connected and unlocked. I can try on Windows and macOS instead of Arch Linux since there are other computers around, although they don't have the Monero state on them.

@ph4r05
Copy link
Contributor

ph4r05 commented Feb 18, 2023

Another idea - increase log level to capture also debugging logs and pls check which transfer protocol is used for Trezor comm

@RootInit
Copy link

RootInit commented Feb 23, 2023

I also have this issue.
The Appimage version works.

@ph4r05
Copy link
Contributor

ph4r05 commented Feb 23, 2023

Another tip - do you have just one Trezor connected?

@thestinger
Copy link

Using the official Trezor Bridge release doesn't resolve the issue for me, and neither does using a self-built trezord. I also tried building a couple older versions of trezord and nothing helped.

@ph4r05
Copy link
Contributor

ph4r05 commented Mar 15, 2023

@thestinger can you pls provide logs? #4105 (comment)

MONERO_LOG_LEVEL=4 /Applications/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui

and also

trezorctl list

As a last resort you can try building this PR which has libusb compilation fixed monero-project/monero#8752

@thestinger
Copy link

With or without running Trezor Bridge (trezord) separately?

@ph4r05
Copy link
Contributor

ph4r05 commented Mar 15, 2023

@thestinger pls keep running trezord and try trezorctl list

@thestinger
Copy link

trezorctl list shows webusb:004:2 and bridge:1 with trezord 2.0.32. Trying to use TREZOR_PATH=bridge:1 monero-wallet-gui or TREZOR_PATH=webusb:004:2 monero-wallet-gui doesn't change anything. Can confirm trezord / trezorctl does work fine separately from the Monero wallet software.

@prusnak
Copy link
Contributor

prusnak commented Mar 15, 2023

@thestinger

  1. Can you also try TREZOR_PATH=bridge:1 monero-wallet-gui with trezord 2.0.27 (from http://suite.trezor.io/web/bridge/)?
  2. Can you also try TREZOR_PATH=webusb:xxx monero-wallet-gui with the patch from trezor: support v2.5.2+, more tests, fix chaingen, static libusub fix monero#8752?

@thestinger
Copy link

Same thing with trezord 2.0.27 and TREZOR_PATH=bridge:1. Also, not getting any useful logs from monero-wallet-gui just the same:

2023-03-15 09:59:57.227	W Account on device. Initing device...
2023-03-15 09:59:57.228	E Error opening wallet: device not found: Trezor
2023-03-15 09:59:57.263	E Error opening wallet with password:  device not found: Trezor

I can try building it later with the patch.

@selsta
Copy link
Collaborator

selsta commented Mar 15, 2023

@thestinger how did you install monero-wallet-gui ? The logs look like you compiled without Trezor support.

@arbolis
Copy link

arbolis commented Mar 16, 2023

@arbolis Trezor Suite cannot be running when you want to use Monero wallet.

If Monero GUI is not able to find your Trezor, install Trezor Bridge

I never had to install Trezor Bridge before, and I never faced any problem before. Anyway, for the sake of it, I installed the latest version of Trezor Bridge (2.0.30). I can confirm it works from my browser (checking its status). I then ran Monero GUI, entered my passphrase, and.... exactly the same message as above. Cannot find the Trezor (while it is unlocked).

@thestinger
Copy link

@selsta Tried both the official release and the Arch Linux package. Both have Trezor support.

@selsta
Copy link
Collaborator

selsta commented Mar 16, 2023

@thestinger "device not found: Trezor" means it's compiled without Trezor support. Can you post the exact error message you are getting with the getmonero.org binary?

@ph4r05
Copy link
Contributor

ph4r05 commented Mar 16, 2023

Same thing with trezord 2.0.27 and TREZOR_PATH=bridge:1. Also, not getting any useful logs from monero-wallet-gui just the same:

2023-03-15 09:59:57.227	W Account on device. Initing device...
2023-03-15 09:59:57.228	E Error opening wallet: device not found: Trezor
2023-03-15 09:59:57.263	E Error opening wallet with password:  device not found: Trezor

It is better to enable full debugging (either MONERO_LOG_LEVEL=4 or --log-level 4), correct build is able to detect both Webusb and Bridge interfaces (consistent with pip install trezor; trezorctl list):

2023-03-16 21:52:14.516	     0x1e2558140	DEBUG	device.trezor	src/device_trezor/device_trezor_base.cpp:125	Enumeration yielded 2 Trezor devices
2023-03-16 21:52:14.517	     0x1e2558140	DEBUG	device.trezor	src/device_trezor/device_trezor_base.cpp:127	  device: WebUsbTransport<path=webusb:001:1, vendorId=4617, productId=21441, deviceType=TrezorT>
2023-03-16 21:52:14.517	     0x1e2558140	DEBUG	device.trezor	src/device_trezor/device_trezor_base.cpp:127	  device: BridgeTransport<path=bridge:4, info={"path":"4","vendor":4617,"product":21441,"debug":true,"session":null,"debugSession":null}, session=None>

Also, Webusb is preferred approach as Trezor bridge may be left in inconsistent state and may require reset (pkill -9 trezord) + device reconnect.

I can try building it later with the patch.

Did you pls try this? Thanks!

@arbolis
Copy link

arbolis commented Mar 31, 2023

I just tested to download Monero GUI from the website itself rather than using the Arch Linux repository. That was it. Now everything works fine. It means whoever compiled Monero GUI for Arch Linux stopped to do it with Trezor support.

@kpcyrd
Copy link

kpcyrd commented Apr 3, 2023

hi, I'm the maintainer of the monero and monero-gui Arch Linux packages. There's nothing explicitly disabling hardware wallets so it seems the binary sometimes just doesn't have support, there's an earlier bug report from 2021 and I've tried to acquire a hardware wallet to test with but failed.

The package is currently built like this:

mkdir -p build && cd build
cmake -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D WITH_DESKTOP_ENTRY=OFF -D WITH_UPDATER=OFF ../
make

In the Arch Linux bug report somebody noticed the buildlog contains this line:

-- Trezor support disabled

I've searched the code base for this string and there's no matches in the monero-gui repo, but the monero repo mentions it (disclaimer that I'm not good at reading cmake):

src/device_trezor/CMakeLists.txt

# Protobuf and LibUSB processed by CheckTrezor
if(DEVICE_TREZOR_READY)
    message(STATUS "Trezor support enabled")

    [...]

else()
    message(STATUS "Trezor support disabled")
    monero_private_headers(device_trezor)
    monero_add_library(device_trezor device_trezor.cpp)
    target_link_libraries(device_trezor PUBLIC cncrypto)
endif()

I've then searched for DEVICE_TREZOR_READY and found this:

cmake/CheckTrezor.cmake

# Try to build protobuf messages
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED)
    [...]

    execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py ${TREZOR_PROTOBUF_PARAMS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
    if(RET)
        message(WARNING "Trezor protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})."
                "OUT: ${OUT}, ERR: ${ERR}."
                "Please read src/device_trezor/trezor/tools/README.md")
    else()
        message(STATUS "Trezor protobuf messages regenerated out: \"${OUT}.\"")
        set(DEVICE_TREZOR_READY 1)
        add_definitions(-DDEVICE_TREZOR_READY=1)
        add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)

        [...]

        if(CMAKE_BUILD_TYPE STREQUAL "Debug")
            add_definitions(-DTREZOR_DEBUG=1)
        endif()

It seems either any of Protobuf_FOUND, USE_DEVICE_TREZOR, TREZOR_PYTHON, Protobuf_COMPILE_TEST_PASSED are false-y or python tools/build_protob.py [...] has failed, which would also build a binary without hardware wallet support instead of error-ing the build as I would want it to (to let me know I need to fix something).

I also recalled this other line in the build log:

-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) 

I assume TREZOR_PYTHON is either an empty string or null, I recall python was at some point removed from the default Arch Linux build environment, so I added python as an explicit makedepends=, which now prints these lines during build:

-- Found PythonInterp: /usr/bin/python (found version "3.10.10") 
[...]
-- Trezor support enabled

I've uploaded this as monero-gui-0.18.2.0-2-x86_64.pkg.tar.zst, I have no hardware to test this with but I hope this helps. If there's a more reliable way to build the binary with enabled hardware wallet support please let me know.

@ph4r05
Copy link
Contributor

ph4r05 commented Apr 4, 2023

@kpcyrd thanks for your investigation, I may change cmake so if fails if trezor compilation is not disabled and it fails for some reason.

@thestinger
Copy link

@kpcyrd The new Arch package works for me. Thanks! Still get the error from earlier with the official release:

#4105 (comment)

Not able to invest more time in this. Very happy to have it working though.

@kpcyrd
Copy link

kpcyrd commented Apr 4, 2023

@ph4r05 that would be great!

@ph4r05
Copy link
Contributor

ph4r05 commented Apr 5, 2023

So if USE_DEVICE_TREZOR is enabled and Trezor support cannot be built for some reason, build fails with descriptive error message. PR: monero-project/monero#8752

@realsetvin
Copy link

I had this issue today, when I typed in my phrase on the device itself it actually worked.

@realsetvin
Copy link

I was able to solve this issue by closing trezor suite, which was running at the same time as gui.

@dement6d
Copy link

dement6d commented Apr 17, 2024

having this same issue on Archcraft x86_64 (6.8.2-arch2-1), tried a full system upgrade, tried using monero-wallet-cli and monero-wallet-gui, both unable to connect to my trezor. i dont have trezor suite open but trezor suite works fine. i tried with the built in trezord and i also built trezord-go, neither get any calls from the monero wallet but they do get calls from the trezor web app or when i just make a post call to it myself, so trezord is working. my trezor firmware is up to date and so are both monero and monero-gui
here is my .bitmonero/monero-wallet-gui.log:

2024-04-17 06:19:43.645	   7a05db237000	INFO	logging	contrib/epee/src/mlog.cpp:273	New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.ssl:FATAL,net.p2p:FATAL,net.cn:FATAL,daemon.rpc:FATAL,global:INFO,verify:FATAL,serialization:FATAL,daemon.rpc.payment:ERROR,stacktrace:INFO,logging:INFO,msgwriter:INFO
2024-04-17 06:19:43.645	   7a05db237000	WARNING	frontend	src/wallet/api/wallet.cpp:411	Logging to "/home/demented/.bitmonero/monero-wallet-gui.log"
2024-04-17 06:19:43.647	   7a05db237000	WARNING	frontend	src/wallet/api/wallet.cpp:411	file:///usr/lib/qt/qml/QtQuick/Controls/ApplicationWindow.qml:259:9: QML ContentItem: Binding loop detected for property "implicitWidth"
2024-04-17 06:23:23.824	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:133	Exception: std::runtime_error
2024-04-17 06:23:23.824	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:134	Unwound call stack:
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [1] monero-wallet-gui(+0x9287c) [0x59dfb87eb87c] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [2] monero-wallet-gui(+0x1eca84) [0x59dfb8945a84] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [3] monero-wallet-gui(+0x16fa97) [0x59dfb88c8a97] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [4] monero-wallet-gui(+0x16fdc0) [0x59dfb88c8dc0] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [5] monero-wallet-gui(+0x180766) [0x59dfb88d9766] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [6] /usr/lib/libQt5Core.so.5(+0xf0631) [0x7a05df4f0631] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [7] /usr/lib/libQt5Core.so.5(+0xeb88a) [0x7a05df4eb88a] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [8] /usr/lib/libc.so.6(+0x8b55a) [0x7a05de6a955a] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	   [9] /usr/lib/libc.so.6(+0x108a3c) [0x7a05de726a3c] 
2024-04-17 06:23:23.825	   7a05d8c006c0	INFO	stacktrace	src/common/stack_trace.cpp:172	

i ended up having to use a feather wallet appimage, as exodus is currently having issues syncing XMR. ill note, i also had to type in my jumbled password from the trezor device itself for it to work. unfortunately though after synchronizing and loading my balance properly, im unable to make a transaction from feather wallet due to "Failed to construct transaction Device state not initialized"

@kpcyrd
Copy link

kpcyrd commented Apr 17, 2024

I've never heard of Archcraft and I'm not interested in troubleshooting downstreams, if there are still issues with the package patches can be sent here:

https://gitlab.archlinux.org/archlinux/packaging/packages/monero-gui

@dement6d
Copy link

dement6d commented Apr 20, 2024

i ended up having to use a feather wallet appimage, as exodus is currently having issues syncing XMR. ill note, i also had to type in my jumbled password from the trezor device itself for it to work. unfortunately though after synchronizing and loading my balance properly, im unable to make a transaction from feather wallet due to "Failed to construct transaction Device state not initialized"

an update on this, i managed to get into my feather wallet by typing the password normally through the feather prompt and make transactions successfully just by not having trezord or trezor suite run in the background
unfortunately still not able to get monero-gui-wallet working

I've never heard of Archcraft

its pretty much vanilla arch with some themes for bspwm and openbox, the kernel is not modified afaik

@selsta
Copy link
Collaborator

selsta commented Apr 20, 2024

@dement6d did you try the monero-wallet-gui from getmonero.org instead of package manager?

@dement6d
Copy link

@dement6d did you try the monero-wallet-gui from getmonero.org instead of package manager?

i just tried, monero-wallet-gui from getmonero.org does work

@selsta
Copy link
Collaborator

selsta commented Apr 21, 2024

@dement6d the arch package appears to have been compiled without protobuf and libusb which disables Trezor support.

@kpcyrd
Copy link

kpcyrd commented Apr 21, 2024

Patches welcome.

I already invested a significant amount of time into this github issue and it's apparently still an issue on/off for >1 year. The concept of silently stripping features from release binaries is evidently wasting people's time.

@selsta
Copy link
Collaborator

selsta commented Apr 22, 2024

We have added USE_DEVICE_TREZOR_MANDATORY CMake variable to the master branch, but since this was a larger change we didn't port it to the release banch yet.

@kpcyrd I might be wrong regarding what I wrote in my previous comment. I checked PKGBUILD and there is no protobuf under the depends section, but at the same time there is for example https://gitlab.archlinux.org/archlinux/packaging/packages/monero-gui/-/commit/ca9f48f6846b59ec4297784e40e579a805e61669 so it does seem like it depends on protobuf somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests