SPFx 1.4.0 not always loading from Site Collection App Catalog
Category
- [ ] Question
- [ ] Typo
- [X] Bug
- [ ] Additional article idea
Expected or Desired Behavior
SPFx web part to load consistently from Site Collection App Catalog on a Classic page.
Observed Behavior
SPFx component will sometimes load (hard to reproduce, reloading the page will sometimes cause it to appear).
Gives the following error message in the console (Chrome)
Failed to render client side web part. Id: [e58b68a5-3b94-4076-9a76-698d7d5202cd], Manifest: [<NULL>], Error Details:: [Microsoft.SharePoint.ClientSideComponent.SPClientSideFrameworkException: Web Part e58b68a5-3b94-4076-9a76-698d7d5202cd failed to render as manifest is not found
at Microsoft.SharePoint.WebPartPages.ClientSideWebPart.GetManifest[TManifest](Guid componentId, String& manifestJson)
at Microsoft.SharePoint.WebPartPages.ClientSideWebPart.<>c__DisplayClass4.<Render>b__0()
at Microsoft.SharePoint.ClientSideComponent.SPClientSideFrameworkReliabilityHelper.ExecuteInReliabilityMonitoredScope[TException](Action userCodeDelegate, SPReliabilityMonitor monitor, UInt32 expectedFailureTag, Action1 customErrorHandlerDelegate, Boolean reThrow)]`
Web Part framework is not loaded.
Steps to Reproduce
Create a SPFx web part with Microsoft version 1.4.0 and place into a site collection app store, insert web part onto classic page.
Note, this issue might not occur straight away, it may even load correctly. But it does eventually break.
web part details:
includeClientSideAssets: true - I have tried false, and get the same issue.
package json:
"devDependencies": { "@microsoft/sp-build-web": "1.4.0", "@types/chai": ">=3.4.34 <3.6.0", "@types/mocha": ">=2.2.33 <2.6.0", "@types/node": "7.0.5", "@types/sharepoint": "2013.1.1", "gulp": "3.9.1", "gulp-clean": "0.3.2", "gulp-dest": "0.2.3", "gulp-file": "0.3.0", "gulp-folders": "1.1.0", "gulp-json-transform": "0.4.5", "gulp-open": "2.0.0", "gulp-plumber": "1.1.0", "gulp-rename": "1.2.2", "gulp-save": "1.2.1", "gulp-spsave": "3.0.0", "gulp-token-replace": "1.0.3", "gulp-webpack": "1.5.0", "webpack": "2.2.1", "webpack-bundle-analyzer": "^2.13.1", "webpack-dev-server": "2.3.0" }, "dependencies": { "@microsoft/sp-core-library": "1.4.0", "@microsoft/sp-http": "1.4.0", "@microsoft/sp-webpart-base": "1.4.0", "@types/es6-collections": "^0.5.31", "@types/jquery": "3.3.6", "@types/jqueryui": "1.9.27", "@types/react": "0.14.46", "@types/react-addons-shallow-compare": "0.14.17", "@types/react-addons-test-utils": "0.14.15", "@types/react-addons-update": "0.14.14", "@types/react-dom": "0.14.18", "@types/webpack-env": ">=1.12.1 <1.14.0", "jquery": "3.1.1", "mobx": "3.1.9", "mobx-react": "4.1.8", "moment": "2.22.2", "react": "15.4.2", "react-dom": "15.4.2", "sp-client-custom-fields": "^1.3.7", "typescript": "^3.0.3" }
Additional Notes
This web part is currently working 100% of the time on the top level site collection www.example.sharepoint.com when being loaded from the tenant app store running off the same version.
However running it from the dev site collection: www.example.sharepoint.com/sites/dev it breaks. I fixed one web part by reverting it to 1.0.0 but that is not really a solution.
I've reverted back to 1.2.0 and it seems to be working fine. But that's not really a solution. So I'll leave this as open.
Do you have try to upgrade to 1.6?
I have not, 1.6.0 was providing a bunch more gulp bundle -ship errors and I was on a time sensitive fix so it was easier to revert down.
Hi @MrCandleguy There is the same issue as you here. Please take a look, if you have questions, please give an update.
A fix for this should be now available. The issue was related to the internal caching of web part assets. If you still run into this, please open a new issue and reference this one. Sorry for the inconvenience.
@VesaJuvonen we see this same issue in 2016 using SPFx 1.4.1 with FP2. Once they recycle the webparts and re-add them to the page it works fine for a while.
Is there a fix for on-prem since we can't upgrade the framework version?
@VesaJuvonen we also see the same issue as @westleyMS. This happens 2 or 3 times a week. Removing and re-adding the solution seems to fix the problem for a little while but it always comes back.
Is there a fix or a workaround for 2016 on-prem environments?
@westleyMS and @cameronsibbald. This issue is around site collection app catalog and as site collection app catalog is NOT supported with SP2016 and SPFx 1.4.1 is also not supported with SP2016, this issue cannot be the root cause of issues in the on-premises.
The root cause of this particular issue was caching issue related on a site collection app catalog and that has been fixed for both SPO and SP2019.
My customer is having this exact same issue in their SP2016 farm. They have several webparts build using 1.1.0 version which intermittently stops working (not all at the same time) throwing this same exception. Workaround is to reinstall solution to site(s) which fixes the issue but it will happen again randomly. It seems that for some reason link to manifest file/info is broken. I saw this situation yesterday there, so we checked ComponenManifests list which @VesaJuvonen mentioned in duplicate issue (https://github.com/SharePoint/sp-dev-docs/issues/3586) and everything looked OK meaning that the correct manifest entry exists there for each webpart. In which other places manifest info is stored/cached in application side? Content DB for sure but maybe in page or cached somewhere?
We opened a premier support ticket for this issue. It was traced to back to a bug in the SharePoint 2016 code that had to do with the timer job that clears the recycle bin. The bug was supposed to be getting fixed and included in the next patch? @westleyMS could probably share more details about where things are at with releasing the fix for this issue.
@petepuu the workaround is to make sure that you do not have any instances of your app package in the recycle bins. When the timer job clears the bins, it will mistakenly remove your deployed app package as well. Hope that helps.
Thanks @cameronsibbald! I actually recommended them to open a Premier case but good to know that this is already recognised as bug and will be fixed, so probably they do not need to open a case for this now. Will inform my customer about this workaround to check are there any instances in recycle bin(s). This helped a lot. Thanks again! 👍
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues