Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy.ps script fails at configuring sharepoint site #5

Open
damianmayer opened this issue Aug 3, 2023 · 7 comments
Open

Deploy.ps script fails at configuring sharepoint site #5

damianmayer opened this issue Aug 3, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@damianmayer
Copy link

damianmayer commented Aug 3, 2023

Description

Scipt fails at Applying provisioning template... to the SharePoint site.

Tried amending the wait timeout in the script from 60 to 120 and even 180 seconds - in each case it fails at this point with:

Failed to configure the SharePoint site {0} The remote server returned an error: (404) Not Found.
At C:\provision-assist-m365\Source\Scripts\deploy.ps
1:682 char:9

  •     throw('Failed to configure the SharePoint site {0}', $_.Excep ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (System.Object[]:Object[]) [], RuntimeException
    • FullyQualifiedErrorId : Failed to configure the SharePoint site {0} The remote server returned an error: (404) Not Found.

When timeout was set to 120 seconds or greater I am able to see the site being created in the SharePoint admin centre prior to the timeout error

Steps to reproduce

Expected results

site should be configured by the script

Actual Results

Script fails and I have a partial deployment - site is created but not configured.

Solution component

Deployment Script

Operating system (environment)

Windows

Additional Info

No response

@damianmayer damianmayer added the bug Something isn't working label Aug 3, 2023
@alexc-MSFT
Copy link
Collaborator

Hi @damianmayer we've seen some issues with the PnP module in the past so this could be one of them. Can you please check the SPO site and see if any of the lists are present?

Also did you see this message in the PowerShell window? "Applied template"

I'm trying to ascertain whether it was the PnP template that failed or the part after that which is where it configures columns and creates list items.

The other thing you can try which will give us a better idea of the error is to turn on the PnP log before running the script, you will need to run this cmdlet:

Set-PnPTraceLog -On -LogFile "C:\log.txt"

Feel free to amend the path to the log file, after running the script again you can check the contents of the log file and it may give us a better error message.

Thanks

@alexc-MSFT alexc-MSFT self-assigned this Aug 3, 2023
@damianmayer
Copy link
Author

damianmayer commented Aug 3, 2023 via email

@alexc-MSFT
Copy link
Collaborator

@damianmayer hmm very odd, I'll try and deploy it again here and see if I receive the same error.

@ilyhel
Copy link

ilyhel commented Aug 4, 2023

@damianmayer Hi are you using the https://domainname.sharepoint.com/sites/PASite with domainname as spoTenantName? If yes try to check the parameters.json file, it may that you missed something

@ilyhel
Copy link

ilyhel commented Aug 21, 2023

@damianmayer @alexc-MSFT I just change the provisioning xml schema with older FrameWork engine '2021/03' like this and it's work fine.
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2021/03/ProvisioningSchema"> <pnp:Preferences Generator="PnP.Framework, Version=1.10.2.0, Culture=neutral, PublicKeyToken=0d501f89f11b748c" /> <pnp:Templates ID="CONTAINER-TEMPLATE-1B3C2327DFE74A12A0C492DD708CB5DB"> <pnp:ProvisioningTemplate ID="TEMPLATE-1B3C2327DFE74A12A0C492DD708CB5DB" Version="1" BaseSiteTemplate="GROUP#0" Scope="RootSite"> <pnp:WebSettings RequestAccessEmail="" NoCrawl="false" WelcomePage="SitePages/Home.aspx" SiteLogo="{site}/_api/GroupService/GetGroupImage?id='71e18ff0-3e0a-469b-982b-41da61771d21'&amp;hash=638267757601246977" AlternateCSS="" MasterPageUrl="{masterpagecatalog}/seattle.master" CustomMasterPageUrl="{masterpagecatalog}/seattle.master" CommentsOnSitePagesDisabled="false" QuickLaunchEnabled="true" MembersCanShare="true" SearchScope="DefaultScope" SearchBoxInNavBar="Inherit" /> <pnp:SiteSettings AllowDesigner="true" AllowCreateDeclarativeWorkflow="true" AllowSaveDeclarativeWorkflowAsTemplate="true" AllowSavePublishDeclarativeWorkflow="true" SearchBoxInNavBar="Inherit" SearchCenterUrl="" />

@alexc-MSFT
Copy link
Collaborator

@ilyhel interesting, I've not had the XML fail for me but this could be due to PnP updates. @damianmayer did @ilyhel 's suggestion work for you?

@alexc-MSFT
Copy link
Collaborator

@ilyhel any updates on this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants