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

Can't close Trezor Suite with Tor On and Solana account active #12628

Open
evgenysl opened this issue May 29, 2024 · 12 comments
Open

Can't close Trezor Suite with Tor On and Solana account active #12628

evgenysl opened this issue May 29, 2024 · 12 comments
Labels
bug Something isn't working as expected solana

Comments

@evgenysl
Copy link

Describe the bug
If Solana account is activated and Tor is on, I can't close Trezor Suite.

Happens both on 24.5.2.and 24.5.3. and only on Arm Mac
Not reproducible on Linux and Windows yet.

Steps to reproduce:

  1. Activate Solana account
  2. Turn on Tor
  3. Close the app
  4. Observe app is not closing and in Activity Monitor it's not responding

Info:

  • Suite version: desktop 24.5.3 (0ff3e0b)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/24.5.3 Chrome/118.0.5993.159 Electron/27.3.8 Safari/537.36
  • OS: MacIntel
  • Screen: 1920x1080
  • Device: Trezor T2T1 2.7.0 regular (revision 45e8a842a31e62a6d43d7f6ccac62a45e1198ef0)
  • Transport: BridgeTransport 2.0.33

Expected result:
App closes

Screenshots:
Screenshot 2024-05-29 at 08 43 41

Note(s):
related to #12626 ?

@evgenysl evgenysl added the bug Something isn't working as expected label May 29, 2024
@github-project-automation github-project-automation bot moved this to 🎯 To do in Issues Suite May 29, 2024
@bosomt
Copy link
Contributor

bosomt commented May 29, 2024

Managed to reproduce it on my machine by quiting app during discovery with tor on

image

Info:

  • Suite version: desktop 24.5.3 (0ff3e0b)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/24.5.3 Chrome/118.0.5993.159 Electron/27.3.8 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T2B1 2.7.0 regular (revision 45e8a842a31e62a6d43d7f6ccac62a45e1198ef0)
  • Transport: BridgeTransport 2.0.33

@MiroslavProchazka
Copy link
Contributor

@trezor/qa this still happening?

@bosomt
Copy link
Contributor

bosomt commented Aug 8, 2024

QA NOK

still happening :(

Info:

  • Suite version: desktop 24.8.1 (b8c7e5e)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/24.8.1 Chrome/118.0.5993.159 Electron/27.3.8 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T2T1 2.8.1 regular (revision 632b9561559b7ab6824bb7eeac072874e07b7b82)
  • Transport: BridgeTransport 2.0.33

@tomasklim tomasklim added this to Solana Aug 10, 2024
@tomasklim tomasklim moved this to To do 🎯 in Solana Aug 10, 2024
@matejkriz matejkriz added the QA NOK Issue doesn't pass the QA and some changes are needed. label Aug 21, 2024
@tomasklim tomasklim added solana and removed QA NOK Issue doesn't pass the QA and some changes are needed. labels Oct 26, 2024
@tomasklim tomasklim removed the status in Solana Oct 26, 2024
@enjojoy
Copy link
Contributor

enjojoy commented Oct 31, 2024

I tried multiple times with solana activated and tor on but it never got to the Not Responding state. Can you please try replicating it again? @evgenysl @bosomt

@evgenysl
Copy link
Author

Suite 24.10.1

  • Empty wallet - no issues
  • Funded wallet - Suite takes longer time (about 50sec) to close and app is in Not Responding state

Mouse pointer is actually MacOS loading spinner the whole time (not captured on video).

Screen.Recording.2024-10-31.at.13.02.28.mov

@enjojoy
Copy link
Contributor

enjojoy commented Oct 31, 2024

Suite 24.10.1

  • Empty wallet - no issues
  • Funded wallet - Suite takes longer time (about 50sec) to close and app is in Not Responding state

Mouse pointer is actually MacOS loading spinner the whole time (not captured on video).

Screen.Recording.2024-10-31.at.13.02.28.mov

Not sure what to do because I can't get this behavior on my M3

@enjojoy
Copy link
Contributor

enjojoy commented Nov 4, 2024

image image

@enjojoy
Copy link
Contributor

enjojoy commented Nov 4, 2024

@marekrjpolak
Copy link
Contributor

@enjojoy the problem is in this part of @solana/web3.js and this line of Suite:

When Tor process is killed (in a pretty uninteresting manner I'd say) and Suite tries to unsubscribe Solana accs, the library function isCurrentConnectionStillActive() incorrectly returns true so the unsubscription is repeated in a neverending loop.

Preferred solution would be to fix the library (e.g. implement this todo or get the connection status from underlying socket's readyState). From our side, the only solution I see is not to unsubscribe the accounts on disconnect. 🤷‍♂️

@enjojoy
Copy link
Contributor

enjojoy commented Nov 19, 2024

For now, I will create a patch to temporarily fix the issue on our side, until it's fixed in the library

@martykan
Copy link
Member

Also related solana-labs/solana-web3.js#3053

@steveluscher
Copy link

Hello friends! I maintain @solana/web3.js. Will you accept a PR to upgrade to version 2.0 of our library? It simply does not have any of these problems, but it is a completely new API that will require a rewrite. I can probably throw it together in less than a day, if you are amenable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected solana
Projects
Status: 🎯 To do
Status: No status
Development

Successfully merging a pull request may close this issue.

9 participants