PnP provisioning fails at random on invalid response

Deleted
Not applicable

We are working on an solution which is supported by multiple PnP templates and as we are building new functionality we are deploying sites using these templates to different tenants for test and acceptance purposes. Lately, last few weeks, we are increasing encountering CSOM request limit exceeded warnings but more importantly random errors on ProcessResponseStream. Looks like our tenant refuses to answers correctly... The issue is not related to a specific item in de template. It fails at random points. And when tried again after the error message all is working fine.

Anyone else having this issue? Are we doing something wrong or is this just how Office 365 reacts when receiving too many requests?

 

@Vesa Juvonen: ExecuteRetry method in PnP only catches the webexceptions. Maybe good to check whether retry option can also include errors occurring when processing the response.

 

Stack trace of one of the error:

Exception Microsoft.SharePoint.Client.ServerException: Ending value cannot be less than starting value.

at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryImplementation(ClientRuntimeContext clientContext, Int32 retryCount, Int32 delay)
at Microsoft.SharePoint.Client.FieldAndContentTypeExtensions.AddContentTypeToList(List list, ContentType contentType, Boolean defaultContent)
at Microsoft.SharePoint.Client.FieldAndContentTypeExtensions.AddContentTypeToListById(List list, String contentTypeID, Boolean defaultContent, Boolean searchContentTypeInSiteHierarchy)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.CreateList(Web web, ListInstance list, TokenParser parser, PnPMonitoredScope scope, Boolean isNoScriptSite)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.ObjectListInstance.ProvisionObjects(Web web, ProvisioningTemplate template, TokenParser parser, ProvisioningTemplateApplyingInformation applyingInformation)
at OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.ApplyRemoteTemplate(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation provisioningInfo)
0 Replies