Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

[BUG] Apply-PnPProvisioningTemplate intermittently fails to provision webparts from included SPFx application #2771

Open
MikeMorawski opened this issue Sep 23, 2020 · 2 comments

Comments

@MikeMorawski
Copy link

Environment

[X ] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013

PS: SharePointPnPPowerShellOnline 3.25.2009.1

Expected or Desired Behavior

When packaging into an XML provisioning template a ApplicationLifecycleManagement section to install an app containing a custom SPFx webpart, as well as a page containing a webpart, the webpart should appear on the page once provisioned.

Observed Behavior

On a fresh site, where the app is not yet installed, it appears that the provisioning engine might not be waiting for the application to complete installation before proceeding to the client side pages section. When this happens the webparts that are part of the (potentially pending) application install will be skipped unless the app has installed in time.

No errors are shown in the log, unless using Set-PnPTraceLog -On -Level Debug in which case I see:

powershell Warning: 0 : 2020-09-23 10:31:49.3404        [ClientSidePages]       [14]    [Information]   Could not find the control with either ID = 68017ac6-1bcb-4e88-a755-4071951486ae or Name =  to install. Did you install your client si
                                3510ms  8175bc8d-0e86-4199-ad29-2373279bfab8
powershell Information: 0 : 2020-09-23 10:31:50.7228    [OfficeDevPnP.Core]     [0]     [Debug] Publishing file 'Welcome.aspx'  0ms
powershell Information: 0 : 2020-09-23 10:31:50.9308    [ClientSidePages]       [14]    [Debug] Code execution scope ended      5101ms  8175bc8d-0e86-4199-ad29-2373279bfab8

Steps to Reproduce

  1. Create a new site collection
  2. Scaffold a new SPFx solution from generator
  3. Create a provisioning XML with pnp:ApplicationLifecycleManagement to install the SPFx application to the site
  4. Include in the provisioning XML pnp:ClientSidePages where one of the pages contains the custom webpart from the step above.
  5. Ensure no other content exists in the XML file so that there is a short period of time between App Lifecycle and Client Side Pages.
  6. Provision this to new sites. Maybe 33-50% of the time the webpart will not exist on the page, nor will it show up in maintenance mode.
  7. Redeploying the template (assuming the client side page is overwrite=true) will fix the issue.
@ghost
Copy link

ghost commented Sep 23, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Sep 23, 2020
@Graph2133
Copy link

Having the same issue, using SharePointPnPCoreOnline of version 3.20.2004.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants