android
android copied to clipboard
DNS or ARP Cache of Android App does not cleanup after changing networks
Steps to reproduce
- Connect to wifi, where nextcloud servers dns is a local ip
- Use the nextcloud app
- deactivate wifi
- use cellular, where the nextcloud servers dns is a public ip, but the same dns as local
- App stopps working
- Only closing it through the android app manager will make it work again (normal closing not enough)
- Switching in the non function state back to wifi, where the old ip matches the dns makes the app work again
Expected behaviour
- Like all other apps, it should cleanup the arp and dns cache and try to resolve again in case the ip is unreachable behind the dns
Actual behaviour
- See above + ALL other nextcloud android apps which are connected the the main app behaive the same. I asume they use the main app to communicate or read the network details
Environment data
Android version: 12
Device model: Z Fold 2
Stock or customized system: Stock
Nextcloud app version: 3.20.3
Nextcloud server version: 24.0.2
Reverse proxy: apache2 with ssl
Logs
Sadly no logs at the server I dont know how to get logs at the android app
That is interesting. We implement a custom DNS cache, but we explicitly clear it on network change (developer ref).
My only suspicion is that the system may not be sending the connectivity change broadcast to the app. Unfortunately I see no way to debug this right now as there are no related logs.
Well it does work on ios. This problem happens at all my android 12 devices. S22 Ultra, Note 10 +, Z Fold 2, Galaxy Tab
If there would be a debug mode in the nextcloud android app which logs everything what happens I could attach logs, but as the app does not even contact my backend, cause the dns cache is wrong it can't get any logs.
Other apps on my android phone work without any issues, this happens just the nextcloud apps.
Can't you reproduce it with the steps I wrote??
How can I get logs for you guys now??
My initial investigation seems to indicate that the DNScache is not being checked for non-SSL connections, so we don't have control there right now. Will need to investigate further.
My environment is hosted with SSL enabled (https). But the problem still exists when switching between networks. The important thing is not to stop the app in between the switching but just let it run in the background and then change network and then switch back to the app and reload. This should be the easiest way to reproduce the problem.
The issue is till persisting. Not only with Samsung Devices, but also with Nothing Phone 1. My Nextcloud Version: 26.0.1 App Version: 3.24.2 Android: Android 13
Any updates on that issue?
That is interesting. We implement a custom DNS cache
Please remove the APP DNS Cache :-(
No Matter waht Android Version and waht Andriod Device. User is outside the Company Network, the NextcloudApp get the external IP Adress. The user comes back to the Company, connect to wifi, Nextcloudapp cant Uploade files ...
You have to forcekill the app and start the app again and thann the upload starts. It is annoying and the user mostly not able to do so by themself....
Funnything, only the uploade dont work, the access and browsing through the folders work....