sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

'installSolution' step in site script fails if site design is applied afterwards or if site is not immediatley opened after creation from admin center

Open ChrisAV81 opened this issue 7 years ago • 5 comments

Category

  • [ ] Question
  • [ ] Typo
  • [X] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

When applying a site design with a site script that includes the 'installSolution' verb, when creating a site based on the site design or applying the site design manually, the app should be installed to the site automatically. This does not work as expected.

Observed Behavior

The installation of an app to a site though site script only works in the following cases: Create a site through SharePoint Home and select the site design, or Create a site though SharePoint admin center and select the site design and open the site immediatley after the site has been created. If applying site design on an already created design through 'Site settings' > 'Site Designs', or if you want more than 30 seconds after creating the site from admin center and then opening the site in the browser, the installation step fails and app is not installed. In 'Site Design' view on the site, it says 'Action failed' on the app installation step.

Steps to Reproduce

We can reproduce with any SPFX package in any environment. Office365 support could also reproduce the issue, but could not help us since they claimed it's a development related issue.

  1. Install an SPFX solution to the tenant app catalog (i.e. default solution generated by yo @microsoft/sharepoint). Do not make it tenant deployed automatically on all sites.
  2. Create a site script and site design and replace the id guid with the unique ID of the app. Install the site script and site design on the tenant with SPO Powershell.

{ "$schema": "schema.json", "actions": [ { "verb": "installSolution", "id": "a53b0fd0-ca40-42c5-b3c4-8b894431220a" } ], "version": 1 }

3a. Create a site collection with the site design through SharePoint Online Admin Center. Wait 30 seconds. Then open the site the browser. Installation of app fails. 3b. Create a site collection based with Blank Communication site. Open the site in the browser. Through the 'Site Design' in the UI, apply the site design manually. Installation of app fails.

The following scenario works though: 3c. Create a site collection with the site design through SharePoint Home. After the site has been created the user gets redirected to the site directly. Site design and app installation step is completed with no issues.

ChrisAV81 avatar Jan 31 '19 15:01 ChrisAV81

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

msft-github-bot avatar Jan 31 '19 15:01 msft-github-bot

Experiencing the same issue. We need to apply the site design when the (communication) site is created using the blank site design because we're provisioning a taxonomy field which requires the TaxonomyFieldAdded feature to be activated. This feature seems to activate with a delay after the site is created.

michelsmit avatar Feb 19 '19 14:02 michelsmit

Also the same issue here, if I apply the site design at site creation it works. If I try apply the site design to an existing blank site I get Install SPFX Solution: Action failed.

TheAndrewHess avatar Feb 28 '19 14:02 TheAndrewHess

Hi Has the bug resolved? We are getting the same bug.

KavyalJ avatar May 11 '21 15:05 KavyalJ

Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.

If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.

We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.

github-actions[bot] avatar May 02 '25 14:05 github-actions[bot]