Project

General

Profile

Bug #59904

Properly invalidate browser cache after updating from new UI

Added by Eric Loewenthal 7 months ago. Updated 3 months ago.

Status:
Done
Priority:
No priority
Assignee:
Erin Clark
Category:
GUI (new)
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

There's a fairly steady trickle of reports from the forums (and my personal experience) that the new GUI ends up not working after an update, because it was using some stuff from the browser cache instead of downloading the new version from the server.

This behavior is particularly nasty because the GUI generally looks correct. Symptoms typically involve non-functional UI elements like buttons, so users tend to flail around a bit (I speak from experience) until they either figure it out on their own or are told to clear the browser cache.


Related issues

Has duplicate FreeNAS - Bug #59886: Gui unavailable after upgrade - required browser clean to enable GUI againClosed

Associated revisions

Revision 98d5cd89 (diff)
Added by Erin Clark 7 months ago

Add random seed to signin URL before going from reboot to signin page to force browser reload

Ticket: #59904

Revision a4d86118 (diff)
Added by Erin Clark 7 months ago

Add random seed to signin URL before going from reboot to signin page to force browser reload

Ticket: #59904
(cherry picked from commit 98d5cd8938c7533f6d0c46c5c4fb48fb8b89761d)

Revision 04a32a9c (diff)
Added by Erin Clark 4 months ago

Add logic for getting buildtime file

Ticket: #59904

Revision 9d69d9ff (diff)
Added by Erin Clark 4 months ago

Add logic for getting buildtime file

Ticket: #59904
(cherry picked from commit 04a32a9cd0bf1ce0b54270724a82326640f86758)

Revision 6cf553ce (diff)
Added by Erin Clark 4 months ago

Buildtime file needs to go into assets for us to be able to grab it

Ticket: #59904

Revision 2569b270 (diff)
Added by Erin Clark 4 months ago

Buildtime file needs to go into assets for us to be able to grab it

Ticket: #59904
(cherry picked from commit 6cf553ce7c1e09e42d3d5e05914dae49f558d73e)

Revision 7417e1f2 (diff)
Added by Erin Clark 4 months ago

Add logic for getting buildtime file

Ticket: #59904
(cherry picked from commit 04a32a9cd0bf1ce0b54270724a82326640f86758)
(cherry picked from commit 9d69d9fff27a50b3b6867caeaaffb09e785880ae)

Revision 239266c7 (diff)
Added by Erin Clark 4 months ago

Move update checking logic out of app.component into login page and use buildtime info as source of truth about update

Ticket: #59904

Revision f96e916c (diff)
Added by Erin Clark 4 months ago

Move update checking logic out of app.component into login page and use buildtime info as source of truth about update

Ticket: #59904
(cherry picked from commit 239266c7dc2a39b5e6baaf86f2387f3ab15ba75c)

Revision f6b362ba (diff)
Added by Erin Clark 4 months ago

Return app.component and preferences.service to previous state as new modifications are no longer necessary

Ticket: #59904

Revision 07d5f6ed (diff)
Added by Erin Clark 4 months ago

Revert revert the revert of the revert

Ticket: #59904

Revision de114152 (diff)
Added by Erin Clark 4 months ago

Sanitize app.component.ts

Ticket: #59904

Revision c1dfc425 (diff)
Added by Erin Clark 4 months ago

Preserve the middleware token for push login

Ticket: #59904

Revision df2f2592 (diff)
Added by Erin Clark 4 months ago

Preserve the middleware token for push login

Ticket: #59904
(cherry picked from commit c1dfc425bc7876229592e4b7d60d426eaebc4e8d)

History

#1 Updated by Dru Lavigne 7 months ago

  • Has duplicate Bug #59886: Gui unavailable after upgrade - required browser clean to enable GUI again added

#2 Updated by Erin Clark 7 months ago

  • Assignee changed from Release Council to Erin Clark

What browser are you on?

#3 Updated by Dru Lavigne 7 months ago

  • Status changed from Unscreened to In Progress
  • Target version changed from Backlog to 11.2-U2

#4 Updated by Erin Clark 5 months ago

  • Assignee changed from Erin Clark to Damian Szidiropulosz

Damian had a better solution to this problem, passing to him

#5 Updated by Erin Clark 5 months ago

  • Target version changed from 11.2-U2 to 11.2-U3

We have some ideas on how to do this, either have a datestamp or some kind of incrementing file somewhere in the repo that tells the browser that the UI has been updated however hashing out the implementation details and testing this will take quite a bit of time, given how close this is to code freeze we are going to push this to U3 so we can make sure we do this right the first time.

#6 Updated by Damian Szidiropulosz 4 months ago

PR 2013 Fixes this by adding a platforminfo constant to the top level component. This allows the UI to check the version number against the version stored in localstorage before authentication happens. If there is version stored in the file and it doesn't match the constant we assume that the user just upgraded. The fix works well but hard codes the version into the file. Considering we also have a nightly this is not a maintainable solution. For this to maintainable we would like the automated build process to update the version with each build.

#8 Updated by Erin Clark 4 months ago

  • Status changed from In Progress to Ready for Testing
  • Assignee changed from Damian Szidiropulosz to Erin Clark
  • Needs Merging changed from Yes to No

#9 Updated by Erin Clark 4 months ago

Testing criteria: when switching from one version to another (i.e. updating) the browser should do a quick refresh on the login page. This should not break TrueView's post authentication method, the refresh should still happen if the version of the UI that was cached was out of date and the middleware token should still login.

#10 Updated by Dru Lavigne 4 months ago

  • Subject changed from Properly invalidate browser caches after updates to Properly invalidate browser cache after updating from new UI
  • Needs Doc changed from Yes to No

#13 Avatar?id=55038&size=24x24 Updated by Zackary Welch 3 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

#14 Avatar?id=55038&size=24x24 Updated by Zackary Welch 3 months ago

  • Status changed from Passed Testing to Failed Testing

Initially I passed this since I didn't have any problems after updating, but I found an issue when switching between boot environments. I went from Internal95 to Internal97 and FreeNAS did not refresh on the login page, making the UI look all messed up. Refreshing fixed it. Seems this might not be fully functional. If this instance is not related to this ticket, then otherwise it passes.

#15 Avatar?id=55038&size=24x24 Updated by Zackary Welch 3 months ago

  • Needs QA changed from No to Yes

#16 Avatar?id=55038&size=24x24 Updated by Zackary Welch 3 months ago

  • Status changed from Failed Testing to Passed Testing
  • Needs QA changed from Yes to No

Unable to reproduce. Erin also tested this and couldn't reproduce, so I'm going to mark this as passed; if this happens again, I reckon a ticket will be created at some point.

#18 Updated by Dru Lavigne 3 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF