App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2022-03-22] [$500] Connection drop is not detected - Reported by: @Santhosh-Sellavel

Open isagoico opened this issue 5 years ago • 77 comments

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:

  1. Steps to simulate connect loss:
  2. Turn on mobile internet on phone.
  3. Turn on hotspot/internet sharing on your phone.
  4. Connect your laptop/pc to the network shared from mobile.
  5. Use the new Expensify app.
  6. Now disable mobile internet in the phone, now its connection drop but our app doesn’t detect it.
  7. 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

image

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

View all open jobs on GitHub

isagoico avatar Oct 26 '21 03:10 isagoico

Triggered auto assignment to @Gonals (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Oct 26 '21 03:10 MelvinBot

Triggered auto assignment to @kadiealexander (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Oct 26 '21 10:10 MelvinBot

Nice catch! Added tags and sending to the pool

Gonals avatar Oct 26 '21 10:10 Gonals

Just going to reassign since I'll be OOO for the next wee while.

kadiealexander avatar Oct 27 '21 04:10 kadiealexander

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Oct 27 '21 04:10 MelvinBot

@kevinksullivan Eep! 4 days overdue now. Issues have feelings too...

MelvinBot avatar Nov 01 '21 19:11 MelvinBot

I was unable to reproduce this on web. The app responded correctly when I turned off hotspot.

image

kevinksullivan avatar Nov 02 '21 04:11 kevinksullivan

Sorry couldn’t able to get here early @kevinksullivan

  1. Create hotspot using mobile internet
  2. Connect the Laptop to the hotspot
  3. Now Turn off the mobile internet not the created hotspot!

Santhosh-Sellavel avatar Nov 05 '21 17:11 Santhosh-Sellavel

@kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!

MelvinBot avatar Nov 05 '21 19:11 MelvinBot

When you say mobile internet do you mean wifi , cellular, or something else?

kevinksullivan avatar Nov 08 '21 22:11 kevinksullivan

Cellular data @kevinksullivan

Santhosh-Sellavel avatar Nov 09 '21 13:11 Santhosh-Sellavel

@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Nov 12 '21 19:11 MelvinBot

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.

kevinksullivan avatar Nov 16 '21 00:11 kevinksullivan

@isagoico Can you help me here. Can you reproduce this now. Can you add attachments if reproducible.

Santhosh-Sellavel avatar Nov 16 '21 16:11 Santhosh-Sellavel

@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.

Santhosh-Sellavel avatar Nov 19 '21 16:11 Santhosh-Sellavel

I was able to reproduce the issue with the same steps as before in build 1.1.14-2 (Desktop)

isagoico avatar Nov 19 '21 21:11 isagoico

https://www.upwork.com/jobs/~0129cfc8254ac008fa

kevinksullivan avatar Nov 23 '21 22:11 kevinksullivan

Triggered auto assignment to @parasharrajat (Exported)

MelvinBot avatar Nov 23 '21 22:11 MelvinBot

Triggered auto assignment to @pecanoro (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Nov 23 '21 22:11 MelvinBot

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

kidroca avatar Nov 23 '21 23:11 kidroca