Loading modal dissapears when app goes offline

Description

Steps to reproduce:
1. Go to create/authorize requisition screen, choose facility and program that do not have a requisition for a current period ("Not yet started")
2. Click proceed to initiate a requisition
3. Invoke offline mode (eg. set browser offline mode in the browser)

As soon as the application is offline, the loading modal fades away and allows user to click on proceed (initiate) again. This may in turn lead to several other errors/warnings displayed to the user, depending on whether the previous request is still in progress.


Here is the code in the offline modules that closes the loading modal

Actual behavior is that the loading modal is closed because the offlineService says its offline, and the HTTP service pre-emptively cancels the HTTP request.

Recommendation: Let HTTP requests actually fail

Environment

None

QAlity Plus - Test Management

Checklists

Activity

Brandon Bowersox-Johnson 
October 10, 2017 at 10:03 PM
(edited)

Moving to Dead. After a team meeting with Nick, Josh, Brandon and Chongsun, we have a new 4-step strategy to address this offline problem. The 4-step strategy is a new plan for OLMIS-3137. Nick will write the 4 new tickets, and we will move to dead.

FYI , you may want to look at those 4 new tickets, the first 2 of which we will groom for the coming sprint.

Nick Reid 
October 2, 2017 at 6:33 PM

- this conversation is going to happen in slow motions apparently

Right now offline status is checked frequently (every 30 seconds)

Maybe we should make it stop checking and wait for a request to fail (ie a XHR request timing out with a status code of 0)

The other reasonable thing to do here, would just to remove what ever is causing the loadingModal to close when we go offline – as this bug might have been implemented as a "feature"

Sebastian Brudziński 
September 25, 2017 at 8:17 AM

Can you elaborate on that idea? I'm not sure I follow.

Nick Reid 
September 21, 2017 at 3:55 PM

— I'm guessing this has been a problem in Malawi

I think part of it is that the offline checks the offline status too frequently — and we should actually be letting the browser and HTTP connections fail/timeout (I think???)

does this sound right to you?

Won't Fix
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Priority

Time Assistant

Created September 8, 2017 at 3:36 PM
Updated February 8, 2023 at 1:28 PM
Resolved October 10, 2017 at 10:04 PM