title: Azure App Service Deploy pipeline task error: Resource doesn't exist/UnhandledPromiseRejectionWarning when resource exists
body: <p>Getting the following error while running an Azure DevOps pipeline that uses the Azure App Service Deploy task when the resource clearly exists. This is happening in an existing pipeline that historically works.</p>
  <pre><code> ##[error]Error: Resource 'blah' doesn't exist. Resource should exist before deployment.
   (node:2432) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getApplicationURL' of undefined
       at WindowsWebAppWebDeployProvider.&lt;anonymous&gt; (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:54:73)
       at Generator.next (&lt;anonymous&gt;)
       at D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:8:71
       at new Promise (&lt;anonymous&gt;)
       at __awaiter (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:4:12)
       at WindowsWebAppWebDeployProvider.UpdateDeploymentStatus (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:48:16)
       at D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\azurermwebappdeployment.js:38:42
       at Generator.throw (&lt;anonymous&gt;)
       at rejected (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\azurermwebappdeployment.js:6:65)
       at process._tickCallback (internal/process/next_tick.js:68:7)
   (node:2432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
   (node:2432) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  </code></pre>
  <p>The following is the YAML for this task:</p>
  <pre><code>- task: AzureRmWebAppDeployment@4
    displayName: 'Deploy'
    inputs:
      azureSubscription: ${{ parameters.ConnectedServiceName }}
      WebAppName: 'blah'
      packageForLinux: '$(Pipeline.Workspace)/Blah'
      enableCustomDeployment: true
      TakeAppOfflineFlag: false
      SetParametersFile: '$(Pipeline.Workspace)/Blah/TokenParameters.xml'
      RemoveAdditionalFilesFlag: true
      enableXmlTransform: false
      enableXmlVariableSubstitution: false
      AdditionalArguments: '-skip:objectName=dirPath,absolutePath=Angular'
  </code></pre>