I created a SPFx Extension (ListView Command Set) and installed into App Catalog with tenant wide deployment enabled. The extension is configured to work in document libraries and would not activate in lists. Everything works fine until I need to re-deploy this extension without enabling tenant wide deployment, so I can use the extension on just specific sites.
After deleting the app from the App Catalog and deployed it again without tenant wide enabled, and added the app to a couple of sites, the extension does not show the buttons on the Command Bar. Some investigations later I gathered the follwoing detials:
After the tenant wide enabled app is deleted, whenever I refresh a document library, I see these errors in Chrome developer console.
These errors only goes away after I install the app again with tenant wide deployment enabled.
While the app is installed with tenant wide enabled, if I delete the related item from the Tenant Wide Extensions list in the App Catalog site, or simply edit the item and tick the Disabled checkbox, then the errors will appear again.
I tried this in two tenants and both have the same behaviour.
With the above findings, I am suspecting there are some issues in the clean up process when SharePoint uninstalls tenant wide deployed extensions (or maybe even all app types like webpart, customizers...etc). I couldn't find any documentation on how to properly uninstall apps from the App Catalog, so I assume it would be as simple as just deleting them from the Apps for SharePoint library?
Has anyone had this issue before or knows a solution to this?