简体   繁体   English

Azure 应用服务部署管道任务错误:资源不存在/UnhandledPromiseRejectionWarning 当资源存在时

[英]Azure App Service Deploy pipeline task error: Resource doesn't exist/UnhandledPromiseRejectionWarning when resource exists

Getting the following error while running an Azure DevOps pipeline that uses the Azure App Service Deploy task when the resource clearly exists.当资源明显存在时,在运行使用 Azure App Service Deploy 任务的 Azure DevOps 管道时出现以下错误。 This is happening in an existing pipeline that historically works.这发生在历史上有效的现有管道中。

 ##[error]Error: Resource 'blah' doesn't exist. Resource should exist before deployment.
 (node:2432) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getApplicationURL' of undefined
     at WindowsWebAppWebDeployProvider.<anonymous> (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:54:73)
     at Generator.next (<anonymous>)
     at D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:8:71
     at new Promise (<anonymous>)
     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 (<anonymous>)
     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.

The following is the YAML for this task:以下是此任务的 YAML:

- 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'

The last couple of days I have the same problem.最近几天我遇到了同样的问题。 No changes in deployments/configs anywhere.任何地方的部署/配置都没有变化。 Deployment works unstable, it means that after 'rerun failed job' it can deploy successfully, but after rerun, it can again fail.部署工作不稳定,这意味着在“重新运行失败的作业”之后它可以部署成功,但重新运行后,它可能再次失败。 Meantime, AppService is presented on the Portal GUI and can be checked through CLI, and I am able to use it (browse use external URI), so it's available.同时,AppService 呈现在 Portal GUI 上,可以通过 CLI 进行检查,并且我能够使用它(浏览使用外部 URI),所以它是可用的。

Error:错误:

Got service connection details for Azure App Service:'<application-name>'
##[error]Error: Resource '<application-name>' doesn't exist. Resource should exist before deployment.
(node:5328) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getApplicationURL' of undefined
 at WindowsWebAppWebDeployProvider.<anonymous> (D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:54:73)
 at Generator.next (<anonymous>)
 at D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.195.4\deploymentProvider\AzureRmWebAppDeploymentProvider.js:8:71
 at new Promise (<anonymous>)
 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 (<anonymous>)
 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:5328) 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:5328) [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.
##[section]Finishing: Deploy files to AppService

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 管道部署到应用服务失败:“资源不存在。资源在部署之前应该存在”。 但应用服务正在运行 - Azure Pipeline Deployment to App Service fails: "Resource doesn't exist. Resource should exist before deployment". But App Service is running Azure 应用服务部署失败:'<app-service-name> '不存在。 资源在部署之前应该存在</app-service-name> - Azure App Service Deploy fails: '<app-service-name>' doesn't exist. Resource should exist before deployment Azure 应用部署错误:资源不存在 - Azure app deployment error: Resource doesn't exist 将 Azure 容器应用程序部署到 Azure 管道中的不同资源组 - Deploy Azure Container App to different Resource Group in Azure pipeline 从 Azure 管道任务访问 Microsoft.Azure.WebSites 资源提供程序(Microsoft Azure 应用服务)的服务主体 - Access service principal for Microsoft.Azure.WebSites Resource Provider (Microsoft Azure App Service) from Azure pipeline task 使用 Github CICD 运行 Azure DevOps 管道时,带有 ID 的 Terraform 资源已存在错误 - Terraform resource with the ID already exists error when running Azure DevOps pipeline with Github CICD 如何解决错误代码:&#39;404&#39;,消息:&#39;使用 azure 逻辑应用程序向 excel 文件添加行时,请求的资源不存在? - How to solve Error code: '404', Message: 'The requested resource doesn't exist when adding a row to an excel file using azure logic apps? 当服务计划位于其他资源组中时如何部署Azure Functions应用 - How to deploy an Azure Functions App when the Service plan is in a different Resource Group Azure 存储静态网站错误 - 找不到资源或内容不存在 - Azure Storage Static website error - Resource not found or content doesn't exist 创建新的Azure资源组或应用程序服务计划/位置时出错 - Error creating a new Azure Resource Group or App service Plan/ Location
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM