ChatSecureAndroid icon indicating copy to clipboard operation
ChatSecureAndroid copied to clipboard

Reconnect after network change fails

Open SecTec opened this issue 9 years ago • 2 comments

Problem: After changing network (WiFi <---> G3) or a short disconnect from the XMPP server for example when passing a tunnel, than ChatSecure will remain offline and in account tab I see a "sign in" forever.

Expected behaviour: ChatSecure goes offline and than it will reconnect after some seconds (I would be glad if it reconnect after some minutes).

Possible reason: When ChatSecure "Sign in" and I want to exit ChatSecure than it shows a message "Sign out" forever, than I have to exit the app through holding back button. If ChatSecure can terminate itself and I relaunch the app than ChatSecure is signing in forever too. Only killing the ChatSecure process will ChatSecure return to normal. The last days I deavtivated the foreground priority and now ChatSecure can at least exit and than reconnect after a relaunch of the app.

Some more information: I have played a little with my accounts and now I have seen that only the account which has a seperate connection server set is more affected then the other accounts. If I have acctivated some more accounts than all are reconnecting well.

EDIT: Now I tested some more settings. When I activate the foreground priority it will mess up the sign in process somehow, but with deactivated foreground priority the accounts are working 9 of 10 times like expected.

System details: ChatSecure: v 14.0.4 Model: Nexus 4 OS: CyanogenMod 10.2.1 Android: 4.3.1 Rooted: yes Firewall: AFWall+

SecTec avatar Oct 15 '14 16:10 SecTec

I've been seeing a similar issue on v13 but I'm unsure if it's related where if network connectivity is temporarily lost the account is signed out and ChatSecure crashes. The account remains signed out when you open ChatSecure again

knoy avatar Oct 15 '14 21:10 knoy

The Foreground feature is needed on some devices and not on others. If you have a lot of RAM, and aren't overloading your device, then likely you don't need it. Using it ensures background services (and XMPP connections) aren't killed by the OS, so not sure why are you are seeing the behavior you are.

That said, this commit 0ccdbf2b8fd0e17915909ac78d4a439d237456d6 has a number of fixes for reconnection management that are working well on my lowly Moto E phone, my spotty T-Mobile coverage, and my temperamental wifi. There was a specific bug in the "needs reconnect" code, and we've fixed some crashes to.

Not sure when our next build will be, but will keep you posted.

n8fr8 avatar Oct 20 '14 03:10 n8fr8