Getting error when adding an app - Application error when access /_layouts/15/addanapp.aspx

Jerry Xu-MSFT 7,926 Reputation points
2020-08-10T06:55:56.603+00:00

Hi,

I am getting the below error when I try to add an app to the site. I am using SharePoint Document Library for deploying the SPFx webpart in tenant. There are no errors when packaging or uploading the package to App Catalog.

But I am getting unexpected error when I add the app to the site. Below is the error from the ULS Logs. Can suggest some approach on how to resolve this?

Application error when access /_layouts/15/addanapp.aspx, Error=VAlue cannot be null. Parameter name: appId

Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentNullException: Value cannot be null. Parameter name: appId

at Microsoft.SharePoint.Administration.SPAppInstance.SetOAuthAppId(SPWeb web, String appId)

at Microsoft.SharePoint.Utilities.MarketplaceUtilities.InstallAppSynchronously(SPWeb web, Stream appStream, String oauthAppId, Guid productId, Boolean isUpgrade, CultureInfo installationCulture, SPAppSource source)

at Microsoft.SharePoint.Utilities.MarketplaceUtilities.TriggerAppInstall(SPWeb web, String appCatalogId, SPAppMetadataCatalogType appCatalog, String oauthAppId, Boolean isUpgrade, CultureInfo installationCulture)

at Microsoft.SharePoint.ApplicationPages.StorefrontBase.AppDownload(Boolean isUpgrade, Boolean autoRedirect)

at Microsoft.SharePoint.ApplicationPages.StorefrontBase.Render(HtmlTextWriter writer)

at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.HandleError(Exception e)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest()

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Source from TechNet

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,576 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jerry Xu-MSFT 7,926 Reputation points
    2020-08-10T07:33:16.21+00:00

    The issue resolved when I restarted all the servers. But it keeps occurring intermittently. We are still not able to resolve this permanently.

    0 comments No comments