signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.4k stars 2.61k forks source link

Linux: Being told to verify via reCAPTCHA doesn't work if both Signal and Signal Beta clients installed #5821

Open mreugenekrabs opened 2 years ago

mreugenekrabs commented 2 years ago

Bug Description

If you have both Signal Desktop non-beta and beta versions installed and you're asked to complete captcha on the beta version, the redirect from the captcha page isn't sent to the beta client, but instead to the non-beta client.

Furthermore, if I dismiss the captcha dialog without verifying on the beta app, the beta app becomes unclickable even after restarting, though UI still works for incoming messages and I can still use the settings

Steps to Reproduce

  1. Get told to verify by captcha
  2. Complete captcha in Google Chrome
  3. Xdg-open dialog prompt to open the link in another program (wasn't given a choice of which program to open in)

Actual Result:

Captcha verification succeeds and beta client can send messages again

Expected Result:

Captcha success redirects to the non-beta client, and beta client doesn't receive it

Screenshots

None

Platform Info

Signal Version: 5.36.0-beta.3

Operating System: Debian 10

Linked Device Version: 5.34

Link to Debug Log

Cleared and relinked desktop beta data because nothing in the main screen was clickable, so not available. Android log irrelevant.

jordanbertasso commented 2 years ago

This happens with the local development version too, making it impossible to login and test code changes.

Related forum post https://community.signalusers.org/t/captcha-callback-opens-the-incorrect-signal-app/43477/2

jojomatik commented 2 years ago

This happens with the local development version too, making it impossible to login and test code changes.

Related forum post https://community.signalusers.org/t/captcha-callback-opens-the-incorrect-signal-app/43477/2

I'm running into a similar issue using the development version on windows 10: I can't get the development version set up, as I receive an error message after verifying the captcha in my browser. image

So it might not just be Linux @scottnonnenberg-signal. Is there a way to develop and test the app without registering a phone number?

Edit: I deleted and recreated the Signal-development folder by copying my Signal directory again. Now I can get to my conversations etc. which is fine for me currently. Still not sure what the captcha is supposed to be doing though 🤔

I also found another related forum post: https://community.signalusers.org/t/error-clicking-on-send-sms-for-standalone-setup-forwarding-to-recaptcha-page-with-an-error-and-not-getting-sms/44218

indutny-signal commented 2 years ago

@jojomatik I've talked to Electron team about this and in general they admit that this is a pain point. The url protocol handlers work best with packed apps so this is what we sometimes have to do in the development when we need to solve a captcha. Sorry for the inconvenience!

jilv220 commented 1 year ago

Same problem.

myf commented 1 year ago

re: https://github.com/signalapp/Signal-Desktop/issues/6002

TheTechZone commented 1 year ago

@jojomatik I've talked to Electron team about this and in general they admit that this is a pain point. The url protocol handlers work best with packed apps so this is what we sometimes have to do in the development when we need to solve a captcha. Sorry for the inconvenience!

@indutny-signal I was wondering if there is any follow up on this? My use-case is a bit different as I am trying to register a standalone device on the development build. Is there any way to pass the captcha back to the signal app or alternatively, how should I go about packing the app properly to register an account and then export the data to the app running under yarn start ?

evok3d commented 8 months ago

The best solution was posted by someone else, though I can't find the link.

This is how you can verify yourself on Linux:

Mozar10 commented 8 months ago

@evok3d This doesn't solve the issue for me. I just cloned the repo today so I'm not sure but I believe the issue could be related to this:

When the link generated from server that returns the captcha verification (Cloudflare or however they're doing it) it points to the production version of the app. So although there are some differences in parts of the actual link generated. When you run the handler that is supposed to launch Signal both points to the prod version (see NODE_ENV and userData) as you can see in the shots below:

https://signalcaptchas.org/registration/generate prod

https://signalcaptchas.org/staging/registration/generate staging

I tried starting the app like so NODE_APP_INSTANCE=development yarn run start to change userData destination, but it remains the same in the link generated from the captcha verification server.

So yea, not sure how anyone is running the dev server cause the contribution guidelines just skips this capcha step, perhaps for good reason.

alanzhu39 commented 6 months ago

I was able to use these steps to get the captcha to work with the development app on Linux. The process is a slightly modified version of @evok3d's method:

stefba commented 6 months ago

@alanzhu39 Thank you, this is a great reply! Maybe someone should pin this answer. I only found it after some searching. None of that is described in the "contributing.md".