[HOLD for payment 2022-03-22] [$500] Connection drop is not detected - Reported by: @Santhosh-Sellavel
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Steps to simulate connect loss:
- Turn on mobile internet on phone.
- Turn on hotspot/internet sharing on your phone.
- Connect your laptop/pc to the network shared from mobile.
- Use the new Expensify app.
- Now disable mobile internet in the phone, now its connection drop but our app doesn’t detect it.
- You can verify opening any user chat, we can't see the offline message warning.
Expected Result:
Connection drop should be detected on all circumstances.
Actual Result:
Connection drop is not detected and the app should online status.
Workaround:
None, going back online fixes the issue.
Platform:
Where is this issue occurring?
- Web
- Desktop App
Version Number: 1.1.9-1
Reproducible in staging?: Yes Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @Santhosh-Sellavel Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1634766280030400
Job: https://www.upwork.com/jobs/~0129cfc8254ac008fa
Triggered auto assignment to @Gonals (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Triggered auto assignment to @kadiealexander (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Nice catch! Added tags and sending to the pool
Just going to reassign since I'll be OOO for the next wee while.
Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
@kevinksullivan Eep! 4 days overdue now. Issues have feelings too...
I was unable to reproduce this on web. The app responded correctly when I turned off hotspot.

Sorry couldn’t able to get here early @kevinksullivan
- Create hotspot using mobile internet
- Connect the Laptop to the hotspot
- Now Turn off the
mobile internetnot the created hotspot!
@kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!
When you say mobile internet do you mean wifi , cellular, or something else?
Cellular data @kevinksullivan
@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Ok, I did that and could not reproduce. Feel free to post a video of this if I am missing something, but I am going to close until then.
@isagoico Can you help me here. Can you reproduce this now. Can you add attachments if reproducible.
@kevinksullivan
I think maybe you used iPhone for hotspot sharing. When you turn off the cellular data internet hotspot also turns off on iPhone. I verified using iPhone not able to reproduce using iPhone as a hotspot device.
Try with android you will be able to reproduce! Attached a video here
In the video, the device is connected to an android device sharing the internet hotspot. Once the internet is turned down in the android device, the iPhone wifi setting detects no internet. But our app fails to detect.
I was able to reproduce the issue with the same steps as before in build 1.1.14-2 (Desktop)
https://www.upwork.com/jobs/~0129cfc8254ac008fa
Triggered auto assignment to @parasharrajat (Exported)
Triggered auto assignment to @pecanoro (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
This is related: https://github.com/Expensify/App/issues/5337
Long story short both issues are because we rely on navigator.onLine which is unreliable.
navigator.onLine being true means only that we are connected to some network - wired or wireless, and not that the network has internet connection
Here I propose to double check when our network status changes: https://github.com/Expensify/App/issues/5337#issuecomment-943543012 This might require a dedicated endpoint to serve for internet checks or we can use an existing one:
- when a request fails without a response - we set the app as offline and send another request to double check
- when the app connection status changes to online or offline - we send a request to double check
Depending on the result is the double check we might need to set the network status again
If we're not using a dedicated endpoint we can just make a request for something simple like user current time zone for the double check