sp-dev-site-scripts icon indicating copy to clipboard operation
sp-dev-site-scripts copied to clipboard

"InstallSolution" verb is not getting triggered after the site creation

Open Prakash-Ramasamy opened this issue 6 years ago • 8 comments

Category

  • [ ] Question
  • [#] Bug
  • [ ] Enhancement

Expected or Desired Behavior

Added site script with "InstallSolution" as shown below

$site_script=@' { "$schema": "schema.json", "actions": [ { "verb": "applyTheme", "themeName": "Default Theme" }, { "verb": "installSolution", "id": "b893e31d-de81-4fbd-8bb6-125e89522456" } ], "bindata": { }, "version": 1 } '@

  • Once the site got created the theme should get apply and the app should be installed.

Observed Behavior

The theme is getting applied and the app is getting installed after the site creation, but if we make a delay of 5 mins or more than that on clicking the Finish Button, then the app installation is not happening but the theme is getting applied.

Steps to Reproduce

  • Create a site script with installSolution verb and add it to the site design

  • Use that site design to create a site

image

  • Click the Finish button after 5 mins or more than that. You will be redirected to the site and the app will not be installed

image

Prakash-Ramasamy avatar Aug 16 '18 11:08 Prakash-Ramasamy

Actually, the same happens when SiteDesign is assigned to HubSite. When the site collection is joined to HubSite, logo and theme is applied but none of the solutions. I have tried several SPFX Web Parts with verb "installSolution" & Application Customizer with "installSolution" and "associateExtension". Any help?

KalleMansikkaniemi avatar Oct 17 '18 13:10 KalleMansikkaniemi

I'm having the same issues, unfortunately, when the Site is provisioned automatically. A possible workaround could be using different Site Scripts for the same Site Design, I haven't tried it tough, yet.

mschaefer85 avatar Nov 20 '18 09:11 mschaefer85

I'm not able to install it at all. Is there something wrong with my syntax?

"$schema": "schema.json",
"actions": [  

    {
        "verb": "createSPList",
        "listName": "Site Pages",
        "templateType": 119,
        "subactions": 
        [
          {
            "verb": "addSPField",
            "fieldType": "text",
            "displayName": "skoleurl",
            "isRequired": false,
            "addToDefaultView": true
          }
        ]
      },
      {
        "verb": "installSolution",
        "id": "d94019dd-7767-42e8-bba8-fb3cd76568f2",
        "name": "Nyhets Add-in"
        }
],
"bindata": {},
"version": 1

The "createSPList" verb doesn't fail, only the "installSolution" verb. When I look at the latest schema it is required with id, verb and name. I can't really see what I'm doing wrong(?). I get the id from Get-PnPApp.

https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json

"installSolution": {

  "type": "object",

  "allOf": [

    { "$ref": "#/definitions/baseAction" },

    {

      "properties": {

        "verb": {

          "type": "string",

          "pattern": "^installSolution$"

        },

        "id": {

          "type": "string",

          "description": "The ID of the Solution."

        },

        "name": {

          "type": "string",

          "description": "The name of the Solution."

        }

      },

      "required": [ "id", "verb", "name" ]

    }

  ],

  "additionalProperties": false

},

Any thoughts is appreciated!

dogemaster1337 avatar Dec 04 '18 10:12 dogemaster1337

@dogemaster1337: What exactly does not work? Is there an error message or are the solutions simply not being installed?

mschaefer85 avatar Dec 04 '18 15:12 mschaefer85

@mschaefer85 There is an error message after the Site Design is applied. (I'm sorry but I haven't been able to update the correct language settings to English yet so the error message is in Norwegian)

But it says something like: The action wasn't completed. I can install the SharePoint Add-in / App manually to a site without any errors. Doesn't it work with SharePoint Add-in's? Because I tested with SPFX solutions and then it works.

image

dogemaster1337 avatar Dec 05 '18 08:12 dogemaster1337

I am seeing the same behavior with the installSolution verb. It is one of the Site Scripts associated with our Site Design and we have it triggering when a Site is associated with a Hub Site. Looking into the run status it shows that the installSolution actions failed. However, if I invoke the Site Design through PowerShell the installSolution will succeed.

ynot3363 avatar Dec 28 '18 16:12 ynot3363

Hi, Same issue here; I can add a site script, add it to the site design and also select it when applying the site design. However, when i click "Apply to site" it does run but throws an error "https://github.com/SharePoint/sp-dev-site-scripts/issues/18" (after 1-2 minutes).

The SPfX solution itself is a standard client web part (generated with Yo, spfx v 1.7.1), nothing customized there. Tried to contact Ms support, but not succeeded in getting the right person. Anyone has an idea how to solve this, and/or getting some proper exception messages?

ruudsolidnl avatar Feb 04 '19 17:02 ruudsolidnl

B.t.w. it does throws the error always, via UI and in PowerShell.

ruudsolidnl avatar Feb 04 '19 17:02 ruudsolidnl