-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Signal fails to connect on pure IPV6 system #2327
Comments
I just made another observation: this may be an issue with Electron apps in general (or perhaps even just Node.js problem?). I was just doing PostMan session and their new app refuses to connect to anything unless I switch on IPV4 despite the fact that underlying windows system has no problem connecting to these endpoints. Unfortunately I'm totally out of my depth when it comes to JS world of things (i'm a c# developer) so can't really make much sense of code myself. |
@venomed Thanks for reporting this. This is the first report I know about regarding IPv6. It would be helpful if you could find more information regarding the root cause of this, i.e. is it Node, Electron, or just us. Have you tried using other Electron apps, e.g. Slack, Microsoft VS Code, etc. via your IPv6 setup? Getting more information would help us understand the issue better. Thanks. |
@gasi-signal Thanks for your quick response. I've tried Slack Desktop / Whatsapp Desktop and they both work fine on pure IPv6. VS Code (insider) also has no problem downloading it's update over IPv6. So I guess that rules out limitation of Node.js / Electron in this context. I'm happy to help with any further information gathering but might need some hand holding just because I'm operating in uncharted territory when it comes to JS world in general and of course Node/Electron world specifically (just a pointer to some reference on how to dig information out will be enough). Though I doubt this matters much but I also tried this with the latest beta build (v1.10.0-beta.1) and have the same issue. |
Here's an additional stack trace that runs infinitely when you start a fresh install of signal with pure IPV6 (pulled from v1.10.0-beta.1 session):
The above socket close exception occurs infinitely on pure IPv6 system. This stack trace had initially confused me so I ended up turning on IPv4 and found out that it was stuck at IP (and then I took the snippet out of logs and opened this issue) but thought I'll post this stacktrace as well to be complete. |
OK this is embarrassing: I found the problem! TL;DRDNS problem. Not a bug with Signal/Electron/Node.js Long versionI had been using Googles DNS64 addresses (2001:4860:4860::6464, 2001:4860:4860::64) as resolver when everything was working fine. Then came along Cloudflare public DNS and me being curious about shiny new things, I switched to 2606:4700:4700::1111 / 2606:4700:4700::1001 as primary DNS which is apparently not DNS64 (certainly my fault for not digging through documentation more thoroughly). During my troubleshooting, at some point Windows lost the IPv6 DNS settings and my own network DNS64 took over and things started working again (at this point I had stopped trying to connect signal so realization of the problem took time). Today when I started fresh I realized every IPv4 only site had gone down since I switched manually to Cloudflare DNS again to fix Windows amnesia and at that point it hit me. I've assumed it to be DNS64 which might not be the case and well I switched to Google DNS and everything is back to normal! Coincidentally I've also got Postman working fine now :) Lesson LearnedIf an application is trying to connect to IPv4 on an IPv6 only system, absence of DNS64 is the most likely culprit. I hope this saves somebody else from head-scratching time I spent on this. Sorry to have added to your bug list when it really was PEBCAK :) SuggestionPlease add some error message to your application when connections fail. While I'm able to dig through logs and eventually figure out what went wrong, Most users will have no clue if the app is never going to start even (since it stays forever in "Connecting" state). |
@venomed Thanks for the great write-up and no worries, we all have days like these 😉 FWIW, one of my brilliant co-workers found out that maybe our backend ( Re: error message. Good suggestion. Created an issue to track: #2336 |
Yes indeed @gasi I've now got NAT64 working to hit the IPv4 address of |
@venomed Thanks for confirming. |
As far as I am concerned, this problem still exists. I have an IPv6-only system (with IPv4 disabled on my interface) and a NAT64/DNS64 setup. I can see the Signal desktop app is attempting A and AAAA queries for textsecure-service.whispersystems.org (among other things like cdn.signal.org and updates2.signal.org) and then trying to prefer the A-record over the AAAA record, even though there is no IPv4-connectivity possible. When I reconfigure my DNS64 resolver in such a way that an A-query gives a NODATA result, everything works. It seems to me that Signal (or Electron, or NodeJS for that matter) has no, or a dysfunctional 'Happy Eyeballs'-implementation. Could be NodeJS: nodejs/node#6307 |
It's more or less a NodeJS thing that is solved since v17. Although still no happy eyeballs. However, electron will only support that after the NodeJS fix makes it into v18 (LTS) and electron switching over to v18, and then Signal switching to the latest electron release. I don't expect that to happen well into 2022, maybe even 2023. NodeJS generally gives the option to override the reordering of DNS results in favor of IPv4. Not sure if electron has the option to pass this on. In that case it could be 'fixed' by Signal itself. |
I would like to add to this issue another finding; if the loopback interface has the 127.0.0.1 IPv4 address completely removed (leaving only IPv6 ::1 available), the Signal app will no longer update. It notices there is an update available, but refuses to fetch it. Here are two screenshots; one with the 127.0.0.1 available, the other with that address missing: I tried this on a Macbook with OSX 11.6 in a DNS64/NAT64 environment made working with the trick mentioned in #2327 (comment) |
Bug description
Signal desktop app fails to connect on a pure IPV6 system trying to reach an IPV4 address (52.207.57.189 / 52.6.64.115) (which of course fails).
Steps to reproduce
Actual result:
Signal will keep trying to connect forever. (I can get signal to work on this same system if I reactivate IPV4 on the interface)
Expected result:
Signal connects as normal on IPV4 systems.
Screenshots
(Screenshot after I attempted to connect with IPV4 enabled once to confirm & then changed back to IPV6 only system - contacts redacted)
Platform info
Signal version: v1.9.0
Operating System: Windows 10 - 1803
Linked device version: Android Signal 4.18.3
Link to debug log
If it's really required, I can post the log, but it really is chalk full (about 6000 lines as of this writing) of the following message (with variations on IP it's trying to connect to):
The text was updated successfully, but these errors were encountered: