Forum Discussion
Kim Cote
Aug 09, 2018Copper Contributor
SPFx Web Part Update anomalies
Once our web parts are deployed to a site collection app catalog we see anomalies in updating an existing web part with a new version of the same. Our goal is to use the site collection app catalog and be able to script the distribution of new version of web parts to all sites in the collection without manual intervention.
- Two web sites in the same site collection each with the same web part version 1.7 on the site. One site uses the web part on a page and the other does not use it on any page.
- Now we upload a 1.8 version of the same web part to the site collection app catalog. So the web part in site contents shows that I need to Add the new part and I do.
- After adding the new web part site contents shows the new version 1.8 but the web part on the page is still exhibiting the old version 1.7 behavior. Deleting and adding the part to the page again does not help.
- What did work was removing the web part from the second site where it was not in use, deleting from all pages where used, deleting from the sites where its used, and from the app cat before trying to add the new version 1.8 again.
- So presence of 1.7 on the site that didn’t use the part seems to be holding up the deployment of the new version for the site that does use the part.
- Slightly different scenario than above.
- Web part version 1.7 is in the site collection app cat and used in many pages on multiple sites.
- New version 1.9 of the same web part is uploaded to the app catalog and deployed.
- The web part About menu in Classic site contents shows version 1.7 and the web part Monitor menu shows version 1.7 in Modern site contents.
- But the web part is exhibiting the new version 1.9 behavior.
- In the past, like two weeks ago, I had to click the Get It button for the part to use new functionality. Now after deploy to app cat, site contents, both modern and classic, still shows the old version # and indicates there is a new version offers the Get It button BUT the new code is being used.
- Deployed new versions of web parts but they do not exhibit the new behavior until you click the Get It button in the web part About menu.
- Maybe this was old behavior and something as recently changed since right now I am seeing the new web part functionality without ever clicking the Get It button.
- Using PS script to update already existing web parts. Some of them resulted in errors below so only partial results. Are there any ideas on the cause of the error? I know I can submit on GitHub but it’s a long form for just a short error message.
- Update-PnPApp : {"odata.error":{"code":"-2146232832, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The app for SharePoint with ID 455a86a6-7bba-49a4-b3ed-5c8b5f2e8ead does not exist in the app catalog."}}}
- We know the appid is a valid app in the catalog because we previously ran a similar script to Install the apps.
No RepliesBe the first to reply