-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Sending and receiving mail on Android fails with error message "Future timed out" #1631
Comments
@WhaleHub Thanks for your report.
I do not know if this is intended, it would be a surprise to me if this worked out well... |
It has always worked fine for me in the past. |
@gerryfrancis I tried logging into the app manually without a backup just now and DeltaChat gets stuck on |
@WhaleHub Thank you for your offer, although I am not a member of the development team. But maybe someone else of them is interested. Could you post an anonymized log that might have a little information why the login stalls? Thanks in advance. |
I'll give it a try. @WhaleHub can you send it to hocuri at gmx .de? (writing my address in a weird way to maybe confuse spambots) |
@Hocuri Thanks! I just sent you an email with the credentials for your test account. |
Just tried it, I can reproduce the problem with the current releases but it works fine with the current master. If you don't want to wait for the next release, https://testrun.org/deltachat-gplay-release-1.13.4.apk works fine already. |
@Hocuri I can confirm that it works with v1.13.4 - thank you! I'm curious, what was the cause of the issue? |
I don't know, lots of things were improved for configuration. E.g. some additional configurations are tried now, maybe DC just hadn't tried the right one. "Future timed out" seems to be a very general error message like "the server did not respond" -> Timeout. |
@Hocuri It sadly looks like I spoke too soon. After installing DeltaChat 1.13.4, it was able to find the correct settings on my first login attempt, but then when trying to send a message, I received the "Future timed out" error message again. I reset the app and tried again and this time it failed to find the right settings via autoconfig again and had me stuck on the login screen. |
@WhaleHub I could not reproduce this. Using your credentials again, I could perfectly fine send a message. Some of the messages I sent took a bit longer than usual (~10s instead of ~1s until the first green checkmark appears) but that might as well have been my flaky internet or because your server is not so fast or whatever. There is an archive at https://download.delta.chat/android/ but we changed so much in every version, I don't think I will be able to guess the cause if I know which version introduced this (thx for the offer, anyway). What would help me is a log from right after this happened (via ADB or at Settings->Advanced->View log). |
@Hocuri I've attached five log files to this comment. Logs A and B were saved immediately after login attempts that took two and four minutes respectively. When I examined these log files, the following lines stood out to me: Log A: deltachat-log-20201004-154359.txt
Log B: deltachat-log-20201004-161145.txt
It looks like DeltaChat, for whatever reason, gets stuck on trying to fetch the autoconfig information for my mail account from the standardized URLs for several minutes and only infrequently succeeds on one of them and sometimes fails on both of them when both URLs should work instantly. The timeout duration should be significantly shorter than two minutes in any case. You can visit the two URLs in the browser or fetch them via curl and see that they return the identical content immediately.
Thunderbird, DeltaChat on Windows (see below) and AquaMail on Android all have no problem fetching these URL instantly, which leads me to think that the issue must be somewhere in DeltaChat for Android. Log C: 2020-10-04-16-29-04.log
The last two log files were saved immediately after I received the "Future timed out" error message when I tried to send a message after login attempts A and B. |
@WhaleHub but that's version 1.12 again! Didn't you install version 1.13.4? |
@Hocuri Why do you think it's version 1.12? Log A: |
Sry, my fault, I must have opened an old version of the logs. Thanks for the logs, unfortunately I realized that our logs are not very good at this point. I'm afraid we have to improve them first if we want to find the cause (in #1967). |
@Hocuri No worries. I built DeltaChat from source with your commit and made a few login attempts again, but the error messages don't appear to be much more useful. Log A: deltachat-log-20201004-190849.txt
Log B: deltachat-log-20201004-190652.txt
Log C: deltachat-log-20201004-185550.txt
|
Great!
not so great but least now we know why DC thinks it fails (whether this is the actual reason or not): I also wonder why there are so many different errors but anyway. And the xml parsing error does not even turn up. Possible next steps:
|
@WhaleHub When I try to load the first file mentioned in the logs, https://datahoarder.dev/autodiscover/autodiscover.xml) , in a browser (e.g. Firefox), all I get is a blank page when I was expecting some "file not found error". Viewing the source of that site, I can see that actually a lot of HTML code is produced, and stuff like JS is loaded. I think there seems to be some kind of CMS that jumps in when some file does not exist, literally throwing lines of code on Delta Chat which just cannot do anything with it. Maybe you can get an idea of what might be going on with this information. |
@WhaleHub Looking at your config-v1.1.xml file, I recognized this:
I guess the line should be corrected to this:
More information on how to create an Autoconfig configuration file is available here: https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration/FileFormat/HowTo |
@gerryfrancis Thanks, I appreciate the suggestions. I just set up Nginx to return an explicit 404 for the URLs below and modified my
|
@WhaleHub Thanks for clarifying, because I already wanted to ask how the username is specified. (It could have been %EMAILLOCALPART% as well.) SSL certificate check is set to "Automatic", and, as @Hocuri has pointed out,
So, it might be caused by a certificate check that fails due to the respective server being unavailable. Can you verify if some firewall probably blocks access to the other server used to check validity? Or, as an alternative: Could you disable certificate check temporarily? |
@gerryfrancis My server is neither unavailable nor is there a firewall blocking access to it. As I've mentioned in previous comments, any and all mail clients I've tried, including DeltaChat for Windows, have no problems connecting to it and fetching the correct configuration from the autoconfig URLs. The only client that is having issues is DeltaChat for Android. My phone is connected to the same network as the desktop PC where DeltaChat for Windows is running and when I visit the autoconfig URLs in Chrome and Firefox on Android, they load instantly. |
@WhaleHub Well, then I think this is a Delta Chat issue. You have mentioned that the failure occurs after a backup has been imported. I just wonder if it is an important step to reproduce the behavior, maybe we have overseen something... |
@gerryfrancis The only time I imported a backup was when I observed the failure that lead me to open this issue. Every subsequent test since then has been performed after resetting the app to stock (via "clear cache" and "clear storage") and logging in normally. |
@WhaleHub Thanks for the information, so it is obvious that we can skip step 2 ("import a backup[...]") of your procedure that should reproduce the failure, right? |
@gerryfrancis Well, there has to be something about my setup - I don't know what yet - that DeltaChat on Android is not accounting for because it's uncommon in some way. Since the issue occurs for me even without importing a backup, the steps to reproduce it right now are essentially just "install DeltaChat, log in and send a message to yourself" which has to be working fine for the vast majority of DeltaChat users, otherwise I wouldn't be the only one reporting the issue on here. There are a number of things I can think of off the top of my head which most people using DeltaChat might not have:
@Hocuri You said that you were able to reproduce the issue with the credentials I sent you in the current version of DeltaChat for Android but that it worked fine for you on master, right? It might be worth looking through the commits that were made to the relevant components of DeltaChat between now and then to figure out why you can reproduce the issue in v1.12.5 but not in v1.13.4. [1] https://internet.nl/mail/datahoarder.dev/423732/ |
@WhaleHub Wow, that is a lot of useful information, thanks a lot! Although Delta Chat seems to connect fine with "datahoarder.dev" as logged here
, your autoconfig specifies the hostname for IMAP and SMTP differently:
Which is correct? |
One more thing:
A quick TLS check on checktls.com has revealed:
Now, the only thing that fails which I can read from the log files is accessing URLs, by using https. Who knows if Delta Chat can cope with TLS 1.3 already on https calls? |
Related issue: sfackler/rust-native-tls#140 |
@WhaleHub Any concerns about supporting TLS 1.2? Mozilla still support it in Firefox. |
@gerryfrancis The correct hostname is
@gerryfrancis As the links I posted in an earlier comment show, my server already supports both TLS 1.2 and TLS 1.3. |
@WhaleHub Due to the lack of autoconfig, Delta Chat connects to
@WhaleHub Thanks, I should have noticed. Meanwhile I used
Not sure if I am on the right track, but for me this raises another question: Do we support EC 384 key handshakes in Delta Chat, yet, not only for IMAP and SMTP but HTTPS, too? |
@Hocuri @gerryfrancis Just FYI, this issue seems to have been caused by a peculiarity with the IPv6 implementation in my router (FRITZ!Box 6490). I'm not sure why it only affected this app and only on Android, but after adjusting the settings on the router (namely disabling "stealth mode" and "teredo filtering"), DeltaChat works again even with v1.12.5. |
@WhaleHub My gosh!! Thank you for sharing this information, I am happy that it works for you now! |
Edit: This bug seems to be present in the beta version v1.13.2 as well.
The text was updated successfully, but these errors were encountered: