HodorNV / ALOps

ALOps
59 stars 24 forks source link

ALOpsExtension API: An administrator changed one or more extensions in the application, so the page that you were working on had to be closed #561

Closed petertijsma closed 2 years ago

petertijsma commented 2 years ago

Bug Description When using the ALOpsExtension API on a BC20 (OnPrem) installation, the app is published without issues, but the pipeline fails because of the error:

##[error]{"error":{"code":"Unknown","message":"An administrator changed one or more extensions in the application, so the page that you were working on had to be closed.  CorrelationId:  4f2ae163-366f-47a0-baf0-930afcf3c4c3."}}

The used yaml

steps:
- task: Hodor.hodor-alops.ALOpsExtensionAPI.ALOpsExtensionAPI@1
  displayName: 'Batch Publish OGDT Core'
  inputs:
    interaction: batch
    api_endpoint: 'https://<serverFQDN>:21003/CLIENT-CLEANBC20/api'
    authentication: basic
    username: '$(og.serviceaccount)'
    password: '$(og.serviceaccountpassword)'
    bccompany: 'Sales and Master'
    artifact_path: '$(System.ArtifactsDirectory)\_OGDT Core'
    maxtries: 240
  continueOnError: true
  condition: succeededOrFailed()

The output

2022-08-24T07:21:03.8162054Z ##[section]Starting: Batch Publish OGDT Core
2022-08-24T07:21:03.8342124Z ==============================================================================
2022-08-24T07:21:03.8342497Z Task         : ALOps Extension API
2022-08-24T07:21:03.8342804Z Description  : Get/Publish extensions with the Business Central API
2022-08-24T07:21:03.8343116Z Version      : 1.451.3127
2022-08-24T07:21:03.8343312Z Author       : Hodor
2022-08-24T07:21:03.8343596Z Help         : Get/Publish extensions with the Business Central API.
2022-08-24T07:21:03.8343967Z ==============================================================================
2022-08-24T07:21:04.8973337Z *** Configure AMSI for session: disable (in memory)
2022-08-24T07:21:04.9129163Z 0
2022-08-24T07:21:05.2179253Z *** Validate configuration
2022-08-24T07:21:05.4631145Z *** Task Inputs:
2022-08-24T07:21:05.4678845Z 
2022-08-24T07:21:05.4774851Z name                                                                                               value
2022-08-24T07:21:05.4777394Z ----                                                                                               -----
2022-08-24T07:21:05.4779011Z usedocker                                                                                          False
2022-08-24T07:21:05.4780716Z fixed_tag                                                                                               
2022-08-24T07:21:05.4782823Z interaction                                                                                        batch
2022-08-24T07:21:05.4785290Z api_endpoint                          https://<serverFQDN>:21003/CLIENT-CLEANBC20/api
2022-08-24T07:21:05.4787163Z dev_endpoint                                                                                            
2022-08-24T07:21:05.4788757Z apiversion                                                                                          v1.0
2022-08-24T07:21:05.4791015Z authentication                                                                                     basic
2022-08-24T07:21:05.4792713Z azure_tenant_id                                                                                         
2022-08-24T07:21:05.4795023Z azure_app_client_id                                                                                     
2022-08-24T07:21:05.4796501Z azure_app_client_secret                                                                                 
2022-08-24T07:21:05.4798857Z azure_app_client_certificate                                                                            
2022-08-24T07:21:05.4800402Z azure_app_client_certificate_password                                                                   
2022-08-24T07:21:05.4802512Z username                                                                       *****\******
2022-08-24T07:21:05.4805340Z password                                                                          ***
2022-08-24T07:21:05.4807244Z bccompany                                                                               Sales and Master
2022-08-24T07:21:05.4808869Z artifact_path                                                 F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core
2022-08-24T07:21:05.4810496Z artifact_filter                                                                                    *.app
2022-08-24T07:21:05.4812435Z showdeploymentstatus                                                                                True
2022-08-24T07:21:05.4814268Z checksecondsdelay                                                                                     30
2022-08-24T07:21:05.4815952Z maxtries                                                                                             240
2022-08-24T07:21:05.4816117Z 
2022-08-24T07:21:05.4833386Z 
2022-08-24T07:21:05.4842573Z 
2022-08-24T07:21:05.4969755Z *** For documentation, please visit   : https://www.alops.be/documentation
2022-08-24T07:21:05.4975390Z 
2022-08-24T07:21:05.7586170Z *** ALOps License:
2022-08-24T07:21:05.7607701Z   * Licensed To: Optimum Group BV (RepositoryPer5 License)
2022-08-24T07:21:05.7613529Z 
2022-08-24T07:21:06.5914948Z *** Imported required PS-Functions
2022-08-24T07:21:06.5930735Z *** Parse Task Parameters
2022-08-24T07:21:06.6530301Z *** Creating API Connector with endpoint [https://<serverFQDN>:21003/CLIENT-CLEANBC20/api]
2022-08-24T07:21:06.6761910Z *** API Version: v1.0
2022-08-24T07:21:06.6784288Z *** Interaction Mode: batch
2022-08-24T07:21:06.6810720Z *** API Authentication: Using Basic Authentication [***\*****]
2022-08-24T07:21:06.6881080Z *** List Companies
2022-08-24T07:21:06.6944281Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://<serverFQDN>:21003/client-cleanbc20/api/microsoft/automation/v1.0/companies'
2022-08-24T07:21:06.7510065Z 
2022-08-24T07:21:06.7516671Z 
2022-08-24T07:21:06.7522913Z id                : 1a720a06-7fc2-4c7e-84c8-5427536f0e8c
2022-08-24T07:21:06.7524109Z systemVersion     : 20.1.39764.39901
2022-08-24T07:21:06.7525281Z name              : CRONUS Nederland BV
2022-08-24T07:21:06.7526551Z displayName       : CRONUS Nederland BV
2022-08-24T07:21:06.7526899Z businessProfileId : 
2022-08-24T07:21:06.7527250Z systemCreatedAt   : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7528461Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7528901Z systemModifiedAt  : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7529311Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7529492Z 
2022-08-24T07:21:06.7535402Z id                : cd6292c3-7d1f-4103-adff-212ffaaa178d
2022-08-24T07:21:06.7536034Z systemVersion     : 20.1.39764.39901
2022-08-24T07:21:06.7537274Z name              : ***********
2022-08-24T07:21:06.7538294Z displayName       : ***********
2022-08-24T07:21:06.7538603Z businessProfileId : 
2022-08-24T07:21:06.7538972Z systemCreatedAt   : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7539408Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7541162Z systemModifiedAt  : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7541665Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7541894Z 
2022-08-24T07:21:06.7548280Z id                : b1943dbd-49c3-447f-b1e1-e3c6ed7f053d
2022-08-24T07:21:06.7548734Z systemVersion     : 20.1.39764.39901
2022-08-24T07:21:06.7549995Z name              : ***********
2022-08-24T07:21:06.7550333Z displayName       : ************
2022-08-24T07:21:06.7550633Z businessProfileId : 
2022-08-24T07:21:06.7551577Z systemCreatedAt   : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7552758Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7553282Z systemModifiedAt  : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7554910Z systemModifiedBy  : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7555122Z 
2022-08-24T07:21:06.7559152Z id                : 745cb08d-7948-4036-a878-e8feaac16c73
2022-08-24T07:21:06.7559551Z systemVersion     : 20.1.39764.39901
2022-08-24T07:21:06.7559868Z name              : Sales and Master
2022-08-24T07:21:06.7560229Z displayName       : Sales & Master
2022-08-24T07:21:06.7560545Z businessProfileId : 
2022-08-24T07:21:06.7561790Z systemCreatedAt   : 0001-01-01T00:00:00Z
2022-08-24T07:21:06.7562393Z systemCreatedBy   : 00000000-0000-0000-0000-000000000000
2022-08-24T07:21:06.7563650Z systemModifiedAt  : 2021-12-11T16:42:29.563Z
2022-08-24T07:21:06.7564045Z systemModifiedBy  : 3feb37ba-6924-468a-ac14-fb3833abe258
2022-08-24T07:21:06.7564162Z 
2022-08-24T07:21:06.7564248Z 
2022-08-24T07:21:06.7566754Z 
2022-08-24T07:21:06.7611910Z *** Determine Company with filter [Sales and Master]
2022-08-24T07:21:06.7650237Z *** Selected Company: Sales and Master [745cb08d-7948-4036-a878-e8feaac16c73]
2022-08-24T07:21:06.7728148Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://<serverFQDN>:21003/client-cleanbc20/api/microsoft/automation/v1.0/companies(745cb08d-7948-4036-a878-e8feaac16c73)/extensions'
2022-08-24T07:21:06.8432424Z *** Installed Extensions:
2022-08-24T07:21:06.8469863Z 
2022-08-24T07:21:06.8678821Z publisher               displayName                                 version id                                  
2022-08-24T07:21:06.8684201Z ---------               -----------                                 ------- --                                  
2022-08-24T07:21:06.8687422Z 2-Control B.V.          Compliance Essentials                       3.1     88e22f72-96ed-4a1b-b1db-7a94038e715e
2022-08-24T07:21:06.8691631Z 2-Control B.V.          Compliance Field Security                   3.1     a6445f6e-b8cd-49ac-81b0-174656511165
2022-08-24T07:21:06.8695687Z 2-Control B.V.          Compliance Field Validation                 3.1     3a298cf4-022e-4157-9b48-f077781d5658
2022-08-24T07:21:06.8699635Z Apportunix              Document Creator                            2.6     e55908d7-0741-4ffd-ab42-10ad0fa3f028
2022-08-24T07:21:06.8703029Z Apportunix              Document Creator On-Premise                 1.40    16e93bd5-727e-46ab-8efa-a68e4d0453e3
2022-08-24T07:21:06.8706899Z Apportunix              Monet                                       1.38    e0f70cf5-3004-4fd7-9ec0-0efe161a6f20
2022-08-24T07:21:06.8711169Z Apportunix              PDF Merge                                   1.6     aed24191-109d-4004-b0c2-760d3e3bc218
2022-08-24T07:21:06.8715616Z Apportunix              System Library                              1.34    b89eeffd-50f1-4628-950e-857a0ab9edca
2022-08-24T07:21:06.8718744Z Continia Software       Continia Core                               6.2     4b915d7e-c02a-435f-85ab-649086c1e002
2022-08-24T07:21:06.8723286Z Continia Software       Continia Delivery Network                   3.2     0745e76d-0b72-4641-87c2-ee45db5d2c32
2022-08-24T07:21:06.8727445Z Continia Software       Continia Document Capture 365               9.2     6da8dd2f-e698-461f-9147-8e404244dd85
2022-08-24T07:21:06.8731722Z Continia Software       Continia Document Capture 365 OnPremise     9.2     424886e9-d07d-47b1-848a-cf87921a2b2b
2022-08-24T07:21:06.8735613Z Continia Software       Continia Document Output 365                6.2     f4b69b55-c90d-4937-8f53-2742898fa948
2022-08-24T07:21:06.8739653Z Continia Software       Continia Expense Management 365             9.2     8d4eab29-8c7f-4b6c-be9a-b7fdfb9da196
2022-08-24T07:21:06.8743553Z ForNAV                  Customizable Report Pack                    6.3     83326d6d-11f8-49fd-981a-6f266a7c8d81
2022-08-24T07:21:06.8747198Z ForNAV                  ForNAV Core                                 6.3     6f0293d3-86fc-4ff8-9632-54a580be6546
2022-08-24T07:21:06.8751324Z ForNAV                  ForNAV Language Module                      6.3     f94c6dff-0118-4c1d-a7d4-382033529ed3
2022-08-24T07:21:06.8754793Z ForNAV                  ForNAV Service                              6.3     2c82e6bf-102b-45e1-89b0-904f86fbd0a4
2022-08-24T07:21:06.8758755Z IDYN B.V.               ShipIT 365                                  20.7    9e0ee02b-484d-4487-8d74-961ece2357c0
2022-08-24T07:21:06.8762529Z Microsoft               AMC Banking 365 Fundamentals                20.1    16319982-4995-4fb1-8fb2-2b1e13773e3b
2022-08-24T07:21:06.8766132Z Microsoft               Application                                 20.1    c1335042-3002-4257-bf8a-75c898ccb1b8
2022-08-24T07:21:06.8769997Z Microsoft               Base Application                            20.1    437dbf0e-84ff-417a-965d-ed2bb9650972
2022-08-24T07:21:06.8772939Z Microsoft               Company Hub                                 20.1    c512d720-63b9-4b26-b062-a0c09b4ed322
2022-08-24T07:21:06.8776930Z Microsoft               Data Archive                                20.1    7819d79d-feea-4f09-bbed-5bbaca4bf323
2022-08-24T07:21:06.8780118Z Microsoft               Digital Tax Declaration for the Netherlands 20.1    59909dc2-6adb-43e7-9f83-1e4fa2be0b37
2022-08-24T07:21:06.8783732Z Microsoft               Email - Current User Connector              20.1    08d69832-9231-429e-be2c-8bab2c96905b
2022-08-24T07:21:06.8787074Z Microsoft               Email - Microsoft 365 Connector             20.1    aceb66c8-472e-437c-81d3-27e6c07d0f14
2022-08-24T07:21:06.8791367Z Microsoft               Email - Outlook REST API                    20.1    e6328152-bb29-4664-9dae-3bc7eaae1fd8
2022-08-24T07:21:06.8795211Z Microsoft               Email - SMTP API                            20.1    8fc50dfb-d338-4fd9-9499-5e44cc8cbf50
2022-08-24T07:21:06.8798836Z Microsoft               Email - SMTP Connector                      20.1    68e13fa3-217a-4be0-9141-99e5bf0ca818
2022-08-24T07:21:06.8803113Z Microsoft               Essential Business Headlines                20.1    2a89f298-7ffd-44a5-a7ce-e08dac98abce
2022-08-24T07:21:06.8807203Z Microsoft               Late Payment Prediction                     20.1    3d5b2137-efeb-4014-8489-41d37f8fd4c3
2022-08-24T07:21:06.8811225Z Microsoft               OnPrem Permissions                          20.1    8ac0f4d5-2f64-438c-8441-3cabccd78edc
2022-08-24T07:21:06.8815094Z Microsoft               Payment Links to PayPal                     20.1    d09fa965-9a2a-424d-b704-69f3b54ed0ce
2022-08-24T07:21:06.8819016Z Microsoft               Performance Toolkit                         20.1    75f1590f-55c5-4501-ae63-bada5534e852
2022-08-24T07:21:06.8822788Z Microsoft               Sales and Inventory Forecast                20.1    c526b3e9-b8ca-4683-81ba-fcd5f6b1472a
2022-08-24T07:21:06.8825797Z Microsoft               Send To Email Printer                       20.1    8c972578-fe72-4aa5-ae51-cc5575fef2ea
2022-08-24T07:21:06.8829770Z Microsoft               Simplified Bank Statement Import            20.1    79b1a79a-2f66-4736-bc1b-8abb3537eb51
2022-08-24T07:21:06.8834902Z Microsoft               System Application                          20.1    63ca2fa4-4f03-4f2b-a480-172fef340d3f
2022-08-24T07:21:06.8837587Z Microsoft               Test Runner                                 20.1    23de40a6-dfe8-4f80-80db-d70f83ce8caf
2022-08-24T07:21:06.8842296Z Microsoft               Troubleshoot FA Ledger Entries              20.1    7961e9dc-a8e5-49b1-839b-3a78803a4cb8
2022-08-24T07:21:06.8846528Z Microsoft               Universal Print Integration                 20.1    2654d7e7-9afd-4947-9e02-6bb8f3e0cd04
2022-08-24T07:21:06.8851124Z Microsoft               VAT Group Management                        20.1    c50a4bf0-db51-4ad2-88d5-fe2287da0eb8
2022-08-24T07:21:06.8855766Z Microsoft               WorldPay Payments Standard                  20.1    bae453ed-0fd8-4416-afdc-4b09db6c12c3
2022-08-24T07:21:06.8860041Z NovaVision Software A/S PrintVis                                    20.4    5452f323-059e-499a-9753-5d2c07eef904
2022-08-24T07:21:06.8864542Z NovaVision Software A/S PrintVis CIM                                20.4    fe465ad6-34b0-46b0-a1e2-23b28db843d2
2022-08-24T07:21:06.8868841Z NovaVision Software A/S PrintVis Local File Mgt                     20.4    4c7ebe3a-8ce8-448f-95e4-569174e93e1e
2022-08-24T07:21:06.8873022Z NovaVision Software A/S PrintVis SalesOrder Integration             20.4    40b0253d-910d-43db-92ce-03682508a75e
2022-08-24T07:21:06.8877236Z NovaVision Software A/S PrintVis Sync                               20.4    4e1b96c0-f6a4-419f-a402-727b840ab514
2022-08-24T07:21:06.8881321Z NovaVision Software A/S PrintVis System Library                     20.4    a1775e0b-ae52-43ed-9eb9-8e23a6214831
2022-08-24T07:21:06.8885486Z Optimum Group           OGDT Core                                   20.1    86f674f1-0913-437a-955d-d6e5b062ce46
2022-08-24T07:21:06.8889663Z Optimum Group           OGDT System Management                      18.6    deb5004b-2570-4432-a238-f4b13a7a7ac0
2022-08-24T07:21:06.8893861Z Optimum Group           OGDT Translation                            18.6    d312b522-4718-441a-95ca-be9d1b490a5b
2022-08-24T07:21:06.8897949Z Sana Commerce           Sana - customization for Optimum Group      1.0     1cb4ae73-09ab-433e-8e40-f1a6e0857c0b
2022-08-24T07:21:06.8902012Z Sana Commerce           Sana Commerce (RoW) - On Premises           10.0    530176f7-9f0d-467b-8b30-a321d5d4b59d
2022-08-24T07:21:06.8906499Z To-Increase B.V.        ANY                                         19.0    616362bc-06df-44fa-bc87-17a0371ffc2d
2022-08-24T07:21:06.8910707Z To-Increase B.V.        TI-BIS                                      20.0    9b0fdadc-3c4a-4dc4-82bf-6ac1c4bd5d71
2022-08-24T07:21:06.8914987Z To-Increase B.V.        TI-Common                                   19.0    3d24078f-27f6-4e56-b448-15adbb4f9858
2022-08-24T07:21:06.8919182Z To-Increase B.V.        TI-EDI Studio                               19.0    cb85fd03-387d-434a-951d-77ee24729f05
2022-08-24T07:21:06.8919450Z 
2022-08-24T07:21:06.8921411Z 
2022-08-24T07:21:06.8929858Z 
2022-08-24T07:21:06.8941363Z *** Published Extensions (not installed):
2022-08-24T07:21:06.8960423Z 
2022-08-24T07:21:06.9024468Z *** Import NAV/BC Management DLL's
2022-08-24T07:21:06.9074836Z *** ServiceTier not specified, loading default assemblies.
2022-08-24T07:21:06.9116996Z *** Default Assemblies not found. Load via BC-Artifacts
2022-08-24T07:21:06.9153179Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2022-08-24T07:21:06.9191397Z *** Check BcContainerHelper
2022-08-24T07:21:06.9496781Z *** Load BcContainerHelper
2022-08-24T07:21:07.1033378Z BcContainerHelper version 2.0.19
2022-08-24T07:21:07.7725527Z 
2022-08-24T07:21:07.7726118Z ModuleType Version    Name                                ExportedCommands                                             
2022-08-24T07:21:07.7726384Z ---------- -------    ----                                ----------------                                             
2022-08-24T07:21:07.7727174Z Script     2.0.19     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...
2022-08-24T07:21:07.7727526Z 
2022-08-24T07:21:07.7727681Z 
2022-08-24T07:21:07.7727777Z 
2022-08-24T07:21:07.7732639Z 
2022-08-24T07:21:07.7765003Z ##[command]"Get-BCArtifactUrl" 
2022-08-24T07:21:07.7765501Z Name                           Value                                                                                   
2022-08-24T07:21:07.7765977Z ----                           -----                                                                                   
2022-08-24T07:21:07.7766468Z select                         Latest                                                                                  
2022-08-24T07:21:07.7766929Z type                           OnPrem                                                                                  
2022-08-24T07:21:07.7767393Z country                        W1                                                                                      
2022-08-24T07:21:07.7767649Z 
2022-08-24T07:21:07.7767801Z 
2022-08-24T07:21:07.7768090Z  -select: Latest -type: OnPrem -country: W1
2022-08-24T07:21:10.2471248Z *** Platform: C:\bcartifacts.cache\onprem\20.4.44313.44365\platform
2022-08-24T07:21:10.2505026Z *** Localisation: C:\bcartifacts.cache\onprem\20.4.44313.44365\w1
2022-08-24T07:21:10.2789562Z *** BC Management DLL: C:\bcartifacts.cache\onprem\20.4.44313.44365\platform\ServiceTier\program files\Microsoft Dynamics NAV\200\Service\Microsoft.Dynamics.Nav.Management.dll
2022-08-24T07:21:10.3203140Z *** BC App Management DLL: C:\bcartifacts.cache\onprem\20.4.44313.44365\platform\ServiceTier\program files\Microsoft Dynamics NAV\200\Service\Microsoft.Dynamics.Nav.Apps.Management.dll
2022-08-24T07:21:10.3388301Z *** BC NCL Management DLL: C:\bcartifacts.cache\onprem\20.4.44313.44365\platform\ServiceTier\program files\Microsoft Dynamics NAV\200\Service\Microsoft.Dynamics.Nav.Ncl.dll
2022-08-24T07:21:10.6190857Z *** BC Types DLL: C:\bcartifacts.cache\onprem\20.4.44313.44365\platform\ServiceTier\program files\Microsoft Dynamics NAV\200\Service\Microsoft.Dynamics.Nav.Types.dll
2022-08-24T07:21:10.6203350Z *** Batch Publish Extensions
2022-08-24T07:21:10.6214747Z   * Artifact Path  : F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core
2022-08-24T07:21:10.6419268Z *** Resolved Path  : F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core
2022-08-24T07:21:10.6429272Z *** Get Available Applications from [F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core].
2022-08-24T07:21:10.6478920Z *** Get [*.app] files recursive from [F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core]
2022-08-24T07:21:10.6511483Z *** Found [1] files.
2022-08-24T07:21:10.6521817Z *** Extract App detail from [F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core\PrintVis Business Central\Optimum Group_OGDT Core_20.1.202235.9663_APP.app]
2022-08-24T07:21:10.7404887Z *** Installing Applications:
2022-08-24T07:21:10.7409429Z 
2022-08-24T07:21:10.7419201Z Publisher     Name      Path                                                                                           
2022-08-24T07:21:10.7422729Z ---------     ----      ----                                                                                           
2022-08-24T07:21:10.7457438Z Optimum Group OGDT Core F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core\PrintVis Business Central\Optimum Group_OGDT Core...
2022-08-24T07:21:10.7457785Z 
2022-08-24T07:21:10.7458763Z 
2022-08-24T07:21:10.7483379Z *** Publish App [F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core\PrintVis Business Central\Optimum Group_OGDT Core_20.1.202235.9663_APP.app]
2022-08-24T07:21:10.7578481Z *** Upload extension [F:\ADOAgents\Agent1\_work\r43\a\_OGDT Core\PrintVis Business Central\Optimum Group_OGDT Core_20.1.202235.9663_APP.app]
2022-08-24T07:21:10.7591499Z *** Get App Info
2022-08-24T07:21:10.7729691Z  * App.ID        = 86f674f1-0913-437a-955d-d6e5b062ce46
2022-08-24T07:21:10.7740075Z  * App.Name      = OGDT Core
2022-08-24T07:21:10.7751432Z  * App.Publisher = Optimum Group
2022-08-24T07:21:10.7761162Z  * App.Version   = 20.1.202235.9663
2022-08-24T07:21:10.7810135Z *** Get Extension status
2022-08-24T07:21:10.7822898Z ##[command]Invoke-RestMethod -Method Get -Uri 'https://<serverFQDN>:21003/client-cleanbc20/api/microsoft/automation/v1.0/companies(745cb08d-7948-4036-a878-e8feaac16c73)/extensions'
2022-08-24T07:21:10.8880354Z ##[command]Invoke-RestMethod -Method Patch -Uri 'https://<serverFQDN>:21003/client-cleanbc20/api/microsoft/automation/v1.0/companies(745cb08d-7948-4036-a878-e8feaac16c73)/extensionUpload(0)/content'
2022-08-24T07:22:09.5692828Z ##[error]{"error":{"code":"Unknown","message":"An administrator changed one or more extensions in the application, so the page that you were working on had to be closed.  CorrelationId:  4f2ae163-366f-47a0-baf0-930afcf3c4c3."}}
2022-08-24T07:22:09.6035124Z ##[section]Finishing: Batch Publish OGDT Core

Expected behavior Expected behaviour is that the pipeline continues without this error

Screenshots image

Additional context This error does not occur on our BC18 environment

waldo1001 commented 2 years ago

Hi,

The ALOps Extension API is merely the API call - since this is working, it seems find.

The deployment is (educated guess) ALOps.ExternalDeployer - and that one is ging back the error, I assume.

Is this always happening with every deploy or just once? If once - could it be that at that point, someone was either opening the deployment status page (which you shouldn't do), or working in the extension management page?

petertijsma commented 2 years ago

I've seen this at (almost) every deployment in BC20. One difference with BC18 is that for this TST Environment with BC20, I'm not first stopping the Client Service Instances. On the other hand, this should not be necessary. Also, I was not even actively working in the system when the Deployment ran, so no-one was even on the Deployment Page, nor am I updating something related to this page.

Latest output from the ALOps.ExternalDeployer (the last one from approx 1 hour ago):

2022-08-24T13:44:35.1378Z *** Package Data File => [C:\Users\svc_navision\AppData\Local\Temp\tmp5779.tmp.app]
2022-08-24T13:44:35.1458Z *** ServerInstance = [CLIENT-CLEANBC20]
2022-08-24T13:44:35.1508Z *** ContainerId = []
2022-08-24T13:44:35.1538Z *** Tenant = [default]
2022-08-24T13:44:35.1588Z *** Loading ALOps.ExternalDeployer
2022-08-24T13:44:35.8468Z *** Loading assemblies from: [C:\program files\microsoft dynamics 365 business central\200\service]
2022-08-24T13:44:36.0178Z  * App.ID        = 86f674f1-0913-437a-955d-d6e5b062ce46
2022-08-24T13:44:36.0228Z  * App.Name      = OGDT Core
2022-08-24T13:44:36.0278Z  * App.Publisher = Optimum Group
2022-08-24T13:44:36.0328Z  * App.Version   = 20.1.202235.9703
2022-08-24T13:44:36.4838Z  => Publishing App 'OGDT Core v20.1.202235.9703'
2022-08-24T13:44:36.4898Z *** Publish per Tenant
2022-08-24T13:44:46.6559Z *** Get Tenants
2022-08-24T13:44:46.8449Z *** Sync Tenant default
2022-08-24T13:44:46.8819Z *** Sync App [OGDT Core] on tenant [default]
2022-08-24T13:44:49.0499Z *** Tenant Dataupgrade default
2022-08-24T13:45:28.8917Z *** Install App [OGDT Core] on tenant [default]
2022-08-24T13:45:28.9577Z  * UnPublishing Old App 'OGDT Core v20.1.202235.9663'.

And the Pipeline shows this: image

waldo1001 commented 2 years ago

Can you check upgrade/install code, try to debug? Can you check if you're doing something funky in your extension? For example anything that has extended objects that are necessary during deployment?

The upload on page is a different feedback than the API:

We need to search for the thing that fails the deployment throught the API .. 🤔. I'm assuming it's only 1 app that fails? or is this is general failure of all apps?

petertijsma commented 2 years ago

Can you check upgrade/install code, try to debug? No Upgrade Code active in the latest deployments, nor any debugging going on

Can you check if you're doing something funky in your extension? For example anything that has extended objects that are necessary during deployment? Not to my knowledge, and why should this then only occur in BC20 and not in BC18

page shows output of the ExternalDeployer (is a json-file somewhere on the server) If you can tell me where to find this, I will have a look

I'm assuming it's only 1 app that fails? or is this is general failure of all apps? Currently only one App, but will try to deploy another one to see how that goes

petertijsma commented 2 years ago

I'm assuming it's only 1 app that fails? or is this is general failure of all apps?

How frustrating! Indeed only that app...... image

Will try to find what weird 'funky' stuff is going on in the app...

waldo1001 commented 2 years ago

Good luck ;-)

petertijsma commented 2 years ago

Issue probably found:

image

Already requested a fix in the suppliers app code. Problem is that we extended their User Setup table through our code and of course hat's updated.

I think this issue can now be closed

waldo1001 commented 2 years ago

Yep - any "OnXXCompanyXX" are events to be avoided ;-)

Thanks for reporting back!