Forms loading cached / old data

Derek C
Tera Guru

Hi all,

 

We've been having an issue where a record (e.g. and INC) will load old / cached data after it's been updated. Typically this happens when you open it from an email link. The form will show data that has since been changed (e.g. State was updated to work in progress, but is still showing New). After you reload the form, it seems to be resolved.

We are on San Diego, and we are using the Next Experience UI.

 

I can't find anything on the community regarding this, and ServiceNow support seems to be stumped as well which makes me wonder if we are the only ones experiencing it.

 

The issue is intermittent and not reproducible on demand.

 

The one way I've been able to (kind of) reproduce it is by opening two separate web browser windows (one incognito) and impersonating another user. Then updating a record, using SNUtils to switch the node, and opening the record in the other window.

 

Thoughts on what could be causing this? Has anyone else seen this issue, or is it something unique to us?

Thanks!

1 ACCEPTED SOLUTION

Derek C
Tera Guru

ServiceNow support did finally provide a work around for this. You will need to put a ticket in with ServiceNow as there is an update set they can provide that updates the record that needs to be updated, you will not be able to update it even as admin.

 

The name of the update set they provided me was "SNC PRB1588976 Workaround", if you need this from ServiceNow support, it might be useful to ask for it specifically.

 

Feedback from support below.

 

Most Probable Cause:
This issue is caused by a caching issue with the Next Experience / Polaris UI service worker, specifically the "polaris-sw-prefetch-iframe" worker.


Workaround:
This issue can be worked around by doing:
0. Logging in as maint
1. go to sys_ux_managed_service_worker.do?sys_id=4f58aeeb6d251ab126be8ae441962762 (managed-service-workers/polaris-sw-prefetch-iframe)
2. Uncheck Active
3. Click update
4. Visit cache.do
5. Close & reopen browser (or close all tabs on the problematic domain)
6. managed-service-workers/polaris-sw-prefetch-iframe service worker should no longer be registered

OR:

1. Load and apply the update set that is attached to this PRB (sys_remote_update_set_87632745773021101db9169bae5a991f.xml) and proceed with steps 4-6 above.

How to confirm the workaround:
1. Open chrome dev tools
2. Click on Application tab
3. Click on Service Workers in left panel
4. Click on root.js in center panel
5. Confirm importScripts does not contain '/uxasset/externals/managed-service-workers/polaris-sw-prefetch-iframe.jsdbx' in list

View solution in original post

19 REPLIES 19

Kristin Acree
Mega Sage

Yes, i've been experiencing something like that for a bit. Happening on San Diego... on Toyko now. 

Example i had, I went to Commmit an update set on Friday. Everything was normal. Today, i went to deploy another update set, went to ALL, typed in Commit, and clicked on the option to commit update sets. The list loaded and it was the list i saw on friday, before i deployed. I had to refresh the list, in order to get the new current data. So its seems like a cache issue with the browser or snow... not sure which yet. 

MattSN
Mega Sage
Mega Sage

Also seeing this as of the last few months. Seem like a possible Polaris bug or browser bug.

Tim Grindlay
Kilo Sage

We're also getting reports of this on Utah after enabling Next Experience. Will also raise a Now Support ticket and reference this post. Thanks @Derek C !

Shar_A
Giga Contributor

I'm so pleased I was sent your post! I feel validated now because I don't think anyone was believing me when I was saying I had this problem 😅 I noticed it after the Tokyo upgrade, and when I started using the Next Experience display at the same time. I now have to keep remembering to refresh my browser (Edge) to make sure I am looking at current data.

Tim Grindlay
Kilo Sage

Just as a follow up to this, people who have applied this workaround may have received the following communication notification from Now Support. I'm currently replying to see whether the problem ticket PRB1588976 has been resolved in Vancouver.

 

We are reaching out to inform you of an issue starting with the Now Platform® Vancouver release where you could experience a blank screen post upgrade if the Service Worker properties are disabled. Starting in Vancouver, we have optimized performance by removing certain libraries from the common assets bundle. These assets are cached on the browser and if the browser attempts to use the old cached version, a blank page or white screen is displayed while accessing the instance. 

Our records indicate that your noted instances have one or both of the Service Worker properties disabled and can be impacted when on a Vancouver version or above. 

Here’s what you can expect

  • An existing mechanism is in place to handle the cache invalidation and eviction of stale assets from the browser after an asset has been modified or after an instance upgrade. However, when the Service Workers properties are disabled this mechanism is not working as expected.
  • Both Service Worker properties, glide.uxf.msw.disabled and glide.polaris.sw_corejs.disable, should be enabled to ensure old cached versions are properly handled and do not cause a blank page or white screen.

Here’s what we need you to do

  • Please review KB1633402 for more details about this issue and workaround instructions to enable the properties. 
  • Before enabling the properties in production, we recommended that you test in a sub-production environment.
  • If you encounter any issues when testing in your sub-production environment, please open a Case with the ServiceNow Support Team.