Firefox does not invalidate MAAS cache with UI update

Bug #1881201 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned
maas-ui
Fix Released
Unknown

Bug Description

Browser: Firefox 76.0.1+build1-0ubuntu0.20.04.1

I built Debian packages on master today to try out singlespa. While the build succeeds and I can login I cannot view any page besides machines listing. Clearing my browser cache and building in a new, clean environment does not fix the issue.

I see the following in my browser console:

Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: http://10.0.0.2:5240/MAAS/r/static/js/main.3a537aa9.chunk.js
Source Map URL: main.3a537aa9.chunk.js.map

Relative positioning of table rows and row groups is now supported. This site may need to be updated because it may depend on this feature having no effect. machines

Reproduction:
1. make package-dev
2. Install the Debian packages in ../build-area on a test system
   sudo dpkg -i *.deb
   sudo apt install -f
3. Login the MAAS and try to access another page

Tags: ui
Revision history for this message
Kit Randel (blr) wrote :

Hi Lee, that looks like an old build, there is no longer a `static` directory nor would there be a chunked js asset in the new build like above.

Revision history for this message
Lee Trager (ltrager) wrote :

There seems to be an issue with Firefox invaliding MAAS's cache. I noticed that the UI worked in private browsing mode. I told Firefox to forget about MAAS but I still ran into the same issue. It was only when I deleted all cached web content did the UI start working again.

summary: - singlespa has not been updated for Debian packages
+ Firefox does not invalidate MAAS cache with UI update
Changed in maas-ui:
status: Unknown → New
Kit Randel (blr)
Changed in maas:
status: New → In Progress
Revision history for this message
Huw Wilkins (huwshimi) wrote :

Hi Lee, I've updated the fronted files to include content hashes so we shouldn't ever be referencing old cached files. However, it looks like your html was being cached somehow so my changes might not help.

Would you mind trying again with maas-ui master to see if that resolves the issue for you?

Revision history for this message
Kit Randel (blr) wrote :

Lee, we just landed a branch (https://github.com/canonical-web-and-design/maas-ui/commit/265606930777d7794043529ba2f7b852f96a5499) which adds hashes to the js assets, so I've marked this fix committed.

If you're still seeing old cached versions of `index.html` that will have to be investigated on the server (I'm not sure how Twisted web handles cache expiry).

Changed in maas:
status: In Progress → Fix Committed
Changed in maas-ui:
status: New → Fix Released
Alberto Donato (ack)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.