1

I'm Adding sharepoint framework Web part (on-permiss). But when Id add it to sharepoint page it gives correlation id error. Attached is the ScreenShot.

this is the exception and message tracked by uls log viewer

Using empty subscription Id

System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at Microsoft.SharePoint.ClientSideComponent.SPClientSideCachedThirdPartyComponentProvider.GetUpdateTimeFromAppCatalog(SPWeb web) at Microsoft.SharePoint.ClientSideComponent.SPClientSideCachedThirdPartyComponentProvider.GetDistributedUpdateTime(Guid tenantId, SPWeb web) at Microsoft.SharePoint.ClientSideComponent.SPClientSideCachedThirdPartyComponentProvider.EnsureCacheIsValid(SPWeb web, Guid tenantId) at Microsoft.SharePoint.ClientSideComponent.SPClientSideCachedThirdPartyComponentProvider.GetNotFoundComponents(SPClientSideComponentQueryResultCollection requests, SPWeb web) at Microsoft.SharePoint.ClientSideComponent.SPClientSideComponentManifestReader.FindComponents(SPClientSideComponentQueryResultCollection queryResults, SPWeb web, SPReliabilityMonitor monitor) at Microsoft.SharePoint.ClientSideComponent.SPClientSideComponentManifestReader.GetClientSideComponentQueryResultCollection(Guid[] componentIds, SPWeb web) at Microsoft.SharePoint.ClientSideComponent.ClientSidePageGenerator.GetManifests(IEnumerable`1 manifestIds, SPWeb web) at Microsoft.SharePoint.ClientSideComponent.ClientSidePageGenerator.RenderScript(HtmlTextWriter writer, Boolean redirectOnError) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.RenderClientSideWebPartScript(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at Microsoft.SharePoint.WebControls.AjaxDelta.RenderChildren(HtmlTextWriter output) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.AjaxDelta.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.SharePointForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at Microsoft.SharePoint.Publishing.PublishingCachablePage.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.DeltaPage.RenderToBase(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.DeltaPage.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.WebPartPage.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)**

Any Help would be appreciated :)

2 Answers 2

3

You're getting a format exception saying

"String was not recognized as a valid DateTime".

This means that somewhere in your code you're setting a value to a DateTime that isn't valid.

Maybe you have an empty string or have misplaced month, year or day values. Could also be that you're not parsing a string value properly.

Check all places where a DateTime is used and make sure valid values are used. Good luck!

1
  • The problem occurs only if you have SharePoint 2016 FP2 and your site's locale is something else that en-us. The stated issue has been resolved and January 2018 CU should have fixed it. Commented Jul 2, 2018 at 8:44
1

I faced the exact same today and found out that this has been issued already in https://github.com/SharePoint/sp-dev-docs/issues/1083.

The problem occurs if you have SharePoint 2016 FP2 and your site's locale is something else that en-us.

The stated issue has been resolved and January 2018 CU should have fixed it. I haven't confirmed.

What I did confirm is that if you change the locale of your site to English (United States) from Site Settings > Regional Settings, then the problem goes away. I'm still going to test if my web part functions with other locales after updating to January 2018 CU.

EDIT: I can confirm that after installing January 2018 CU my web part functions on a site with some other locale than English (United States). Tested with German (Germany) which wasn't previously working.

1
  • Yes, your right i also do that and it's working for me Commented Jul 2, 2018 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.