thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Connection error messages when changing from WLAN to a Mobile Network

Open AnAnalogGuy opened this issue 1 year ago • 5 comments

Checklist

  • [x] I have used the search function to see if someone else has already submitted the same bug report.
  • [x] I will describe the problem with as much detail as possible.

App

Thunderbird for Android

App version

8.2

Where did you get the app from?

Google Play

Android version

14

Device model

No response

Steps to reproduce

Starting with Version 8.2 K-9 mail has changed its behaviour when switching from WLAN to a Mobile Network.

I have an IMAP (imap.mydomain.com) and SMTP (smtp.mydomain.com) Server running in a private network behind a public IP.

When my smartphone is connected to the private WLAN, it gets its IP via DHCP (static mapping) and with it also the ip address of the internal name server to resolve imap.mydomain.com and smtp.mydomain.com. The internal name server resolves both hosts to their LAN IP adresses. The K-9 client connected to the WLAN (part of the LAN) connects (TLS) to the services without problems.

Now, when I leave the WLAN, the smartphone switches to the Mobile Network. While retrieving the Mobile IP address also new name servers are provided to the Smartphone. Using this name servers the two hosts are resolved to the public IP of the my private network. The router then does a port forwarding to the LAN IPs of the two services.

Expected behavior

If the imap and smtp services can be reached over the Mobile Network, I expect K9 to silently try to reconnect and only come up with an error message IF the reconnection attempt failes. This is how it worked before 8.2.

Actual behavior

When switching from WLAN to mobile Mobil networks K-9 seems to run into a connection timeout of the connections initially established from within the WLAN. That’s expected, as the smtp and imap services are not available at the LAN IP any more. This leads to K-9 throwing connection errors for every account configured. Error message is “authentication failed”, however I think that’s not the root cause and the error message is incorrect.

This did not happen in prior versions. In prior versions K-9 silently re-established the connection to the server in background, which would include to close the idle connection, re-resolve the host’s DNS via the new name servers provided by the mobile network and the establish the connections to the smtp and imap server again using the public ip.

Starting with 8.2 K-9 client runs into a timeout and does not automatically reconnect/re-resolve the host names. Even worse, the error seems to be blocking unless the error message is clicked. The smtp and the imap configuration screen is displayed and i have to “okay” them to force K-9 to re-establish the connection (so the message is not only informational). I have to do this twice, since the first time K-9 comes up with the same error, only the second time it actually seems to re-resolve the host names and succeds reconnecting to the imap/smtp services. I have to do this for every email account configured. And: It does not persist, next time i switch from WLAN to Mobile Network, the same happens again. I even experienced K-9 to crash after the first error message has been clicked.

Funny thing is, it does not happen when switched from the Mobile Network to the WLAN after having established connections to the services over the Mobile Network.

Logs

No response

AnAnalogGuy avatar Feb 14 '25 13:02 AnAnalogGuy

Since this one isn't easy to reproduce as it happens in the context of a specific network architecture, please ping me, I'm happy to support with testing and providing logs for what ever tests you need to analyze.

AnAnalogGuy avatar Feb 14 '25 13:02 AnAnalogGuy

Could you share some logs from the time this occurs?

kewisch avatar Mar 11 '25 18:03 kewisch

I will. Is there a way to log to a logfile of on the smartphone? Or is the "redirect debug logs over USB" the only way?

AnAnalogGuy avatar Mar 11 '25 18:03 AnAnalogGuy

Here is the guide: https://github.com/thunderbird/thunderbird-android/wiki/LoggingErrors , this is all we offer at the moment

kewisch avatar Mar 12 '25 12:03 kewisch

Thank you for taking the time to report this issue. It looks like we haven't heard back in a while, therefore we're closing this issue. If the problem persists in the latest version please open a new issue and reference this one so we can follow up more effectively.

thunderbird-botmobile avatar Apr 12 '25 00:04 thunderbird-botmobile