githubbob42 / mingle2github2

0 stars 1 forks source link

upversion failures #4837

Open githubbob42 opened 7 years ago

githubbob42 commented 7 years ago

Mingle Card: 5185 Steps to Reproduce

| | |
|-|-|
|**Version #**| |
|**Hardware**| |
|**OS**| |
|**Browser**| |
|**Username**| |
|**Password**|Use LastPass|
|ORG ID| |
|User ID| |
|RayGun Error ID| |

We need to confirm the steps to reproduce but this is our current guess

  1. Login to Mobile with an older Mobile version
  2. Expire the user’s sessions
  3. Set the user to a newer version of Mobile
  4. Sync the previous Mobile session

Expected Result

Actual Result

The sync gets stuck in the upversion process

Analysis

BACKGROUND:

Scenario:

  1. The initial version check returns a mismatched version so the sync is halted with ‘FieldFX is out of date. Updating...
  2. the appcache should be out of date at this point and should have already starting downloading new offline assets triggering an ‘updateready’ event
  3. instead, Chrome thinks there is no new manifest, so no new offline resources are downloaded
  4. old app js/css is still in localstorage. browser is not refreshed.
  5. reloading the browser manually makes not difference because the app/js code is still the old version stored in localstorage
  6. return to step 1 above

Potential Causes:

  1. version mismatch is properly detected, but appcache fails to update because of some network error. subsequent load finishes updating appcache before the ‘updateready’ handler is wired up, so app js/css is never forced to reload.
    1. in this situation, the appcache is up to date, but the app js/css is not. Every sync will fail in this situation.
    2. this scenario is much more likely to happen now that we are offline caching very large assets for PDF generation

Potential Solution:

Related Cards

Test Plan

githubbob42 commented 7 years ago

Pull Request #2459