I’m running a 3.11.0 system with Android v0.8.0-5-webview. A user is complaining that is “app is slow”. When I open the app on this user’s device, I see a white screen with no text and a spinner. I’ve waited nearly 5 minutes and nothing changes (no text, no page load, etc).
Is this is a known problem? Will it be solved by upgrading to v3.13?
If I close the app and turn off mobile data, then open the app - it starts almostly instantly. But this is serious problem here - people are seeing the spinner forever and assume the app is broken and they are uninstalling the app. Then users don’t have the tools available to re-install and several users have been locked out of the system for multiple months.
There are a couple of startup tasks that only happen when the user is online, for example purging. Is purging set up for this instance?
Also, is the server online and responding to requests?
I believe purging is not enabled (there is no purgelog). There is no text at any point in the UI. The server is responding.
I can shut down the app, turn off mobile data (but i believe he has no mobile data credit), and start the app again. If I do this, the app fires right up.
Here is a video
The fact that turning off your internet connection makes the app start, I’m tempted to believe some server request hangs and we don’t implement a timeout on webapp-side.
Can you access the server from a browser on your device?
Yes I can access the server. I synced and logged in as new users multiple times throughout the day on other devices/connections. https://vhtapp.cphluganda.org/ It is self-hosted and a bit slow but was stable today AFAIK.
I’ve also been using the server today (before and after this video) as an online user to create user accounts and manage hierarchy.
Is there a possibility the phone or the phone’s cellular provider is having some connectivity issues? Are you able to log into https://vhtapp.cphluganda.org/ via the phone’s chrome browser while on the same data connection that the app has trouble with?
This user is back in the community with their device. I don’t have the repro with me anymore and so I cannot perform this test.
When accessing https://vhtapp.cphluganda.org/ it took 36 seconds to download the
main.js file on my desktop connection (under 1MB).
I’m not sure how it affects local connections. I still suspect a hanging request without a timeout stalling app bootstrap.
I’m in Uganda co-located with server (like users) and main.js downloads in under 1 second from my desktop. I remember it being very slow when doing this from Canada. I’m surprised at this difference. I guess it is some kind of complex series of tubes?
I didn’t wait more than 3 or 4 minutes in any of my tests - maybe it loads eventually (?)
Regardless of connection - is this a problem with CHT? How long is reasonable to wait? 3 minutes felt unreasonable without any feedback. Anecdotally, users here are uninstalling the app when this happens (mentioned above).
@diana I’m seeing what I find to be odd results with this test command to download the
main.js file :
curl -o /dev/null https://vhtapp.cphluganda.org/main.js
device connection time speed
desktop LAN 5s 501k/s
laptop WiFi 22s 130k/s
mobile Cellular 4m55s 9.9k/s
The jump from 5s to 4m55s seems HUGE!? I’m located in the western part of the United States, for reference.
Here’s the same chart testing against gamma.dev.medicmobile.org:
device connection time speed
desktop LAN 1s 1692k/s
laptop WiFi 7s 416k/s
mobile Cellular 5s 580k/s
@kenn - Maybe you could find a similar mobile device that is using the same connection (cellular data I assume?) to see if you get comparable results?
I was chatting with an Internet infrastructure friend about this problem and he suggested that some mobile carriers can send data on their network not only out of country, but some times out of continent to reach it’s final destination. If this was the case for @kenn’s test phone, the Desktop mentioned above from one ISP could take only 1s to download, but then a phone on mobile data could be MUCH slower.
Also - for those following along in this thread - understanding the cause of the spinner loading forever is different than the fix of the spinner loading forever. Once we understand the former, we can hopeful put in defensive code in the CHT for a better UX to provide for the latter.
It might be with the CHT (server might not respond) or there might be a network problem.
It would be reasonable to add client-side timeouts to server requests done at bootstrap. Not sure about the UI, is a message “loading, please wait” or “waiting for connection” better than just the spinner?
Added an issue to track this: User stuck on spinner on app load on a poor connection · Issue #7492 · medic/cht-core · GitHub
I think a timeout is reasonable. This current experience isn’t very offline first. I can reproduce this fairly consistently on other phones here in Jinja today.