HodorNV / ALOps

ALOps
58 stars 24 forks source link

Error on Publish in Sandbox (SaaS) #329

Closed Arthurvdv closed 3 years ago

Arthurvdv commented 3 years ago

Describe the bug Multiple times the first publish of a new version of the App throws an error. Manual verification shows that the App is installed, but the state in DevOps is shown as an error.

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

2021-02-26T08:32:19.4760584Z ##[section]Starting: Publish
2021-02-26T08:32:19.4885618Z ==============================================================================
2021-02-26T08:32:19.4886001Z Task         : ALOps Extension API
2021-02-26T08:32:19.4886300Z Description  : Get/Publish extensions with the Business Central API
2021-02-26T08:32:19.4886624Z Version      : 1.440.2175
2021-02-26T08:32:19.4886830Z Author       : Hodor
2021-02-26T08:32:19.4887935Z Help         : Get/Publish extensions with the Business Central API.
2021-02-26T08:32:19.4888342Z ==============================================================================
2021-02-26T08:32:20.6911287Z *** Validate configuration
2021-02-26T08:32:21.0069173Z *** Task Inputs:
2021-02-26T08:32:21.0104524Z 
2021-02-26T08:32:21.0177803Z name                                                                                                             value
2021-02-26T08:32:21.0178993Z ----                                                                                                             -----
2021-02-26T08:32:21.0180564Z usedocker                                                                                                        False
2021-02-26T08:32:21.0181604Z fixed_tag                                                                                                             
2021-02-26T08:32:21.0182558Z interaction                                                                                                    publish
2021-02-26T08:32:21.0184349Z api_endpoint            https://api.businesscentral.dynamics.com/v2.0/***/Sandbox/api
2021-02-26T08:32:21.0185350Z authentication                                                                                                   oauth
2021-02-26T08:32:21.0186386Z azure_tenant_id                                                                   ***
2021-02-26T08:32:21.0187270Z azure_app_client_id                                                               ***
2021-02-26T08:32:21.0188392Z azure_app_client_secret                                                             ***
2021-02-26T08:32:21.0189367Z username                                                                                                              
2021-02-26T08:32:21.0190014Z password                                                                                                              
2021-02-26T08:32:21.0190594Z bccompany                                                                                                             
2021-02-26T08:32:21.0191574Z artifact_path                                                                    D:\azure-vsts-agent-deploy\_work\r2\a
2021-02-26T08:32:21.0192171Z artifact_filter                                                                                                  *.app
2021-02-26T08:32:21.0192753Z showdeploymentstatus                                                                                              True
2021-02-26T08:32:21.0193020Z 
2021-02-26T08:32:21.0207620Z 
2021-02-26T08:32:21.0214317Z 
2021-02-26T08:32:21.0346650Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-02-26T08:32:21.6475523Z 
2021-02-26T08:32:21.6475954Z *** ALOps License:
2021-02-26T08:32:21.6476281Z   * Licensed To: Van Roey (Collection License)
2021-02-26T08:32:21.6476490Z 
2021-02-26T08:32:22.2621742Z *** Imported required PS-Functions
2021-02-26T08:32:22.2631832Z *** Parse Task Parameters
2021-02-26T08:32:22.2810579Z *** Creating API Connector with endpoint [https://api.businesscentral.dynamics.com/v2.0/***/Sandbox/api]
2021-02-26T08:32:22.2934683Z *** Interaction Mode: publish
2021-02-26T08:32:22.2957473Z *** API Authentication: Using Azure OAuth Authentication []
2021-02-26T08:32:22.2974060Z *** Get OAuth token for tenant [***]
2021-02-26T08:32:22.3019137Z *** Communication: Service-2-Service
2021-02-26T08:32:22.3046392Z ##[command]Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/***/oauth2/token"
2021-02-26T08:32:22.5322886Z *** List Companies
2021-02-26T08:32:22.5333318Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies'
2021-02-26T08:32:31.7022334Z 
2021-02-26T08:32:31.7046519Z 
2021-02-26T08:32:31.7068066Z id                : 033ccb55-54f7-4795-af7a-a57c67953b04
2021-02-26T08:32:31.7094257Z systemVersion     : 17.4.21491.21531
2021-02-26T08:32:31.7103703Z name              : <redacted>
2021-02-26T08:32:31.7106325Z displayName       : <redacted>
2021-02-26T08:32:31.7109031Z businessProfileId : 
2021-02-26T08:32:31.7110512Z systemCreatedAt   : 0001-01-01T00:00:00Z
2021-02-26T08:32:31.7114645Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2021-02-26T08:32:31.7116123Z systemModifiedAt  : 0001-01-01T00:00:00Z
2021-02-26T08:32:31.7118512Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
...
2021-02-26T08:32:31.7342996Z 
2021-02-26T08:32:31.7344918Z id                : 3b1ae6c7-6f38-ea11-a815-000d3aab26f0
2021-02-26T08:32:31.7345359Z systemVersion     : 17.4.21491.21531
2021-02-26T08:32:31.7345825Z name              : <redacted>
2021-02-26T08:32:31.7346262Z displayName       : <redacted>
2021-02-26T08:32:31.7346623Z businessProfileId : 
2021-02-26T08:32:31.7347019Z systemCreatedAt   : 0001-01-01T00:00:00Z
2021-02-26T08:32:31.7347479Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2021-02-26T08:32:31.7347971Z systemModifiedAt  : 0001-01-01T00:00:00Z
2021-02-26T08:32:31.7348419Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
2021-02-26T08:32:31.7348619Z 
2021-02-26T08:32:31.7348795Z 
2021-02-26T08:32:31.7350762Z 
2021-02-26T08:32:31.7383295Z *** Selected Company: <redacted> [033ccb55-54f7-4795-af7a-a57c67953b04]
2021-02-26T08:32:31.7462875Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensions'
2021-02-26T08:32:32.5480829Z *** Installed Extensions:
2021-02-26T08:32:32.5482463Z 
2021-02-26T08:32:32.5483129Z publisher         displayName                                              version id                                  
2021-02-26T08:32:32.5483892Z ---------         -----------                                              ------- --                                  
2021-02-26T08:32:32.5484661Z Continia Software Continia Core                                            3.0     4b915d7e-c02a-435f-85ab-649086c1e002
2021-02-26T08:32:32.5485394Z Continia Software Continia Document Capture 365                            6.5     6da8dd2f-e698-461f-9147-8e404244dd85
2021-02-26T08:32:32.5486166Z Microsoft         AMC Banking 365 Fundamentals                             17.4    16319982-4995-4fb1-8fb2-2b1e13773e3b
2021-02-26T08:32:32.5487727Z Microsoft         Application                                              17.4    c1335042-3002-4257-bf8a-75c898ccb1b8
2021-02-26T08:32:32.5488464Z Microsoft         Base Application                                         17.4    437dbf0e-84ff-417a-965d-ed2bb9650972
2021-02-26T08:32:32.5489196Z Microsoft         Business Central Cloud Migration - Previous Release      17.0    6992416f-3f39-4d3c-8242-3fff61350bea
2021-02-26T08:32:32.5489931Z Microsoft         Business Central Cloud Migration - Previous Release (BE) 17.0    620725d3-2ed5-424a-bd9b-7d4b44bfcc9b
2021-02-26T08:32:32.5490670Z Microsoft         Business Central Intelligent Cloud                       17.0    334ef79e-547e-4631-8ba1-7a7f18e14de6
2021-02-26T08:32:32.5491396Z Microsoft         Company Hub                                              17.4    c512d720-63b9-4b26-b062-a0c09b4ed322
2021-02-26T08:32:32.5492139Z Microsoft         Email - Current User Connector                           17.4    08d69832-9231-429e-be2c-8bab2c96905b
2021-02-26T08:32:32.5492872Z Microsoft         Email - Microsoft 365 Connector                          17.4    aceb66c8-472e-437c-81d3-27e6c07d0f14
2021-02-26T08:32:32.5493598Z Microsoft         Email - Outlook REST API                                 17.4    e6328152-bb29-4664-9dae-3bc7eaae1fd8
2021-02-26T08:32:32.5494323Z Microsoft         Email - SMTP Connector                                   17.4    68e13fa3-217a-4be0-9141-99e5bf0ca818
2021-02-26T08:32:32.5495049Z Microsoft         Essential Business Headlines                             17.4    2a89f298-7ffd-44a5-a7ce-e08dac98abce
2021-02-26T08:32:32.5496112Z Microsoft         Intelligent Cloud Base                                   17.0    58623bfa-0559-4bc2-ae1c-0979c29fd9e0
2021-02-26T08:32:32.5496852Z Microsoft         Late Payment Prediction                                  17.4    3d5b2137-efeb-4014-8489-41d37f8fd4c3
2021-02-26T08:32:32.5497581Z Microsoft         PayPal Payments Standard                                 17.4    d09fa965-9a2a-424d-b704-69f3b54ed0ce
2021-02-26T08:32:32.5498334Z Microsoft         Sales and Inventory Forecast                             17.4    c526b3e9-b8ca-4683-81ba-fcd5f6b1472a
2021-02-26T08:32:32.5499068Z Microsoft         Send To Email Printer                                    17.4    8c972578-fe72-4aa5-ae51-cc5575fef2ea
2021-02-26T08:32:32.5499793Z Microsoft         System Application                                       17.4    63ca2fa4-4f03-4f2b-a480-172fef340d3f
2021-02-26T08:32:32.5500517Z Microsoft         VAT Group Management                                     17.4    c50a4bf0-db51-4ad2-88d5-fe2287da0eb8
2021-02-26T08:32:32.5501250Z Microsoft         WorldPay Payments Standard                               17.4    bae453ed-0fd8-4416-afdc-4b09db6c12c3
2021-02-26T08:32:32.5501981Z VanRoey.be        Common Data                                              0.7     3be7f261-c577-4c67-aee1-992804843ade
2021-02-26T08:32:32.5502710Z VanRoey.be        Common Library                                           0.7     a1f8d28c-c3df-46db-b018-58cb5fa1ff10
2021-02-26T08:32:32.5503442Z VanRoey.be        EDS Archive                                              0.7     45c0312f-eea8-4d76-b44d-3c13d885401c
2021-02-26T08:32:32.5504184Z VanRoey.be        <redacted>                                               2.4     f692235a-34a4-4654-8e32-439fba6e77c8
2021-02-26T08:32:32.5504597Z 
2021-02-26T08:32:32.5504859Z 
2021-02-26T08:32:32.5505123Z 
2021-02-26T08:32:32.5505585Z *** Published Extensions (not installed):
2021-02-26T08:32:32.5505935Z 
2021-02-26T08:32:32.5506462Z publisher  displayName             version id                                  
2021-02-26T08:32:32.5507082Z ---------  -----------             ------- --                                  
2021-02-26T08:32:32.5507698Z VanRoey.be <redacted>              2.4     f692235a-34a4-4654-8e32-439fba6e77c8
2021-02-26T08:32:32.5508328Z VanRoey.be <redacted>              2.4     f692235a-34a4-4654-8e32-439fba6e77c8
2021-02-26T08:32:32.5508784Z 
2021-02-26T08:32:32.5509021Z 
2021-02-26T08:32:32.5509284Z 
2021-02-26T08:32:32.5509717Z *** Import NAV/BC Management DLL's
2021-02-26T08:32:32.5510241Z *** ServiceTier not specified, loading default assemblies.
2021-02-26T08:32:32.5510769Z *** Default Assemblies not found. Load via BC-Artifacts
2021-02-26T08:32:32.5521995Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2021-02-26T08:32:32.5549224Z *** Check BcContainerHelper
2021-02-26T08:32:32.5986986Z *** Load BcContainerHelper
2021-02-26T08:32:32.7786292Z BcContainerHelper version 2.0.5
2021-02-26T08:32:33.3697809Z 
2021-02-26T08:32:33.3698774Z ModuleType Version    Name                                ExportedCommands                                             
2021-02-26T08:32:33.3699871Z ---------- -------    ----                                ----------------                                             
2021-02-26T08:32:33.3700622Z Script     2.0.5      BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...
2021-02-26T08:32:33.3700937Z 
2021-02-26T08:32:33.3701033Z 
2021-02-26T08:32:33.3701124Z 
2021-02-26T08:32:33.3702027Z 
2021-02-26T08:32:33.3724975Z ##[command]"Get-BCArtifactUrl" 
2021-02-26T08:32:33.3725660Z Name                           Value                                                                                   
2021-02-26T08:32:33.3726242Z ----                           -----                                                                                   
2021-02-26T08:32:33.3727171Z select                         Latest                                                                                  
2021-02-26T08:32:33.3727739Z type                           OnPrem                                                                                  
2021-02-26T08:32:33.3728308Z country                        W1                                                                                      
2021-02-26T08:32:33.3728579Z 
2021-02-26T08:32:33.3728673Z 
2021-02-26T08:32:33.3729074Z  -select: Latest -type: OnPrem -country: W1
2021-02-26T08:32:35.6238424Z *** Platform: C:\bcartifacts.cache\onprem\17.4.21491.21531\platform
2021-02-26T08:32:35.6263538Z *** Localisation: C:\bcartifacts.cache\onprem\17.4.21491.21531\w1
2021-02-26T08:32:35.6422163Z *** BC Management DLL: C:\bcartifacts.cache\onprem\17.4.21491.21531\platform\LegacyDlls\program files\Microsoft Dynamics NAV\170\RoleTailored Client\Microsoft.Dynamics.Nav.Management.dll
2021-02-26T08:32:35.6667840Z *** BC App Management DLL: C:\bcartifacts.cache\onprem\17.4.21491.21531\platform\LegacyDlls\program files\Microsoft Dynamics NAV\170\RoleTailored Client\Microsoft.Dynamics.Nav.Apps.Management.dll
2021-02-26T08:32:35.6776287Z *** Publish Extension
2021-02-26T08:32:35.6782043Z   * Artifact Path  : D:\azure-vsts-agent-deploy\_work\r2\a
2021-02-26T08:32:35.6788011Z   * Artifact Filter: *.app
2021-02-26T08:32:35.6882449Z *** Resolve App file in [D:\azure-vsts-agent-deploy\_work\r2\a]
2021-02-26T08:32:35.6950660Z *** Resolved App File: [D:\azure-vsts-agent-deploy\_work\r2\a\App\<redacted>\VanRoey.be_<redacted>_2.4.202109.6504_sandbox_17.4_be.app].
2021-02-26T08:32:35.6965974Z *** Resolved App Path: [D:\azure-vsts-agent-deploy\_work\r2\a\App\<redacted>\VanRoey.be_<redacted>_2.4.202109.6504_sandbox_17.4_be.app]
2021-02-26T08:32:35.7013981Z *** Upload extension [D:\azure-vsts-agent-deploy\_work\r2\a\App\<redacted>\VanRoey.be_<redacted>_2.4.202109.6504_sandbox_17.4_be.app]
2021-02-26T08:32:35.7021754Z *** Get App Info
2021-02-26T08:32:35.7676524Z  * App.ID        = f692235a-34a4-4654-8e32-439fba6e77c8
2021-02-26T08:32:35.7699650Z  * App.Name      = <redacted>
2021-02-26T08:32:35.7716866Z  * App.Publisher = VanRoey.be
2021-02-26T08:32:35.7734477Z  * App.Version   = 2.4.202109.6504
2021-02-26T08:32:35.7740088Z *** Get Extension status
2021-02-26T08:32:35.7749031Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensions'
2021-02-26T08:32:36.0499431Z *** Get Extension Deployment status
2021-02-26T08:32:36.0508546Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:32:36.4850530Z ##[command]Invoke-RestMethod -Method Patch -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionUpload(0)/content'
2021-02-26T08:32:39.1373808Z 
2021-02-26T08:32:39.1374526Z *** Poll Deployment status
2021-02-26T08:32:39.1375646Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:32:44.5989582Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:32:50.0322295Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:32:55.6304557Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:01.0913506Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:06.5906577Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:12.0597362Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:17.6042349Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:23.0987121Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:28.5596310Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:33.9746934Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:34.0537072Z ##[error]Exception in BCConnector.GetAPIData: {"error":{"code":"Application_ServiceUnavailable","message":"The session could not be retrieved from the server. The application will close.  CorrelationId:  3c252cfb-8fbd-4cf5-b771-974866647b92."}}
2021-02-26T08:33:34.0544756Z *** Deployment Status:
2021-02-26T08:33:34.0545653Z ##[error]App publish failed. Check the 'Extension Deployment Status' page in the Business Central client.
2021-02-26T08:33:34.0558833Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-02-26T08:33:34.0844525Z ##[error]Exception in BCConnector.GetAPIData: {"error":{"code":"Application_ServiceUnavailable","message":"The session could not be retrieved from the server. The application will close.  CorrelationId:  4115aa33-1387-4fe1-b915-7a67874a7143."}}
2021-02-26T08:33:34.0961972Z *** Cleanup VSTS Environment: True
2021-02-26T08:33:36.3853702Z ##[section]Finishing: Publish

Screenshots image

Additional context Redacted the name of the extenion because of the name of the customer was in it.

DanielGoehler commented 3 years ago

We have the same issue. Automatic fails, manual deployment works.

##[section]Starting: ALOps Extension API - Publish to Sandbox
==============================================================================
Task         : ALOps Extension API
Description  : Get/Publish extensions with the Business Central API
Version      : 1.440.2175
Author       : Hodor
Help         : Get/Publish extensions with the Business Central API.
==============================================================================
*** Validate configuration
*** Task Inputs:

name                                                                                                              value
----                                                                                                              -----
usedocker                                                                                                         False
fixed_tag                                                                                                              
interaction                                                                                                     publish
api_endpoint                ...//api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api
authentication                                                                                                    oauth
azure_tenant_id                                                                    00000000-0000-0000-0000-000000000000
azure_app_client_id                                                                00000000-0000-0000-0000-000000000000
azure_app_client_secret                                                                                          Secret
username                                                                                                user@domain.com
password                                                                                                       Password
bccompany                                                                          00000000-0000-0000-0000-000000000000
artifact_path                                                                                      C:\agent2\_work\r5\a
artifact_filter                                                                                    *Customizations*.app
showdeploymentstatus                                                                                               True

*** For documentation, please visit   : https://www.alops.be/documentation

*** Imported required PS-Functions
*** Parse Task Parameters
*** Creating API Connector with endpoint [https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api]
*** Interaction Mode: publish
*** API Authentication: Using Azure OAuth Authentication [user@domain.com]
*** Get OAuth token for tenant [00000000-0000-0000-0000-000000000000]
*** Communication: Impersonating User
##[command]Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/token"
*** List Companies
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies'

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : CRONUS
displayName       : CRONUS
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 1
displayName       : Company 1
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 2
displayName       : Company 2
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 3
displayName       : Company 3
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 4
displayName       : Company 4
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 5
displayName       : Company 5
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 6
displayName       : Company 6
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 7
displayName       : Company 7
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 8
displayName       : Company 8
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 9
displayName       : Company 9
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 10
displayName       : Company 10
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 11
displayName       : Company 11
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 12
displayName       : Company 12
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 13
displayName       : Company 13
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 14
displayName       : Company 14
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 15
displayName       : Company 15
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 16
displayName       : Company 16
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 17
displayName       : Company 17
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 18
displayName       : Company 18
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 19
displayName       : Company 19
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 20
displayName       : Company 20
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 21
displayName       : Company 21
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 22
displayName       : Company 22
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 23
displayName       : Company 23
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 24
displayName       : Company 24
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 25
displayName       : Company 25
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 26
displayName       : Company 26
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 27
displayName       : Company 27
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 28
displayName       : Company 28
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

id                : 00000000-0000-0000-0000-000000000000
systemVersion     : 17.3.20469.20653
name              : Company 29
displayName       : Company 29
businessProfileId : 
systemCreatedAt   : 0001-01-01T00:00:00Z
systemCreatedBy   : 00000000-0000-0000-0000-000000000000
systemModifiedAt  : 0001-01-01T00:00:00Z
systemModifiedBy  : 00000000-0000-0000-0000-000000000000

*** Determine Company with filter [00000000-0000-0000-0000-000000000000]
*** Selected Company: CRONUS [00000000-0000-0000-0000-000000000000]
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensions'
*** Installed Extensions:

publisher              displayName                                              version id                             
---------              -----------                                              ------- --                             
Microsoft              AMC Banking 365 Fundamentals                             17.3    16319982-4995-4fb1-8fb2-2b1e...
Microsoft              Application                                              17.3    c1335042-3002-4257-bf8a-75c8...
Microsoft              Base Application                                         17.3    437dbf0e-84ff-417a-965d-ed2b...
Microsoft              Business Central Cloud Migration - Previous Release      17.0    6992416f-3f39-4d3c-8242-3fff...
Microsoft              Business Central Cloud Migration - Previous Release (DE) 17.0    f0bbefd6-e6dc-4da6-b39a-1782...
Microsoft              Business Central Intelligent Cloud                       17.0    334ef79e-547e-4631-8ba1-7a7f...
Microsoft              Company Hub                                              17.3    c512d720-63b9-4b26-b062-a0c0...
Microsoft              ELSTER VAT Localization for Germany                      17.3    b0c41a2d-9ebe-4773-a22f-86bd...
Microsoft              Email - Current User Connector                           17.3    08d69832-9231-429e-be2c-8bab...
Microsoft              Email - Microsoft 365 Connector                          17.3    aceb66c8-472e-437c-81d3-27e6...
Microsoft              Email - Outlook REST API                                 17.3    e6328152-bb29-4664-9dae-3bc7...
Microsoft              Email - SMTP Connector                                   17.3    68e13fa3-217a-4be0-9141-99e5...
Microsoft              Essential Business Headlines                             17.3    2a89f298-7ffd-44a5-a7ce-e08d...
Microsoft              Intelligent Cloud Base                                   17.0    58623bfa-0559-4bc2-ae1c-0979...
Microsoft              Late Payment Prediction                                  17.3    3d5b2137-efeb-4014-8489-41d3...
Microsoft              PayPal Payments Standard                                 17.3    d09fa965-9a2a-424d-b704-69f3...
Microsoft              Sales and Inventory Forecast                             17.3    c526b3e9-b8ca-4683-81ba-fcd5...
Microsoft              Send To Email Printer                                    17.3    8c972578-fe72-4aa5-ae51-cc55...
Microsoft              System Application                                       17.3    63ca2fa4-4f03-4f2b-a480-172f...
Microsoft              WorldPay Payments Standard                               17.3    bae453ed-0fd8-4416-afdc-4b09...
Some Company           Customer Customizations                                  1.16    90578ea3-a769-4440-898a-29a9...
Some Company           Customer Report                                          1.0     bceaf414-d421-4872-bef6-1a3c...
Some Company           Customer PowerBI                                         1.0     66cc36c6-5ba4-4956-b329-069b...
Some Company           DMS Connector                                            1.0     30390585-0c88-4da4-ba3c-4c42...

*** Import NAV/BC Management DLL's
*** ServiceTier not specified, loading default assemblies.
*** Default Assemblies not found. Load via BC-Artifacts
*** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
*** Check BcContainerHelper
*** Load BcContainerHelper
BcContainerHelper version 2.0.5

ModuleType Version    Name                                ExportedCommands                                             
---------- -------    ----                                ----------------                                             
Script     2.0.5      BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...

##[command]"Get-BCArtifactUrl" 
Name                           Value                                                                                   
----                           -----                                                                                   
select                         Latest                                                                                  
type                           OnPrem                                                                                  
country                        W1                                                                                      

 -select: Latest -type: OnPrem -country: W1
*** Platform: C:\bcartifacts.cache\onprem\17.4.21491.21531\platform
*** Localisation: C:\bcartifacts.cache\onprem\17.4.21491.21531\w1
*** BC Management DLL: C:\bcartifacts.cache\onprem\17.4.21491.21531\platform\LegacyDlls\program files\Microsoft Dynamics NAV\170\RoleTailored Client\Microsoft.Dynamics.Nav.Management.dll
*** BC App Management DLL: C:\bcartifacts.cache\onprem\17.4.21491.21531\platform\LegacyDlls\program files\Microsoft Dynamics NAV\170\RoleTailored Client\Microsoft.Dynamics.Nav.Apps.Management.dll
*** Publish Extension
  * Artifact Path  : C:\agent2\_work\r5\a
  * Artifact Filter: *Customizations*.app
*** Resolve App file in [C:\agent2\_work\r5\a]
*** Resolved App File: [C:\agent2\_work\r5\a\_Customizations CI\DSO\Some Company_Customer Customizations_1.17.4911.0.app].
*** Resolved App Path: [C:\agent2\_work\r5\a\_Customizations CI\DSO\Some Company_Customer Customizations_1.17.4911.0.app]
*** Upload extension [C:\agent2\_work\r5\a\_Customizations CI\DSO\Some Company_Customer Customizations_1.17.4911.0.app]
*** Get App Info
 * App.ID        = 90578ea3-a769-4440-898a-29a902c95bce
 * App.Name      = Customer Customizations
 * App.Publisher = Some Company            
 * App.Version   = 1.17.4911.0
*** Get Extension status
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensions'
*** Get Extension Deployment status
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Patch -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionUpload(0)/content'

*** Poll Deployment status
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[error]Exception in BCConnector.GetAPIData: {"error":{"code":"Application_ServiceUnavailable","message":"The session could not be retrieved from the server. The application will close.  CorrelationId:  0e9494f9-e5bc-4130-b111-8a0592bedbc8."}}
*** Deployment Status:
##[error]App publish failed. Check the 'Extension Deployment Status' page in the Business Central client.
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/00000000-0000-0000-0000-000000000000/Sandbox/api/microsoft/automation/v1.0/companies(00000000-0000-0000-0000-000000000000)/extensionDeploymentStatus'
##[error]Exception in BCConnector.GetAPIData: {"error":{"code":"Application_ServiceUnavailable","message":"The session could not be retrieved from the server. The application will close.  CorrelationId:  005e241e-3ba1-4272-9916-15f71c8e972e."}}
*** Cleanup VSTS Environment: True
##[section]Finishing: ALOps Extension API - Publish to Sandbox
waldo1001 commented 3 years ago

We'll look into this. It seems to be a change on SaaS side, as we didn't touch this for quite a while now.. :-/.

Can you please set "showdeploymentstatus" to false, as it seems to be a problem with that part.. .

 - task: ALOpsExtensionAPI@1
      displayName: 'ALOps Extension API'
      inputs:
...
        showdeploymentstatus: false
waldo1001 commented 3 years ago

We'll deal with "service unavailable" on the deployment status differently. As the app was uploaded, but the service to call for the status is unavailable.. .

It will become a warning..

DanielGoehler commented 3 years ago

Hi @waldo1001, just to make sure, it not "429 - Too Many Requests", right? Will the previous extensions be removed if this fails?

waldo1001 commented 3 years ago

I don't get your question?

DanielGoehler commented 3 years ago

Which one?

  1. API Limit reached? https://docs.microsoft.com/en-us/dynamics-nav/api-reference/v1.0/dynamics-current-limits

  2. ALOps Extension API removes the previous extensions after installing the new one, right? Will this also happen if the job fails? How does the job know?

waldo1001 commented 3 years ago
  1. Don't think so - the error says "service not available". We poll every 5 seconds, so definitely not even close to the API limit.

  2. Well, it's saas. This is not something we have under control. If MS removes the previous app, it remove the previous app. There is no API to remove previous apps, so we wouldn't be able to do so.. With External deployer, we do have control, but that's OnPRem. in SaaS, it's Microsoft that calls those shots..

DanielGoehler commented 3 years ago

Ok, thanks.

AdminHodor commented 3 years ago

Dear @DanielGoehler, @Arthurvdv, @TheDoubleH,

Please check out our latest release v1.441 which included this feature.

Kind regards,

Arthurvdv commented 3 years ago

I didn’t catch any timeouts in the last days, but I’ll continue the monitor the releases and report back when I have more information.

DanielGoehler commented 3 years ago

Also didn't encounter any problems in the last days. Thank you!

DanielGoehler commented 3 years ago

Hi @AdminHodor, Just now I received the message "The session could not be retrieved from the server. The application will be closed." error message. The deployment was successful, but the Azure DevOps state of ALOps Extension API failed. In this particular case, a warning instead of an error would have been nice. For me, it would have been an error if the deployment status was not Completed.

##[section]Starting: ALOps Extension API
==============================================================================
Task         : ALOps Extension API
Description  : Get/Publish extensions with the Business Central API
Version      : 1.441.2429
Author       : Hodor
Help         : Get/Publish extensions with the Business Central API.
==============================================================================
*** Validate configuration
*** Task Inputs:

name                                                                                                              value
----                                                                                                              -----
usedocker                                                                                                         False
fixed_tag                                                                                                              
interaction                                                                                                       batch
api_endpoint            ...://api.businesscentral.dynamics.com/v2.0/***/Production/api
apiversion                                                                                                         v1.0
authentication                                                                                                    oauth
azure_tenant_id                                                                    ***
azure_app_client_id                                                                ***
azure_app_client_secret                                                              ***
username                                                                                                               
password                                                                                                               
bccompany                                                                                                              
artifact_path                                                                                     C:\agent1\_work\r19\a
artifact_filter                                                                                                   *.app
showdeploymentstatus                                                                                               True

*** For documentation, please visit   : https://www.alops.be/documentation

*** Imported required PS-Functions
*** Parse Task Parameters
*** Creating API Connector with endpoint [https://api.businesscentral.dynamics.com/v2.0/***/Production/api]
*** API Version: v1.0
*** Interaction Mode: batch
*** API Authentication: Using Azure OAuth Authentication []
*** Get OAuth token for tenant [***]
*** Communication: Service-2-Service
##[command]Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/***/oauth2/token"
*** List Companies
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies'

id                : ***
systemVersion     : 17.5.22499.22680
name              : Customer
displayName       : Customer
businessProfileId : 
systemCreatedAt   : 2021-01-11T15:23:27.687Z
systemCreatedBy   : 1a9b5e09-0157-4a56-b89f-f558f6a6b3c5
systemModifiedAt  : 2021-01-11T15:23:27.687Z
systemModifiedBy  : 1a9b5e09-0157-4a56-b89f-f558f6a6b3c5

*** Selected Company: Customer [***]
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensions'
*** Installed Extensions:

publisher              displayName                                              version id                             
---------              -----------                                              ------- --                             
Microsoft              AMC Banking 365 Fundamentals                             17.5    16319982-4995-4fb1-8fb2-2b1e...
Microsoft              Application                                              17.5    c1335042-3002-4257-bf8a-75c8...
Microsoft              Base Application                                         17.5    437dbf0e-84ff-417a-965d-ed2b...
Microsoft              Business Central Cloud Migration - Previous Release      17.0    6992416f-3f39-4d3c-8242-3fff...
Microsoft              Business Central Cloud Migration - Previous Release (DE) 17.0    f0bbefd6-e6dc-4da6-b39a-1782...
Microsoft              Business Central Intelligent Cloud                       17.0    334ef79e-547e-4631-8ba1-7a7f...
Microsoft              Company Hub                                              17.5    c512d720-63b9-4b26-b062-a0c0...
Microsoft              ELSTER VAT Localization for Germany                      17.5    b0c41a2d-9ebe-4773-a22f-86bd...
Microsoft              Email - Current User Connector                           17.5    08d69832-9231-429e-be2c-8bab...
Microsoft              Email - Microsoft 365 Connector                          17.5    aceb66c8-472e-437c-81d3-27e6...
Microsoft              Email - Outlook REST API                                 17.5    e6328152-bb29-4664-9dae-3bc7...
Microsoft              Email - SMTP Connector                                   17.5    68e13fa3-217a-4be0-9141-99e5...
Microsoft              Essential Business Headlines                             17.5    2a89f298-7ffd-44a5-a7ce-e08d...
Microsoft              Intelligent Cloud Base                                   17.0    58623bfa-0559-4bc2-ae1c-0979...
Microsoft              Late Payment Prediction                                  17.5    3d5b2137-efeb-4014-8489-41d3...
Microsoft              PayPal Payments Standard                                 17.5    d09fa965-9a2a-424d-b704-69f3...
Microsoft              Sales and Inventory Forecast                             17.5    c526b3e9-b8ca-4683-81ba-fcd5...
Microsoft              Send To Email Printer                                    17.5    8c972578-fe72-4aa5-ae51-cc55...
Microsoft              System Application                                       17.5    63ca2fa4-4f03-4f2b-a480-172f...
Microsoft              WorldPay Payments Standard                               17.5    bae453ed-0fd8-4416-afdc-4b09...
My Company             CustomApp                                                17.1    8223b762-6c78-4c8b-b8b6-da04...

*** Published Extensions (not installed):

publisher              displayName version id                                  
---------              ----------- ------- --                                  
My Company             CustomApp   17.1    8223b762-6c78-4c8b-b8b6-da04d300966c

*** Import NAV/BC Management DLL's
*** ServiceTier not specified, loading default assemblies.
*** Default Assemblies not found. Load via BC-Artifacts
*** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
*** Check BcContainerHelper
*** Load BcContainerHelper
BcContainerHelper version 2.0.10

ModuleType Version    Name                                ExportedCommands                                             
---------- -------    ----                                ----------------                                             
Script     2.0.10     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...

##[command]"Get-BCArtifactUrl" 
Name                           Value                                                                                   
----                           -----                                                                                   
select                         Latest                                                                                  
type                           OnPrem                                                                                  
country                        W1                                                                                      

 -select: Latest -type: OnPrem -country: W1
*** Platform: C:\bcartifacts.cache\onprem\18.0.23013.23795\platform
*** Localisation: C:\bcartifacts.cache\onprem\18.0.23013.23795\w1
*** BC Management DLL: C:\bcartifacts.cache\onprem\18.0.23013.23795\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client\Microsoft.Dynamics.Nav.Management.dll
*** BC App Management DLL: C:\bcartifacts.cache\onprem\18.0.23013.23795\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client\Microsoft.Dynamics.Nav.Apps.Management.dll
*** Batch Publish Extensions
  * Artifact Path  : C:\agent1\_work\r19\a
*** Resolved Path  : C:\agent1\_work\r19\a
*** Get Available Applications from [C:\agent1\_work\r19\a].
*** Get [*.app] files recursive from [C:\agent1\_work\r19\a]
*** Found [4] files.
*** Extract App detail from [C:\agent1\_work\r19\a\BaseApp\MBM\My Company_CustomApp_17.1.0.5554.app]
*** Installing Applications:

Publisher              Name                      Path                                                                  
---------              ----                      ----                                                                  
My Company             CustomApp                 C:\agent1\_work\r19\a\BaseApp\MBM\My Company_CustomApp...

*** Publish App [C:\agent1\_work\r19\a\BaseApp\MBM\My Company_CustomApp_17.1.0.5554.app]
*** Upload extension [C:\agent1\_work\r19\a\BaseApp\MBM\My Company_CustomApp_17.1.0.5554.app]
*** Get App Info
 * App.ID        = 8223b762-6c78-4c8b-b8b6-da04d300966c
 * App.Name      = CustomApp
 * App.Publisher = My Company
 * App.Version   = 17.1.0.5554
*** Get Extension status
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensions'
*** Get Extension Deployment status
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Patch -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionUpload(0)/content'

*** Poll Deployment status
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[error]Exception in BCConnector.GetAPIData: {"error":{"code":"Application_ServiceUnavailable","message":"The session could not be retrieved from the server. The application will close.  CorrelationId:  039ff9ee-f7df-4ed6-aada-c53d45998342."}}
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'
*** Deployment Status:

operationID : b7cdc994-cff3-4464-ac71-c8ec580d301f
name        : CustomApp
publisher   : My Company
appVersion  : 17.1.0.5554
status      : Completed
startedOn   : 2021-04-26T04:00:16.2Z

##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/production/api/microsoft/automation/v1.0/companies(***)/extensionDeploymentStatus'

name                      publisher              appVersion  operationType schedule  status    startedOn               
----                      ---------              ----------  ------------- --------  ------    ---------               
CustomApp                 My Company             17.1.0.5554 Upload        Immediate Completed 2021-04-26T04:00:16.2Z  
CustomApp                 My Company             17.1.0.5546 Upload        Immediate Completed 2021-04-23T04:19:59.847Z
CustomApp                 My Company             17.1.0.5397 Upload        Immediate Completed 2021-04-20T16:03:48.763Z

*** Cleanup VSTS Environment: True
##[section]Finishing: ALOps Extension API
waldo1001 commented 3 years ago

Yeah - it seems to be a very unstable API. Thing is, it fails, so for powershell, it fails, so the error is caught, so the step fails :(.

We'll see what we can do.

Arthurvdv commented 3 years ago

Hi @waldo1001,

Today I've encountered this issue again, where it seems that after the error "(503) Server Unavailable" the polling continues and results in a Completed (succes), where the step itself is marked as Error.

Would be great if you somehow could work around the unstable API. It's difficult to explain to functional consultant why a Release is failed, when it's not failed.

2021-05-03T14:06:29.9691090Z ##[section]Starting: ALOps Extension API
2021-05-03T14:06:29.9839934Z ==============================================================================
2021-05-03T14:06:29.9840338Z Task         : ALOps Extension API
2021-05-03T14:06:29.9840635Z Description  : Get/Publish extensions with the Business Central API
2021-05-03T14:06:29.9840935Z Version      : 1.441.2429
2021-05-03T14:06:29.9841143Z Author       : Hodor
2021-05-03T14:06:29.9842527Z Help         : Get/Publish extensions with the Business Central API.
2021-05-03T14:06:29.9842880Z ==============================================================================
2021-05-03T14:06:31.4894086Z *** Validate configuration
2021-05-03T14:06:31.8009340Z *** Task Inputs:
2021-05-03T14:06:31.8046103Z 
2021-05-03T14:06:31.8121144Z name                                                                                                             value
2021-05-03T14:06:31.8122026Z ----                                                                                                             -----
2021-05-03T14:06:31.8122856Z usedocker                                                                                                        False
2021-05-03T14:06:31.8123427Z fixed_tag                                                                                                             
2021-05-03T14:06:31.8124013Z interaction                                                                                                    publish
2021-05-03T14:06:31.8125197Z api_endpoint            https://api.businesscentral.dynamics.com/v2.0/***/Sandbox/api
2021-05-03T14:06:31.8125762Z apiversion                                                                                                        v1.0
2021-05-03T14:06:31.8126345Z authentication                                                                                                   oauth
2021-05-03T14:06:31.8126939Z azure_tenant_id                                                                   ***
2021-05-03T14:06:31.8128005Z azure_app_client_id                                                               ***
2021-05-03T14:06:31.8128791Z azure_app_client_secret                                                             ***
2021-05-03T14:06:31.8129675Z username                                                                                                              
2021-05-03T14:06:31.8130314Z password                                                                                                              
2021-05-03T14:06:31.8130916Z bccompany                                                                                                             
2021-05-03T14:06:31.8131879Z artifact_path                                                                    D:\azure-vsts-agent-deploy\_work\r3\a
2021-05-03T14:06:31.8132629Z artifact_filter                                                                                                  *.app
2021-05-03T14:06:31.8133561Z showdeploymentstatus                                                                                              True
2021-05-03T14:06:31.8133936Z 
2021-05-03T14:06:31.8152333Z 
2021-05-03T14:06:31.8158700Z 
2021-05-03T14:06:31.8293754Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-05-03T14:06:31.8296002Z 
2021-05-03T14:06:32.5590398Z *** ALOps License:
2021-05-03T14:06:32.5599957Z   * Licensed To: Van Roey (Collection License)
2021-05-03T14:06:32.5970474Z 
2021-05-03T14:06:33.4170457Z *** Imported required PS-Functions
2021-05-03T14:06:33.4181388Z *** Parse Task Parameters
2021-05-03T14:06:33.4644566Z *** Creating API Connector with endpoint [https://api.businesscentral.dynamics.com/v2.0/***/Sandbox/api]
2021-05-03T14:06:33.4744244Z *** API Version: v1.0
2021-05-03T14:06:33.4763038Z *** Interaction Mode: publish
2021-05-03T14:06:33.4788114Z *** API Authentication: Using Azure OAuth Authentication []
2021-05-03T14:06:33.4807661Z *** Get OAuth token for tenant [***]
2021-05-03T14:06:33.4850736Z *** Communication: Service-2-Service
2021-05-03T14:06:33.4880368Z ##[command]Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/***/oauth2/token"
2021-05-03T14:06:33.6375025Z *** List Companies
2021-05-03T14:06:33.6382553Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies'
2021-05-03T14:06:43.1319818Z 
2021-05-03T14:06:43.1323302Z 
2021-05-03T14:06:43.1327928Z id                : ac8a1700-641d-ea11-bb2f-000d3a2c3bc6
2021-05-03T14:06:43.1330636Z systemVersion     : 18.0.23013.23532
2021-05-03T14:06:43.1344046Z name              : CRONUS BE
2021-05-03T14:06:43.1344862Z displayName       : Cronus BE
2021-05-03T14:06:43.1346214Z businessProfileId : 
2021-05-03T14:06:43.1347026Z systemCreatedAt   : 0001-01-01T00:00:00Z
2021-05-03T14:06:43.1367815Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2021-05-03T14:06:43.1369417Z systemModifiedAt  : 2021-02-25T08:56:33.657Z
2021-05-03T14:06:43.1370242Z systemModifiedBy  : 222eea85-e95a-4df2-b54f-b6247110e61d
2021-05-03T14:06:43.1370810Z 
2021-05-03T14:06:43.1373987Z id                : 688bc7fb-e12b-eb11-bf6a-000d3aad31e0
2021-05-03T14:06:43.1374781Z systemVersion     : 18.0.23013.23532
2021-05-03T14:06:43.1376639Z name              : Customer NV
2021-05-03T14:06:43.1535006Z displayName       : Customer PRELIVE
2021-05-03T14:06:43.1540039Z businessProfileId : 
2021-05-03T14:06:43.1541917Z systemCreatedAt   : 2020-11-21T10:11:58.473Z
2021-05-03T14:06:43.1542843Z systemCreatedBy   : 222eea85-e95a-4df2-b54f-b6247110e61d
2021-05-03T14:06:43.1617821Z systemModifiedAt  : 2020-11-21T10:17:28.743Z
2021-05-03T14:06:43.1618783Z systemModifiedBy  : 222eea85-e95a-4df2-b54f-b6247110e61d
2021-05-03T14:06:43.1619244Z 
2021-05-03T14:06:43.1619858Z id                : 92775d08-1aec-ea11-8b7b-000d3aaf611c
2021-05-03T14:06:43.1622970Z systemVersion     : 18.0.23013.23532
2021-05-03T14:06:43.1624225Z name              : Customer BVBA
2021-05-03T14:06:43.1632034Z displayName       : Customer BVBA
2021-05-03T14:06:43.1633511Z businessProfileId : 
2021-05-03T14:06:43.1635154Z systemCreatedAt   : 0001-01-01T00:00:00Z
2021-05-03T14:06:43.1635704Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2021-05-03T14:06:43.1636262Z systemModifiedAt  : 0001-01-01T00:00:00Z
2021-05-03T14:06:43.1636882Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
2021-05-03T14:06:43.1637255Z 
2021-05-03T14:06:43.1637739Z id                : 8585c1a1-6913-eb11-bbf7-000d3aad3748
2021-05-03T14:06:43.1638270Z systemVersion     : 18.0.23013.23532
2021-05-03T14:06:43.1638745Z name              : Customer BVBA
2021-05-03T14:06:43.1639256Z displayName       : Customer BVBA
2021-05-03T14:06:43.1639727Z businessProfileId : 
2021-05-03T14:06:43.1640248Z systemCreatedAt   : 2020-10-21T06:49:58.177Z
2021-05-03T14:06:43.1640774Z systemCreatedBy   : f96ba905-82fa-47c0-8222-78d267fbf21a
2021-05-03T14:06:43.1641361Z systemModifiedAt  : 2020-11-25T09:54:59.117Z
2021-05-03T14:06:43.1641933Z systemModifiedBy  : 244f2d60-2517-4f7a-847a-f4b58a3ef027
2021-05-03T14:06:43.1642373Z 
2021-05-03T14:06:43.1642644Z 
2021-05-03T14:06:43.1642882Z 
2021-05-03T14:06:43.1643460Z *** Selected Company: CRONUS BE [ac8a1700-641d-ea11-bb2f-000d3a2c3bc6]
2021-05-03T14:06:43.1644617Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensions'
2021-05-03T14:06:43.7200414Z *** Installed Extensions:
2021-05-03T14:06:43.7259716Z 
2021-05-03T14:06:43.7351273Z publisher         displayName                                              version id                                  
2021-05-03T14:06:43.7354202Z ---------         -----------                                              ------- --                                  
2021-05-03T14:06:43.7356395Z Continia Software Continia Core                                            4.1     4b915d7e-c02a-435f-85ab-649086c1e002
2021-05-03T14:06:43.7359457Z Continia Software Continia Delivery Network                                1.1     0745e76d-0b72-4641-87c2-ee45db5d2c32
2021-05-03T14:06:43.7361890Z Continia Software Continia Document Capture 365                            7.1     6da8dd2f-e698-461f-9147-8e404244dd85
2021-05-03T14:06:43.7363945Z ForNAV            Customizable Report Pack                                 5.4     83326d6d-11f8-49fd-981a-6f266a7c8d81
2021-05-03T14:06:43.7366194Z ForNAV            ForNAV Core                                              5.4     6f0293d3-86fc-4ff8-9632-54a580be6546
2021-05-03T14:06:43.7372791Z ForNAV            ForNAV Language Module                                   5.4     f94c6dff-0118-4c1d-a7d4-382033529ed3
2021-05-03T14:06:43.7375059Z Microsoft         AMC Banking 365 Fundamentals                             18.0    16319982-4995-4fb1-8fb2-2b1e13773e3b
2021-05-03T14:06:43.7377052Z Microsoft         Application                                              18.0    c1335042-3002-4257-bf8a-75c898ccb1b8
2021-05-03T14:06:43.7379292Z Microsoft         Base Application                                         18.0    437dbf0e-84ff-417a-965d-ed2bb9650972
2021-05-03T14:06:43.7381711Z Microsoft         Business Central Cloud Migration - Previous Release      18.0    6992416f-3f39-4d3c-8242-3fff61350bea
2021-05-03T14:06:43.7384138Z Microsoft         Business Central Cloud Migration - Previous Release (BE) 18.0    620725d3-2ed5-424a-bd9b-7d4b44bfcc9b
2021-05-03T14:06:43.7386163Z Microsoft         Business Central Intelligent Cloud                       18.0    334ef79e-547e-4631-8ba1-7a7f18e14de6
2021-05-03T14:06:43.7388114Z Microsoft         Company Hub                                              18.0    c512d720-63b9-4b26-b062-a0c09b4ed322
2021-05-03T14:06:43.7390373Z Microsoft         Email - Current User Connector                           18.0    08d69832-9231-429e-be2c-8bab2c96905b
2021-05-03T14:06:43.7392756Z Microsoft         Email - Microsoft 365 Connector                          18.0    aceb66c8-472e-437c-81d3-27e6c07d0f14
2021-05-03T14:06:43.7394813Z Microsoft         Email - Outlook REST API                                 18.0    e6328152-bb29-4664-9dae-3bc7eaae1fd8
2021-05-03T14:06:43.7402270Z Microsoft         Email - SMTP Connector                                   18.0    68e13fa3-217a-4be0-9141-99e5bf0ca818
2021-05-03T14:06:43.7404493Z Microsoft         Essential Business Headlines                             18.0    2a89f298-7ffd-44a5-a7ce-e08dac98abce
2021-05-03T14:06:43.7406995Z Microsoft         Intelligent Cloud Base                                   18.0    58623bfa-0559-4bc2-ae1c-0979c29fd9e0
2021-05-03T14:06:43.7408978Z Microsoft         Late Payment Prediction                                  18.0    3d5b2137-efeb-4014-8489-41d37f8fd4c3
2021-05-03T14:06:43.7411234Z Microsoft         PayPal Payments Standard                                 18.0    d09fa965-9a2a-424d-b704-69f3b54ed0ce
2021-05-03T14:06:43.7413630Z Microsoft         Sales and Inventory Forecast                             18.0    c526b3e9-b8ca-4683-81ba-fcd5f6b1472a
2021-05-03T14:06:43.7415758Z Microsoft         Send To Email Printer                                    18.0    8c972578-fe72-4aa5-ae51-cc5575fef2ea
2021-05-03T14:06:43.7417690Z Microsoft         Simplified Bank Statement Import                         18.0    79b1a79a-2f66-4736-bc1b-8abb3537eb51
2021-05-03T14:06:43.7419881Z Microsoft         System Application                                       18.0    63ca2fa4-4f03-4f2b-a480-172fef340d3f
2021-05-03T14:06:43.7422046Z Microsoft         Universal Print Integration (Preview)                    18.0    2654d7e7-9afd-4947-9e02-6bb8f3e0cd04
2021-05-03T14:06:43.7424499Z Microsoft         VAT Group Management                                     18.0    c50a4bf0-db51-4ad2-88d5-fe2287da0eb8
2021-05-03T14:06:43.7426490Z Microsoft         WorldPay Payments Standard                               18.0    bae453ed-0fd8-4416-afdc-4b09db6c12c3
2021-05-03T14:06:43.7428584Z VanRoey.be        EDS Archive                                              0.7     45c0312f-eea8-4d76-b44d-3c13d885401c
2021-05-03T14:06:43.7431258Z VanRoey.be        Finance Extension (BE)                                   0.7     c7f3afeb-95cc-4ffe-8c3c-6c1ac185e864
2021-05-03T14:06:43.7433491Z VanRoey.be        Finance Extension Library                                0.7     b561d731-1e39-4bf4-a2ea-a162f3ab38a8
2021-05-03T14:06:43.7434412Z 
2021-05-03T14:06:43.7439374Z 
2021-05-03T14:06:43.7439790Z 
2021-05-03T14:06:43.7477319Z *** Published Extensions (not installed):
2021-05-03T14:06:43.7477877Z 
2021-05-03T14:06:43.7485414Z *** Import NAV/BC Management DLL's
2021-05-03T14:06:43.7501250Z *** ServiceTier not specified, loading default assemblies.
2021-05-03T14:06:43.7545851Z *** Default Assemblies not found. Load via BC-Artifacts
2021-05-03T14:06:43.7583484Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2021-05-03T14:06:43.7617744Z *** Check BcContainerHelper
2021-05-03T14:06:43.8230564Z *** Load BcContainerHelper
2021-05-03T14:06:43.9982695Z BcContainerHelper version 2.0.11
2021-05-03T14:06:44.6693225Z 
2021-05-03T14:06:44.6694229Z ModuleType Version    Name                                ExportedCommands                                             
2021-05-03T14:06:44.6694832Z ---------- -------    ----                                ----------------                                             
2021-05-03T14:06:44.6695396Z Script     2.0.11     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...
2021-05-03T14:06:44.6695661Z 
2021-05-03T14:06:44.6695748Z 
2021-05-03T14:06:44.6695857Z 
2021-05-03T14:06:44.6696852Z 
2021-05-03T14:06:44.6720806Z ##[command]"Get-BCArtifactUrl" 
2021-05-03T14:06:44.6721394Z Name                           Value                                                                                   
2021-05-03T14:06:44.6722058Z ----                           -----                                                                                   
2021-05-03T14:06:44.6722665Z select                         Latest                                                                                  
2021-05-03T14:06:44.6723469Z type                           OnPrem                                                                                  
2021-05-03T14:06:44.6724492Z country                        W1                                                                                      
2021-05-03T14:06:44.6724790Z 
2021-05-03T14:06:44.6724882Z 
2021-05-03T14:06:44.6725263Z  -select: Latest -type: OnPrem -country: W1
2021-05-03T14:06:45.7576528Z *** Platform: C:\bcartifacts.cache\onprem\18.0.23013.23795\platform
2021-05-03T14:06:45.7607621Z *** Localisation: C:\bcartifacts.cache\onprem\18.0.23013.23795\w1
2021-05-03T14:06:45.7757308Z *** BC Management DLL: C:\bcartifacts.cache\onprem\18.0.23013.23795\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client\Microsoft.Dynamics.Nav.Management.dll
2021-05-03T14:06:45.8007890Z *** BC App Management DLL: C:\bcartifacts.cache\onprem\18.0.23013.23795\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client\Microsoft.Dynamics.Nav.Apps.Management.dll
2021-05-03T14:06:45.8117295Z *** Publish Extension
2021-05-03T14:06:45.8125137Z   * Artifact Path  : D:\azure-vsts-agent-deploy\_work\r3\a
2021-05-03T14:06:45.8131226Z   * Artifact Filter: *.app
2021-05-03T14:06:45.8230574Z *** Resolve App file in [D:\azure-vsts-agent-deploy\_work\r3\a]
2021-05-03T14:06:45.8295613Z *** Resolved App File: [D:\azure-vsts-agent-deploy\_work\r3\a\App\Customer\VanRoey.be_Customer - D365BC Extension_1.0.202118.8574_sandbox_18.0_be.app].
2021-05-03T14:06:45.8314313Z *** Resolved App Path: [D:\azure-vsts-agent-deploy\_work\r3\a\App\Customer\VanRoey.be_Customer - D365BC Extension_1.0.202118.8574_sandbox_18.0_be.app]
2021-05-03T14:06:45.8366156Z *** Upload extension [D:\azure-vsts-agent-deploy\_work\r3\a\App\Customer\VanRoey.be_Customer - D365BC Extension_1.0.202118.8574_sandbox_18.0_be.app]
2021-05-03T14:06:45.8374398Z *** Get App Info
2021-05-03T14:06:45.9113033Z  * App.ID        = 22b42e4f-a408-402e-90a1-2ebe2f331a59
2021-05-03T14:06:45.9134671Z  * App.Name      = Customer - D365BC Extension
2021-05-03T14:06:45.9157924Z  * App.Publisher = VanRoey.be
2021-05-03T14:06:45.9177377Z  * App.Version   = 1.0.202118.8574
2021-05-03T14:06:45.9182718Z *** Get Extension status
2021-05-03T14:06:45.9192036Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensions'
2021-05-03T14:06:46.0783659Z *** Get Extension Deployment status
2021-05-03T14:06:46.0791377Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:06:46.2359299Z ##[command]Invoke-RestMethod -Method Patch -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionUpload(0)/content'
2021-05-03T14:06:47.9949377Z 
2021-05-03T14:06:47.9950505Z *** Poll Deployment status
2021-05-03T14:06:47.9968741Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:06:58.4113302Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:07:13.6694648Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:07:13.7901918Z ##[error]Exception in BCConnector.GetAPIData: The remote server returned an error: (503) Server Unavailable.
2021-05-03T14:07:33.7881906Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:07:59.0796138Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:07:59.8070456Z *** Deployment Status:
2021-05-03T14:07:59.8072461Z 
2021-05-03T14:07:59.8073057Z 
2021-05-03T14:07:59.8074694Z operationID : ea64ee45-1b80-4c7f-b604-39ea367373d6
2021-05-03T14:07:59.8075647Z name        : Customer - D365BC Extension
2021-05-03T14:07:59.8076523Z publisher   : VanRoey.be
2021-05-03T14:07:59.8077354Z appVersion  : 1.0.202118.8574
2021-05-03T14:07:59.8078209Z status      : Completed
2021-05-03T14:07:59.8079124Z startedOn   : 2021-05-03T14:06:47.92Z
2021-05-03T14:07:59.8079646Z 
2021-05-03T14:07:59.8080562Z 
2021-05-03T14:07:59.8100106Z 
2021-05-03T14:07:59.8109762Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(ac8a1700-641d-ea11-bb2f-000d3a2c3bc6)/extensionDeploymentStatus'
2021-05-03T14:07:59.8721493Z 
2021-05-03T14:07:59.8722814Z name                            publisher         appVersion      operationType schedule  status    startedOn          
2021-05-03T14:07:59.8723598Z ----                            ---------         ----------      ------------- --------  ------    ---------          
2021-05-03T14:07:59.8724306Z Continia Document Capture 365   Continia Software                 Install                 Completed 2020-08-05T07:44...
2021-05-03T14:07:59.8726074Z Customizable Report Pack        ForNAV                            Install                 Completed 2020-12-29T08:02...
2021-05-03T14:07:59.8726843Z EDS Archive                     VanRoey.be                        Install                 Completed 2021-03-30T09:24...
2021-05-03T14:07:59.8727574Z Customer - D365BC Extension VanRoey.be        1.0.202118.8574 Upload        Immediate Completed 2021-05-03T14:06...
2021-05-03T14:07:59.8728312Z Finance Extension (BE)          VanRoey.be                        Install                 Completed 2020-11-27T07:25...
2021-05-03T14:07:59.8728730Z 
2021-05-03T14:07:59.8728908Z 
2021-05-03T14:07:59.9052354Z *** Cleanup VSTS Environment: True
2021-05-03T14:08:01.9974084Z ##[section]Finishing: ALOps Extension API
Arthurvdv commented 3 years ago

Hi @waldo1001,

Again a colleague reported the same issue; App is successful deployed, but the (unstable) API reports a "The remote server returned an error: (503) Server Unavailable." in one of the polling status.

I know I could disable the Show Deployment Status option, but I think the status is an added value so I'm a bit withhold to disable this function.

2021-06-18T09:23:25.8893730Z ##[section]Starting: Publish
2021-06-18T09:23:25.9094940Z ==============================================================================
2021-06-18T09:23:25.9095434Z Task         : ALOps Extension API
2021-06-18T09:23:25.9095804Z Description  : Get/Publish extensions with the Business Central API
2021-06-18T09:23:25.9096176Z Version      : 1.443.2515
2021-06-18T09:23:25.9096588Z Author       : Hodor
2021-06-18T09:23:25.9098013Z Help         : Get/Publish extensions with the Business Central API.
2021-06-18T09:23:25.9098450Z ==============================================================================
2021-06-18T09:23:27.3142331Z *** Validate configuration
2021-06-18T09:23:27.6562669Z *** Task Inputs:
2021-06-18T09:23:27.6602925Z 
2021-06-18T09:23:27.6679384Z name                                                                                                             value
2021-06-18T09:23:27.6680683Z ----                                                                                                             -----
2021-06-18T09:23:27.6681629Z usedocker                                                                                                        False
2021-06-18T09:23:27.6682515Z fixed_tag                                                                                                             
2021-06-18T09:23:27.6683129Z interaction                                                                                                    publish
2021-06-18T09:23:27.6684477Z api_endpoint            https://api.businesscentral.dynamics.com/v2.0/***/Sandbox/api
2021-06-18T09:23:27.6685045Z apiversion                                                                                                        v1.0
2021-06-18T09:23:27.6685970Z authentication                                                                                                   oauth
2021-06-18T09:23:27.6686571Z azure_tenant_id                                                                   ***
2021-06-18T09:23:27.6687480Z azure_app_client_id                                                               ***
2021-06-18T09:23:27.6688543Z azure_app_client_secret                                                             ***
2021-06-18T09:23:27.6689218Z username                                                                                                              
2021-06-18T09:23:27.6689874Z password                                                                                                              
2021-06-18T09:23:27.6693054Z bccompany                                                                                                             
2021-06-18T09:23:27.6693729Z artifact_path                                                                    D:\azure-vsts-agent-deploy\_work\r2\a
2021-06-18T09:23:27.6694411Z artifact_filter                                                                                                  *.app
2021-06-18T09:23:27.6695060Z showdeploymentstatus                                                                                              True
2021-06-18T09:23:27.6695429Z 
2021-06-18T09:23:27.6702991Z 
2021-06-18T09:23:27.6708538Z 
2021-06-18T09:23:27.6838788Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-06-18T09:23:27.6841209Z 
2021-06-18T09:23:27.9899326Z *** ALOps License:
2021-06-18T09:23:27.9992661Z   * Licensed To: Van Roey (Collection License)
2021-06-18T09:23:27.9993190Z 
2021-06-18T09:23:28.9577655Z *** Imported required PS-Functions
2021-06-18T09:23:28.9588335Z *** Parse Task Parameters
2021-06-18T09:23:29.0009305Z *** Creating API Connector with endpoint [https://api.businesscentral.dynamics.com/v2.0/***/Sandbox/api]
2021-06-18T09:23:29.0159355Z *** API Version: v1.0
2021-06-18T09:23:29.0173400Z *** Interaction Mode: publish
2021-06-18T09:23:29.0197276Z *** API Authentication: Using Azure OAuth Authentication []
2021-06-18T09:23:29.0212907Z *** Get OAuth token for tenant [***]
2021-06-18T09:23:29.0254155Z *** Communication: Service-2-Service
2021-06-18T09:23:29.0280194Z ##[command]Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/***/oauth2/token"
2021-06-18T09:23:29.2911397Z *** List Companies
2021-06-18T09:23:29.2986874Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies'
2021-06-18T09:23:31.9952417Z 
2021-06-18T09:23:31.9954882Z 
2021-06-18T09:23:31.9956671Z id                : 033ccb55-54f7-4795-af7a-a57c67953b04
2021-06-18T09:23:31.9979682Z systemVersion     : 18.1.24822.24906
2021-06-18T09:23:31.9980250Z name              : CUSTOMER LIVE
2021-06-18T09:23:31.9980756Z displayName       : CUSTOMER
2021-06-18T09:23:31.9981262Z businessProfileId : 
2021-06-18T09:23:31.9981763Z systemCreatedAt   : 0001-01-01T00:00:00Z
2021-06-18T09:23:31.9982312Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2021-06-18T09:23:31.9982835Z systemModifiedAt  : 0001-01-01T00:00:00Z
2021-06-18T09:23:31.9983457Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
<..............>
2021-06-18T09:23:32.0098393Z 
2021-06-18T09:23:32.0098521Z 
2021-06-18T09:23:32.0098610Z 
2021-06-18T09:23:32.0098956Z *** Selected Company: CUSTOMER LIVE [033ccb55-54f7-4795-af7a-a57c67953b04]
2021-06-18T09:23:32.0172036Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensions'
2021-06-18T09:23:32.9259397Z *** Installed Extensions:
2021-06-18T09:23:32.9260638Z 
2021-06-18T09:23:32.9261339Z publisher         displayName                                              version id                                  
2021-06-18T09:23:32.9263303Z ---------         -----------                                              ------- --                                  
2021-06-18T09:23:32.9301681Z Continia Software Continia Core                                            4.1     4b915d7e-c02a-435f-85ab-649086c1e002
2021-06-18T09:23:32.9302702Z Continia Software Continia Delivery Network                                1.1     0745e76d-0b72-4641-87c2-ee45db5d2c32
2021-06-18T09:23:32.9303478Z Continia Software Continia Document Capture 365                            7.1     6da8dd2f-e698-461f-9147-8e404244dd85
2021-06-18T09:23:32.9305532Z Microsoft         AMC Banking 365 Fundamentals                             18.1    16319982-4995-4fb1-8fb2-2b1e13773e3b
2021-06-18T09:23:32.9319202Z Microsoft         Application                                              18.1    c1335042-3002-4257-bf8a-75c898ccb1b8
2021-06-18T09:23:32.9320179Z Microsoft         Base Application                                         18.1    437dbf0e-84ff-417a-965d-ed2bb9650972
2021-06-18T09:23:32.9320979Z Microsoft         Business Central Cloud Migration - Previous Release      18.1    6992416f-3f39-4d3c-8242-3fff61350bea
2021-06-18T09:23:32.9321768Z Microsoft         Business Central Cloud Migration - Previous Release (BE) 18.1    620725d3-2ed5-424a-bd9b-7d4b44bfcc9b
2021-06-18T09:23:32.9322937Z Microsoft         Business Central Intelligent Cloud                       18.1    334ef79e-547e-4631-8ba1-7a7f18e14de6
2021-06-18T09:23:32.9323710Z Microsoft         Company Hub                                              18.1    c512d720-63b9-4b26-b062-a0c09b4ed322
2021-06-18T09:23:32.9324485Z Microsoft         Email - Current User Connector                           18.1    08d69832-9231-429e-be2c-8bab2c96905b
2021-06-18T09:23:32.9325252Z Microsoft         Email - Microsoft 365 Connector                          18.1    aceb66c8-472e-437c-81d3-27e6c07d0f14
2021-06-18T09:23:32.9326017Z Microsoft         Email - Outlook REST API                                 18.1    e6328152-bb29-4664-9dae-3bc7eaae1fd8
2021-06-18T09:23:32.9326784Z Microsoft         Email - SMTP Connector                                   18.1    68e13fa3-217a-4be0-9141-99e5bf0ca818
2021-06-18T09:23:32.9327516Z Microsoft         Essential Business Headlines                             18.1    2a89f298-7ffd-44a5-a7ce-e08dac98abce
2021-06-18T09:23:32.9328361Z Microsoft         Intelligent Cloud Base                                   18.1    58623bfa-0559-4bc2-ae1c-0979c29fd9e0
2021-06-18T09:23:32.9329141Z Microsoft         Late Payment Prediction                                  18.1    3d5b2137-efeb-4014-8489-41d37f8fd4c3
2021-06-18T09:23:32.9329946Z Microsoft         PayPal Payments Standard                                 18.1    d09fa965-9a2a-424d-b704-69f3b54ed0ce
2021-06-18T09:23:32.9330703Z Microsoft         Sales and Inventory Forecast                             18.1    c526b3e9-b8ca-4683-81ba-fcd5f6b1472a
2021-06-18T09:23:32.9331438Z Microsoft         Send To Email Printer                                    18.1    8c972578-fe72-4aa5-ae51-cc5575fef2ea
2021-06-18T09:23:32.9332203Z Microsoft         Simplified Bank Statement Import                         18.1    79b1a79a-2f66-4736-bc1b-8abb3537eb51
2021-06-18T09:23:32.9332962Z Microsoft         System Application                                       18.1    63ca2fa4-4f03-4f2b-a480-172fef340d3f
2021-06-18T09:23:32.9333901Z Microsoft         Universal Print Integration (Preview)                    18.1    2654d7e7-9afd-4947-9e02-6bb8f3e0cd04
2021-06-18T09:23:32.9365545Z Microsoft         VAT Group Management                                     18.1    c50a4bf0-db51-4ad2-88d5-fe2287da0eb8
2021-06-18T09:23:32.9366463Z Microsoft         WorldPay Payments Standard                               18.1    bae453ed-0fd8-4416-afdc-4b09db6c12c3
2021-06-18T09:23:32.9367237Z VanRoey.be        Common Data                                              0.8     3be7f261-c577-4c67-aee1-992804843ade
2021-06-18T09:23:32.9368017Z VanRoey.be        Common Library                                           0.8     a1f8d28c-c3df-46db-b018-58cb5fa1ff10
2021-06-18T09:23:32.9370095Z VanRoey.be        EDS Archive                                              0.7     45c0312f-eea8-4d76-b44d-3c13d885401c
2021-06-18T09:23:32.9378947Z VanRoey.be        CUSTOMER - D365BC Extension                                  2.4     f692235a-34a4-4654-8e32-439fba6e77c8
2021-06-18T09:23:32.9379545Z 
2021-06-18T09:23:32.9379814Z 
2021-06-18T09:23:32.9380069Z 
2021-06-18T09:23:32.9380636Z *** Published Extensions (not installed):
2021-06-18T09:23:32.9380943Z 
2021-06-18T09:23:32.9381423Z publisher  displayName             version id                                  
2021-06-18T09:23:32.9381985Z ---------  -----------             ------- --                                  
2021-06-18T09:23:32.9382603Z VanRoey.be CUSTOMER - D365BC Extension 2.4     f692235a-34a4-4654-8e32-439fba6e77c8
2021-06-18T09:23:32.9382972Z 
2021-06-18T09:23:32.9383197Z 
2021-06-18T09:23:32.9383419Z 
2021-06-18T09:23:32.9383826Z *** Import NAV/BC Management DLL's
2021-06-18T09:23:32.9384324Z *** ServiceTier not specified, loading default assemblies.
2021-06-18T09:23:32.9384849Z *** Default Assemblies not found. Load via BC-Artifacts
2021-06-18T09:23:32.9421149Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2021-06-18T09:23:32.9449750Z *** Check BcContainerHelper
2021-06-18T09:23:33.0097640Z *** Load BcContainerHelper
2021-06-18T09:23:33.1689514Z BcContainerHelper version 2.0.13
2021-06-18T09:23:33.8401739Z 
2021-06-18T09:23:33.8402806Z ModuleType Version    Name                                ExportedCommands                                             
2021-06-18T09:23:33.8403810Z ---------- -------    ----                                ----------------                                             
2021-06-18T09:23:33.8404711Z Script     2.0.13     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...
2021-06-18T09:23:33.8405188Z 
2021-06-18T09:23:33.8405421Z 
2021-06-18T09:23:33.8405614Z 
2021-06-18T09:23:33.8405836Z 
2021-06-18T09:23:33.8428408Z ##[command]"Get-BCArtifactUrl" 
2021-06-18T09:23:33.8428988Z Name                           Value                                                                                   
2021-06-18T09:23:33.8429955Z ----                           -----                                                                                   
2021-06-18T09:23:33.8430603Z select                         Latest                                                                                  
2021-06-18T09:23:33.8431251Z type                           OnPrem                                                                                  
2021-06-18T09:23:33.8431896Z country                        W1                                                                                      
2021-06-18T09:23:33.8432269Z 
2021-06-18T09:23:33.8432447Z 
2021-06-18T09:23:33.8432827Z  -select: Latest -type: OnPrem -country: W1
2021-06-18T09:23:35.5175004Z *** Platform: C:\bcartifacts.cache\onprem\18.2.26217.26490\platform
2021-06-18T09:23:35.5189900Z *** Localisation: C:\bcartifacts.cache\onprem\18.2.26217.26490\w1
2021-06-18T09:23:35.5356444Z *** BC Management DLL: C:\bcartifacts.cache\onprem\18.2.26217.26490\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client\Microsoft.Dynamics.Nav.Management.dll
2021-06-18T09:23:35.6147376Z *** BC App Management DLL: C:\bcartifacts.cache\onprem\18.2.26217.26490\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client\Microsoft.Dynamics.Nav.Apps.Management.dll
2021-06-18T09:23:35.6731246Z *** Publish Extension
2021-06-18T09:23:35.6735235Z   * Artifact Path  : D:\azure-vsts-agent-deploy\_work\r2\a
2021-06-18T09:23:35.6740299Z   * Artifact Filter: *.app
2021-06-18T09:23:35.6836808Z *** Resolve App file in [D:\azure-vsts-agent-deploy\_work\r2\a]
2021-06-18T09:23:35.6915117Z *** Resolved App File: [D:\azure-vsts-agent-deploy\_work\r2\a\App\CUSTOMER\VanRoey.be_CUSTOMER - D365BC Extension_2.4.202125.11617_sandbox_18.2_be.app].
2021-06-18T09:23:35.6930677Z *** Resolved App Path: [D:\azure-vsts-agent-deploy\_work\r2\a\App\CUSTOMER\VanRoey.be_CUSTOMER - D365BC Extension_2.4.202125.11617_sandbox_18.2_be.app]
2021-06-18T09:23:35.6980958Z *** Upload extension [D:\azure-vsts-agent-deploy\_work\r2\a\App\CUSTOMER\VanRoey.be_CUSTOMER - D365BC Extension_2.4.202125.11617_sandbox_18.2_be.app]
2021-06-18T09:23:35.6987527Z *** Get App Info
2021-06-18T09:23:35.9188319Z  * App.ID        = f692235a-34a4-4654-8e32-439fba6e77c8
2021-06-18T09:23:35.9213681Z  * App.Name      = CUSTOMER - D365BC Extension
2021-06-18T09:23:35.9231579Z  * App.Publisher = VanRoey.be
2021-06-18T09:23:35.9254149Z  * App.Version   = 2.4.202125.11617
2021-06-18T09:23:35.9259351Z *** Get Extension status
2021-06-18T09:23:35.9269278Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensions'
2021-06-18T09:23:36.2499646Z *** Get Extension Deployment status
2021-06-18T09:23:36.2506933Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:23:36.5331466Z ##[command]Invoke-RestMethod -Method Patch -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionUpload(0)/content'
2021-06-18T09:23:37.9609584Z 
2021-06-18T09:23:37.9610667Z *** Poll Deployment status
2021-06-18T09:23:37.9617528Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:23:48.4433419Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:24:03.8318903Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:24:03.9054822Z ##[error]Exception in BCConnector.GetAPIData: The remote server returned an error: (503) Server Unavailable.
2021-06-18T09:24:23.8965560Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:24:50.7694990Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:24:51.0394788Z *** Deployment Status:
2021-06-18T09:24:51.0395494Z 
2021-06-18T09:24:51.0395791Z 
2021-06-18T09:24:51.0396297Z operationID : 2ce3efe1-431b-4cb1-a7d1-94cdf99ba160
2021-06-18T09:24:51.0396899Z name        : CUSTOMER - D365BC Extension
2021-06-18T09:24:51.0397382Z publisher   : VanRoey.be
2021-06-18T09:24:51.0397897Z appVersion  : 2.4.202125.11617
2021-06-18T09:24:51.0398794Z status      : Completed
2021-06-18T09:24:51.0399317Z startedOn   : 2021-06-18T09:23:37.873Z
2021-06-18T09:24:51.0399651Z 
2021-06-18T09:24:51.0399904Z 
2021-06-18T09:24:51.0400244Z 
2021-06-18T09:24:51.0407108Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://api.businesscentral.dynamics.com/v2.0/***/sandbox/api/microsoft/automation/v1.0/companies(033ccb55-54f7-4795-af7a-a57c67953b04)/extensionDeploymentStatus'
2021-06-18T09:24:51.2524519Z 
2021-06-18T09:24:51.2527632Z name                          publisher         appVersion       operationType schedule  status    startedOn           
2021-06-18T09:24:51.2528444Z ----                          ---------         ----------       ------------- --------  ------    ---------           
2021-06-18T09:24:51.2529122Z Continia Document Capture 365 Continia Software                  Install                 Completed 2020-02-19T12:06:...
2021-06-18T09:24:51.2529806Z EDS Archive                   VanRoey.be                         Install                 Completed 2019-12-23T09:34:...
2021-06-18T09:24:51.2530466Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.9.0          Upload        Immediate Completed 2020-02-24T10:55:...
2021-06-18T09:24:51.2531367Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.11.0         Upload        Immediate Completed 2020-02-26T07:29:...
2021-06-18T09:24:51.2532060Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202108.6265  Upload        Immediate Completed 2021-02-18T16:21:...
2021-06-18T09:24:51.2532703Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.10.0         Upload        Immediate Completed 2020-02-25T10:00:...
2021-06-18T09:24:51.2533341Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.8.0          Upload        Immediate Completed 2020-01-03T09:31:...
2021-06-18T09:24:51.2534303Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.4.0          Upload        Immediate Completed 2019-12-24T10:48:...
2021-06-18T09:24:51.2536365Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202125.11617 Upload        Immediate Completed 2021-06-18T09:23:...
2021-06-18T09:24:51.2537071Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.5.0          Upload        Immediate Completed 2019-12-30T07:54:...
2021-06-18T09:24:51.2538207Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.7.0          Upload        Immediate Completed 2020-01-02T14:19:...
2021-06-18T09:24:51.2538975Z CUSTOMER - D365BC Extension       VanRoey.be        1.0.6.0          Upload        Immediate Completed 2019-12-30T08:26:...
2021-06-18T09:24:51.2539584Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202111.6884  Upload        Immediate Completed 2021-03-12T15:37:...
2021-06-18T09:24:51.2540223Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202110.6803  Upload        Immediate Completed 2021-03-10T07:27:...
2021-06-18T09:24:51.2540862Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202119.8905  Upload        Immediate Completed 2021-05-06T14:45:...
2021-06-18T09:24:51.2541512Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202121.9712  Upload        Immediate Completed 2021-05-21T06:03:...
2021-06-18T09:24:51.2542184Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202119.9145  Upload        Immediate Completed 2021-05-10T14:28:...
2021-06-18T09:24:51.2542818Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202110.6789  Upload        Immediate Completed 2021-03-09T17:16:...
2021-06-18T09:24:51.2543455Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202108.6321  Upload        Immediate Completed 2021-02-19T11:07:...
2021-06-18T09:24:51.2544146Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202108.6315  Upload        Immediate Completed 2021-02-19T09:30:...
2021-06-18T09:24:51.2544943Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202109.6491  Upload        Immediate Completed 2021-02-25T17:12:...
2021-06-18T09:24:51.2545561Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202109.6504  Upload        Immediate Completed 2021-02-26T08:32:...
2021-06-18T09:24:51.2546432Z CUSTOMER - D365BC Extension       VanRoey.be        2.4.202109.6502  Upload        Immediate Completed 2021-02-26T06:33:...
2021-06-18T09:24:51.2546768Z 
2021-06-18T09:24:51.2546857Z 
2021-06-18T09:24:51.3000611Z *** Cleanup VSTS Environment: True
2021-06-18T09:24:53.6216305Z ##[section]Finishing: Publish
waldo1001 commented 3 years ago

It happens, indeed :(. We can't influence the stability of "internet" or "MS Cloud" I'm afraid :(.

What would you suggest?

Arthurvdv commented 3 years ago

An idea could be to suppress the possible warnings/error from the polling from the extensionDeploymentStatus.

Only change the status of the step to Error when the status from the response below is Failed (and a Warning when the status not equals Completed?)

2021-05-03T14:07:59.8074694Z operationID : ea64ee45-1b80-4c7f-b604-39ea367373d6
2021-05-03T14:07:59.8075647Z name        : Customer - D365BC Extension
2021-05-03T14:07:59.8076523Z publisher   : VanRoey.be
2021-05-03T14:07:59.8077354Z appVersion  : 1.0.202118.8574
2021-05-03T14:07:59.8078209Z status      : Completed
2021-05-03T14:07:59.8079124Z startedOn   : 2021-05-03T14:06:47.92Z
Arthurvdv commented 3 years ago

@waldo1001 Any news on this?

waldo1001 commented 3 years ago

We needed to get today's release out to be able to work on this.

This has now prio.. (and followed up in #394)