TryQuiet / quiet

A private, p2p alternative to Slack and Discord built on Tor & IPFS
https://www.tryquiet.org
GNU General Public License v3.0
1.98k stars 86 forks source link

User cannot start Quiet #1605

Open holmesworcester opened 1 year ago

holmesworcester commented 1 year ago

@livid reports this issue running the production Quiet release on macOS. After starting, the app hangs on the following screen and shows the following error. Logs pasted below.

Error returned: <dictionary: 0x7ff85b441670> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7ff85b441808> { length = 18, contents = "Connection invalid" }

Image

Read extra envs: { TEST_MODE: 'false' }
setAsDefaultProtocolClient true
electron main
PIDs 14381
Found 1 hanging backend process(es) with pid(s) 14381. Killing...
WARNING: Missing strong random number source
options {
  socketIOPort: '49768',
  appDataPath: '/Users/demo/Library/Application Support/Quiet',
  resourcesPath: '/Applications/Quiet.app/Contents/Resources',
  platform: 'desktop'
}
  backend:conn Creating https proxy agent on port 49773 +0ms
  backend:socket Data server running on port 49768 +0ms
Error returned: <dictionary: 0x7ff85b441670> { count = 1, transaction: 0, voucher = 0x0, contents =
    "XPCErrorDescription" => <string: 0x7ff85b441808> { length = 18, contents = "Connection invalid" }
}
  backend:tor Initializing tor... +0ms
  backend:tor Trying to spawn tor for the 0 time... +63ms
Checking for update
  backend:tor Jul 05 14:02:58.155 [notice] Tor 0.4.7.13 (git-7c1601fb6edd780f) running on Darwin with Libevent 2.1.11-stable, OpenSSL 1.1.1s, Zlib 1.2.11, Liblzma N/A, Libzstd N/A and Unknown N/A as libc.
  backend:tor Jul 05 14:02:58.155 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
  backend:tor  +148ms
  backend:tor Jul 05 14:02:58.155 [notice] Configuration file "/var/tmp/dist/tor/etc/tor/torrc" not present, using reasonable defaults.
  backend:tor  +2ms
  backend:tor Jul 05 14:02:58.158 [notice] Opening Socks listener on 127.0.0.1:49785
  backend:tor  +1ms
  backend:tor Jul 05 14:02:58.159 [notice] Opened Socks listener connection (ready) on 127.0.0.1:49785
  backend:tor Jul 05 14:02:58.159 [notice] Opening HTTP tunnel listener on 127.0.0.1:49773
  backend:tor  +0ms
  backend:tor Jul 05 14:02:58.159 [notice] Opened HTTP tunnel listener connection (ready) on 127.0.0.1:49773
  backend:tor Jul 05 14:02:58.159 [notice] Opening Control listener on 127.0.0.1:49784
  backend:tor Jul 05 14:02:58.159 [notice] Opened Control listener connection (ready) on 127.0.0.1:49784
  backend:tor  +1ms
  backend:tor Jul 05 14:02:58.000 [notice] Bootstrapped 0% (starting): Starting
  backend:tor  +14ms
  backend:tor Jul 05 14:02:58.000 [notice] The current consensus has no exit nodes. Tor can only build internal paths, such as paths to onion services.
  backend:tor  +124ms
  backend:tor Jul 05 14:02:58.000 [notice] Starting with guard context "default"
  backend:tor  +2ms
  backend:tor Jul 05 14:02:58.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
  backend:tor  +8ms
Update for version 1.3.1 is not available (latest version: 1.3.1, downgrade is disallowed).
holmesworcester commented 1 year ago

@livid can you provide system information such as OS version and whether you are on an Intel or Apple Silicon mac?

livid commented 1 year ago

@livid can you provide system information such as OS version and whether you are on an Intel or Apple Silicon mac?

It's macOS 13.4.1 running on Apple Silicon.

livid commented 1 year ago

The app worked great on this machine, but it hangs when starting today.

vinkabuki commented 1 year ago

@livid @holmesworcester that's just the tor in bad condition, try restart the app and it should be fine :)

vinkabuki commented 1 year ago

@livid btw for how long you have waited ? It happens quite often, so we have a logic for cleaning tor data and trying again, and in the logs I can it was the first attempt. cheers

holmesworcester commented 1 year ago

What do we need to do to make sure a user never needs to restart, so that we just handle this 100 percent of the time?

I think this issue remains an open issue until we solve it for 100 percent of cases.

livid commented 1 year ago

@livid btw for how long you have waited ? It happens quite often, so we have a logic for cleaning tor data and trying again, and in the logs I can it was the first attempt. cheers

I have tried it multiple times. My last attempt was to launch the app at 5:20 AM, now it's 5:37 AM, still stuck on this screen.

Screenshot 2023-07-06 at 5 37 28 AM
vinkabuki commented 1 year ago

@livid do you have some non-standard network setup, like VPN or something

holmesworcester commented 1 year ago

To add to this, if you could include any information about your network setup that could help us reproduce the problem that would be great.

Also if you can confirm that the error still happens with a simple network setup that would be great too!

livid commented 1 year ago

@vinkabuki @holmesworcester

Thank you so much! It seems it does relate to VPN. I do have this running:

https://tailscale.com/

So I turned it off, and the connection problem in Quiet is gone.

By the way, Tailscale is another interesting network solution. With open source control server implementation like Headscale, it can be useful to build a members-only network too.

https://github.com/juanfont/headscale

livid commented 1 year ago

It worked once and got the 1.4.0 update (The new icon design is great and consistent with the latest macOS style). However, after a restart, it hangs again. This time I made sure Tailscale was not running. The last lines in DEBUG=backend* logs look like this:

Screenshot 2023-07-10 at 1 32 22 PM

Now it's outputting this kind of error repeatedly:

backend:Tor Jul 10 13:32:11.000 [warn] Problem bootstrapping. Stuck at 5% (conn): Connecting to a relay. (Network is down; NOROUTE; count 31; recommendation warn; host 5197FC89F7A1623CA90D6E0254ABCCBC6D85A86E at 174.128.250.164:80)
  backend:Tor Jul 10 13:32:11.000 [warn] 30 connections have failed:
  backend:Tor Jul 10 13:32:11.000 [warn]  30 connections died in state connect()ing with SSL state (No SSL object)
holmesworcester commented 1 year ago

@vinkabuki are these errors about Tor connecting, or frontend connecting to backend?

livid commented 1 year ago

In order to rule out the potential interferences of my current OS settings, I tested with a clean install of macOS 12 virtual machine.

I downloaded Quiet-1.4.0.dmg, put the app into /Applications, and start it in Terminal with DEBUG=backend*.

My first attempt reached 45% and stuck. Here are the last logs:

Screen Shot 2023-07-11 at 3 43 20 AM

The second attempt is stuck at 5%:

Screen Shot 2023-07-11 at 3 49 36 AM

It seems I am unable to connect to any relay. But it did work last month with the same network environment.

vinkabuki commented 1 year ago

@holmesworcester, @livid interesting, It's definitely a tor problem, not related to version upgrade. I never had this problem, but the top answer for it is either VPN or ISP issues. It worked once however, one more thing you could try is running app again against fresh data dir, after all these problems tor data dir may be corrupted, here's the command (make sure you run this on the setup that worked before, witth VPN turned off)

DATA_DIR can be whatever except 'Quiet' as it points to the default one.


DATA_DIR=1testquiet DEBUG=backend* [path to quiet]