some times you can face issues with apps due to change in master pages The error happens when the master page of the parent site is applied to the app web of the Sharepoint App. In my case I could reproduce this by reapplying the master page in the UI and selecting the “Reset all subsites to inherit the master page option”. # if no arguments added display error and exit if ($args.Length -eq 0) { Write-Host -ForegroundColor Red "Missing Required Argument" Write-Host -ForegroundColor Red "Usage - 'ResetAppMasterPages <<site collection url>>' " Exit 0 } $siteCollUrl =$args[0] Add-PSSnapin Microsoft.SharePoint.PowerShell -ERRORAction SilentlyContinue | Out-Null #start logging $LogFile = "$($FarmConfig.Farm.ScriptConfig.ScriptLoggingFolder)$($MyInvocation.MyCommand.Name.Replace('.ps1',''))-$(Get-Date -Format yyyy-MM-dd_h-mm-ss).txt" Start-Transcript -Path $LogFile -Force Start-SPAssignment -Global