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

  • Question

  • 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)


    Priya


    Thursday, July 23, 2020 11:37 AM

All replies

  • Hi, Priya,

    For this error message, have a try to add the app to another site and check if this error will pop up again. And you can use the PowerShell Get-SPAppInstance trying to get the app ID of your custom web part.  It is odd that the error only pops up when you add the App instead of uploading to app catalog.

    This “SharePoint Server 2019” Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Best Regards

    Jerry


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Friday, July 24, 2020 3:14 AM
  • Hi, Priya,

    Is there any update about your issue?

    Best Regards

    Jerry


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Tuesday, July 28, 2020 6:21 AM
  • Hi Jerry

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

    Regards,

    Priya




    Tuesday, July 28, 2020 6:33 AM
  • Hi, Priya,

    For your issue, it seems to be better for you to open a ticket about it.

    Best Regards

    Jerry


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Thursday, July 30, 2020 9:30 AM
  • Hi,

     

    This forum will be locked down, if you still have issues about this question, you can continue to post in here before 8/10/2020. Or, you can create a new question on Microsoft Q&A, we will continue to support you on the new home.

     

    Best Regards

    Jerry

     


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Monday, August 3, 2020 7:23 AM
  • Hi, Priya,

    As the forum will be locked down on 8/10/2020, to help you better, I have created a new thread on Microsoft Q&A platform for your question. If you have any issues about this question, welcome to post it on the Q&A thread.

    Best Regards

    Jerry


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Monday, August 10, 2020 6:58 AM