Repository: SharePoint/sp-dev-docs

Issue #7664: SPFX webpart serving old files versions in Chrome
Created: 2022-01-21T10:15:50Z
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested

 💥 Internet Explorer
 💥 Microsoft Edge
 💥 Google Chrome
 💥 FireFox
 💥 Safari
 mobile (iOS/iPadOS)
 mobile (Android)
 not applicable
 other (enter in the "Additional environment details" area below)

Additional environment details

browser version
Google Chrome - Version 97.0.4692.99 (Official Build) (64-bit)
Microsoft Edge -  Version 97.0.1072.62 (Official build) (64-bit)
SPFx version
1.12.1
Node.js version
10.13

Describe the bug / error
I'm facing a strange error where SPFX web part is serving an old version of the CDN files when using a standard refresh in chrome but works fine when doing a hard reload.
The problem appears again if another standard refresh is shown.
Gif showing the same page in both browsers side by side.

**Important to note that this has been reported to have occurred across a number of my customer's Production tenants and I can provide the details of those privately.
I believe this is similar to this issue
SPFx loading old version files and sometimes from different environment #7008
Apologies if more information is needed on build/environment etc but my assumption is that this isn't a specific config of my setup.
Thanks
Steps to reproduce

Add custom web part in Chrome & Edge

Expected behavior
Same consistent experience in Chrome and Edge

Duplicate issue #7685: SPComponentLoader.loadComponentById only works on hard reload
Created: 2022-01-31T12:10:36Z
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested

 💥 Internet Explorer
 💥 Microsoft Edge
 💥 Google Chrome
 💥 FireFox
 💥 Safari
 mobile (iOS/iPadOS)
 mobile (Android)
 not applicable
 other (enter in the "Additional environment details" area below)

Additional environment details

SPFx version: 1.10
Node.js version: 10.24.1
Edge version: 97.0.1072.76
Chrome version:  97.0.4692.99

Describe the bug / error
We created a search solution based on the PnP Search V3 solution. In this solution we load a seperate SPFx library with web components that can then be used in the template section of the Search Results webpart. We load this library with the following code:
const extensibilityLibraryComponent: any = await SPComponentLoader.loadComponentById(ExtensibilityService_LibraryComponentId);
Till last Friday (Jan, 27th) this was working smoothly. But since last Friday this stopped working. The only remedy is loading the hosting page with a hard reload -.
The error shown when we browse to the page without hard reload is: TypeError: Cannot read properties of undefined (reading 'isInternal') at e.loadComponent (https://modernb.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_aa02684fe246dc3a8d293413f9c42cd7.js:71:57126)
When the error is shown we can see our custom web component in the source of the page. It is not rendered as the browser has no idea how to render this custom element. After the hard reload the correct rendering is applied and the page looks as expected. But even when we then just press enter in the url section of the browser, the error occurs again and the data isn't shown.
Steps to reproduce

Enter the url of the page where our search result webpart is hosted
The data isn't shown,
Press Ctrl-F5 in the current window
The data is shown

Expected behavior
We except that there is no difference in the component loading mechanism if we refresh the cache or not.

Closing comment (2022-01-31T14:17:06Z): Dupe of #7664