microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
379 stars 243 forks source link

Error removing container (different than the last one). #1932

Closed GreatScott000 closed 3 years ago

GreatScott000 commented 3 years ago

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue Getting this error running my pipeline

The remote server returned an error: (404) Not Found. No published package matches the provided arguments.

This is a different message than #1927

Scripts used to create container and cause the issue

DevOps-Pipeline.ps1

Param(
    [Parameter(Mandatory=$false)]
    [ValidateSet('AzureDevOps','GithubActions','GitLab')]
    [string] $environment = 'AzureDevOps',
    [Parameter(Mandatory=$true)]
    [string] $version,
    [Parameter(Mandatory=$false)]
    [int] $appBuild = 0,
    [Parameter(Mandatory=$false)]
    [int] $appRevision = 0
)

if ($environment -eq "AzureDevOps") {
    $buildArtifactFolder = $ENV:BUILD_ARTIFACTSTAGINGDIRECTORY
}
elseif ($environment -eq "GitHubActions") {
    $buildArtifactFolder = Join-Path $ENV:GITHUB_WORKSPACE "output"
    New-Item $buildArtifactFolder -ItemType Directory | Out-Null
}

$baseFolder = (Get-Item (Join-Path $PSScriptRoot "..")).FullName
. (Join-Path $PSScriptRoot "Read-Settings.ps1") -environment $environment -version $version
. (Join-Path $PSScriptRoot "Install-BcContainerHelper.ps1") -bcContainerHelperVersion $bcContainerHelperVersion -genericImageName $genericImageName

$params = @{}
$insiderSasToken = "$ENV:insiderSasToken"
$licenseFile = "$ENV:licenseFile"
$codeSigncertPfxFile = "$ENV:CodeSignCertPfxFile"
if (!$doNotSignApps -and $codeSigncertPfxFile) {
    if ("$ENV:CodeSignCertPfxPassword" -ne "") {
        $codeSignCertPfxPassword = try { "$ENV:CodeSignCertPfxPassword" | ConvertTo-SecureString } catch { ConvertTo-SecureString -String "$ENV:CodeSignCertPfxPassword" -AsPlainText -Force }
        $params = @{
            "codeSignCertPfxFile" = $codeSignCertPfxFile
            "codeSignCertPfxPassword" = $codeSignCertPfxPassword
        }
    }
    else {
        $codeSignCertPfxPassword = $null
    }
}

$allTestResults = "testresults*.xml"
$testResultsFile = Join-Path $baseFolder "TestResults.xml"
$testResultsFiles = Join-Path $baseFolder $allTestResults
if (Test-Path $testResultsFiles) {
    Remove-Item $testResultsFiles -Force
}

Run-AlPipeline @params `
    -pipelinename $pipelineName `
    -containerName $containerName `
    -imageName $imageName `
    -artifact $artifact.replace('{INSIDERSASTOKEN}',$insiderSasToken) `
    -memoryLimit $memoryLimit `
    -baseFolder $baseFolder `
    -licenseFile $LicenseFile `
    -installApps $installApps `
    -previousApps $previousApps `
    -appFolders $appFolders `
    -testFolders $testFolders `
    -doNotRunTests:$doNotRunTests `
    -testResultsFile $testResultsFile `
    -testResultsFormat 'JUnit' `
    -installTestFramework:$installTestFramework `
    -installTestLibraries:$installTestLibraries `
    -installPerformanceToolkit:$installPerformanceToolkit `
    -enableCodeCop:$enableCodeCop `
    -enableAppSourceCop:$enableAppSourceCop `
    -enablePerTenantExtensionCop:$enablePerTenantExtensionCop `
    -enableUICop:$enableUICop `
    -azureDevOps:($environment -eq 'AzureDevOps') `
    -gitLab:($environment -eq 'GitLab') `
    -gitHubActions:($environment -eq 'GitHubActions') `
    -AppSourceCopMandatoryAffixes $appSourceCopMandatoryAffixes `
    -AppSourceCopSupportedCountries $appSourceCopSupportedCountries `
    -additionalCountries $additionalCountries `
    -buildArtifactFolder $buildArtifactFolder `
    -CreateRuntimePackages:$CreateRuntimePackages `
    -appBuild $appBuild -appRevision $appRevision `
    -rulesetFile $rulesetfile `
    -vsixFile (Get-LatestAlLanguageExtensionUrl)

if ($environment -eq 'AzureDevOps') {
    Write-Host "##vso[task.setvariable variable=TestResults]$allTestResults"
}

Cleanup.ps1

Param(
    [Parameter(Mandatory=$false)]
    [ValidateSet('Local', 'AzureDevOps', 'GithubActions', 'GitLab')]
    [string] $environment = 'Local'
)

. (Join-Path $PSScriptRoot "Read-Settings.ps1") -environment $environment

if ("$AgentName" -ne "Hosted Agent" -and "$AgentName" -notlike "Azure Pipelines*") {
    . (Join-Path $PSScriptRoot "Install-BcContainerHelper.ps1") -bcContainerHelperVersion $bcContainerHelperVersion

    $cleanupMutexName = "Cleanup"
    $cleanupMutex = New-Object System.Threading.Mutex($false, $cleanupMutexName)
    try {
        try {
            if (!$cleanupMutex.WaitOne(1000)) {
                Write-Host "Waiting for other process to finish cleanup"
                $cleanupMutex.WaitOne() | Out-Null
                Write-Host "Other process completed"
            }
        }
        catch [System.Threading.AbandonedMutexException] {
           Write-Host "Other process terminated abnormally"
        }

        Remove-BcContainer -containerName $containerName
        Flush-ContainerHelperCache -KeepDays 2

        Remove-Module BcContainerHelper
        $path = Join-Path $ENV:Temp $containerName
        if (Test-Path $path) {
            Remove-Item $path -Recurse -Force
        }
    }
    finally {
        $cleanupMutex.ReleaseMutex()
    }
}

YAML:

trigger:
- master

pool:
  vmImage: 'Windows-Latest'

variables:
- group: BuildVariables

jobs:
- job: Build
  timeoutInMinutes: 300
  variables:
    build.clean: all
    platform: x64
    version: 'ci'
    appVersion: '17.0'
    appBuild: $(Build.BuildID)
    appRevision: 0
    skipComponentGovernanceDetection: True

  steps:
  - task: PowerShell@2
    displayName: 'Set BuildNumber'
    inputs:
      targetType: inline
      script: 'Write-Host "##vso[build.updatebuildnumber]$(appVersion).$(appBuild).$(appRevision)"'

  - task: PowerShell@2
    displayName: 'Run Pipeline'
    env:
      InsiderSasToken: '$(InsiderSasToken)'
      LicenseFile: '$(LicenseFile)'
      CodeSignCertPfxFile: '$(CodeSignCertPfxFile)'
      CodeSignCertPfxPassword: '$(CodeSignCertPfxPassword)'
    inputs:
      targetType: filePath
      filePath: '_scripts\DevOps-Pipeline.ps1'
      arguments: '-environment "AzureDevOps" -version "$(version)" -appBuild $(appBuild) -appRevision $(appRevision)'
      failOnStderr: true

  - task: PublishTestResults@2
    displayName: 'Publish Test Results'
    condition: and(succeeded(),ne(variables['TestResults'],''))
    inputs:
      testResultsFormat: JUnit
      testResultsFiles: '$(testResults)'
      failTaskOnFailedTests: true

  - task: PublishBuildArtifacts@1
    displayName: 'Publish Artifacts'
    inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)'
      ArtifactName: output

  - task: PowerShell@2
    displayName: 'Cleanup'
    condition: always()
    inputs:
      targetType: filePath
      filePath: '_scripts\Cleanup.ps1'
      arguments: '-environment "AzureDevOps"'
      failOnStderr: false

Full output of scripts

2021-05-19T15:16:07.6724899Z ##[section]Starting: Run Pipeline
2021-05-19T15:16:07.6850034Z ==============================================================================
2021-05-19T15:16:07.6850430Z Task         : PowerShell
2021-05-19T15:16:07.6850763Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2021-05-19T15:16:07.6851077Z Version      : 2.180.1
2021-05-19T15:16:07.6851348Z Author       : Microsoft Corporation
2021-05-19T15:16:07.6851738Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2021-05-19T15:16:07.6852158Z ==============================================================================
2021-05-19T15:16:08.6513359Z Generating script.
2021-05-19T15:16:08.6573582Z Formatted command: . 'D:\a\1\s\_scripts\DevOps-Pipeline.ps1' -environment "AzureDevOps" -version "ci" -appBuild 356 -appRevision 0
2021-05-19T15:16:08.6979273Z ========================== Starting Command Output ===========================
2021-05-19T15:16:08.7254194Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\7a1c967a-6927-4fe8-a223-fa5c501236fa.ps1'"
2021-05-19T15:16:09.1969671Z Set artifact = https://bcartifacts.azureedge.net/onprem/17.2.19367.19735/gb
2021-05-19T15:16:09.2052423Z Set pipelineName = FinTools-ci
2021-05-19T15:16:09.2070251Z Set containerName = hostedagent-fintools-ci
2021-05-19T15:16:09.2266191Z Set installApps = ''
2021-05-19T15:16:09.2300222Z Set previousApps = ''
2021-05-19T15:16:09.2378425Z Set appSourceCopMandatoryAffixes = 'iMS'
2021-05-19T15:16:09.2391244Z Set appSourceCopSupportedCountries = 'gb'
2021-05-19T15:16:09.2409356Z Set appFolders = 'DayBook,SourceNames,TrialBalance,VATAudit,VATReturn'
2021-05-19T15:16:09.2443096Z Set testFolders = 'TrialBalance.Test'
2021-05-19T15:16:09.2469034Z Set memoryLimit = '6G'
2021-05-19T15:16:09.2495189Z Set additionalCountries = ''
2021-05-19T15:16:09.2525026Z Set genericImageName = ''
2021-05-19T15:16:09.2555075Z Set vaultNameForLocal = 'EvolveAppVault'
2021-05-19T15:16:09.2585594Z Set bcContainerHelperVersion = 'Latest'
2021-05-19T15:16:09.2633804Z Set installTestFramework = True
2021-05-19T15:16:09.2679091Z Set installTestLibraries = True
2021-05-19T15:16:09.2708873Z Set installPerformanceToolkit = False
2021-05-19T15:16:09.2737923Z Set enableCodeCop = True
2021-05-19T15:16:09.2839845Z Set enableAppSourceCop = True
2021-05-19T15:16:09.2898547Z Set enablePerTenantExtensionCop = False
2021-05-19T15:16:09.2928685Z Set enableUICop = True
2021-05-19T15:16:09.2958815Z Set doNotSignApps = True
2021-05-19T15:16:09.2968544Z Set doNotRunTests = False
2021-05-19T15:16:09.2998378Z Set cacheImage = True
2021-05-19T15:16:09.3026700Z Set CreateRuntimePackages = True
2021-05-19T15:16:09.3073652Z Set rulesetfile = '_RuleSets\ims.ruleset.json'
2021-05-19T15:16:09.3103468Z Set appPackages = '.packages'
2021-05-19T15:16:09.9018575Z Downloading https://bccontainerhelper.azureedge.net/public/2.0.12.zip
2021-05-19T15:16:18.9520864Z BcContainerHelper version 2.0.12
2021-05-19T15:16:20.3641813Z   _____                               _                
2021-05-19T15:16:20.3654656Z  |  __ \                             | |               
2021-05-19T15:16:20.3667040Z  | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___ 
2021-05-19T15:16:20.3677456Z  |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
2021-05-19T15:16:20.3689199Z  | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
2021-05-19T15:16:20.3700863Z  |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/
2021-05-19T15:16:20.3701675Z 
2021-05-19T15:16:20.3712860Z Pipeline name               FinTools-ci
2021-05-19T15:16:20.4481899Z Container name              hostedagent-fintools-ci
2021-05-19T15:16:20.4491943Z Image name                  
2021-05-19T15:16:20.4501849Z ArtifactUrl                 https://bcartifacts.azureedge.net/onprem/17.2.19367.19735/gb
2021-05-19T15:16:20.4512579Z SasToken                    Not Specified
2021-05-19T15:16:20.4533353Z BcAuthContext               Not Specified
2021-05-19T15:16:20.4544559Z Environment                 
2021-05-19T15:16:20.4615206Z ReUseContainer              False
2021-05-19T15:16:20.4617769Z KeepContainer               False
2021-05-19T15:16:20.4619564Z Credential                  admin/Hoge4606
2021-05-19T15:16:20.4624730Z MemoryLimit                 6G
2021-05-19T15:16:20.4634181Z Enable Task Scheduler       False
2021-05-19T15:16:20.4635987Z Assign Premium Plan         False
2021-05-19T15:16:20.4637251Z Install Test Runner         False
2021-05-19T15:16:20.4642175Z Install Test Framework      True
2021-05-19T15:16:20.4643339Z Install Test Libraries      True
2021-05-19T15:16:20.4647582Z Install Perf. Toolkit       False
2021-05-19T15:16:20.4648519Z CopySymbolsFromContainer    False
2021-05-19T15:16:20.4649187Z enableCodeCop               True
2021-05-19T15:16:20.4649864Z enableAppSourceCop          True
2021-05-19T15:16:20.4650600Z enableUICop                 True
2021-05-19T15:16:20.4651232Z enablePerTenantExtensionCop False
2021-05-19T15:16:20.4652005Z escapeFromCops              False
2021-05-19T15:16:20.4654750Z useDefaultAppSourceRuleSet  False
2021-05-19T15:16:20.4660243Z rulesetFile                 D:\a\1\s\_RuleSets\ims.ruleset.json
2021-05-19T15:16:20.4676645Z azureDevOps                 True
2021-05-19T15:16:20.4687548Z License file                Specified
2021-05-19T15:16:20.4710218Z CodeSignCertPfxFile         Not specified
2021-05-19T15:16:20.4719710Z TestResultsFile             D:\a\1\s\TestResults.xml
2021-05-19T15:16:20.4742577Z TestResultsFormat           JUnit
2021-05-19T15:16:20.4785285Z AdditionalCountries         
2021-05-19T15:16:20.4796387Z PackagesFolder              D:\a\1\s\.packages
2021-05-19T15:16:20.4809226Z OutputFolder                D:\a\1\s\.output
2021-05-19T15:16:20.4820360Z BuildArtifactFolder         D:\a\1\a
2021-05-19T15:16:20.4834697Z CreateRuntimePackages       True
2021-05-19T15:16:20.4847534Z AppBuild                    356
2021-05-19T15:16:20.4860927Z AppRevision                 0
2021-05-19T15:16:20.4874994Z Mandatory Affixes           iMS
2021-05-19T15:16:20.4887596Z Supported Countries         gb
2021-05-19T15:16:20.4895796Z Install Apps
2021-05-19T15:16:20.4899241Z - None
2021-05-19T15:16:20.4907049Z Install Test Apps
2021-05-19T15:16:20.4912338Z - None
2021-05-19T15:16:20.4920384Z Previous Apps
2021-05-19T15:16:20.4924399Z - None
2021-05-19T15:16:20.4932670Z Application folders
2021-05-19T15:16:20.4946219Z - D:\a\1\s\SourceNames
2021-05-19T15:16:20.4951123Z - D:\a\1\s\TrialBalance
2021-05-19T15:16:20.4959904Z - D:\a\1\s\VATAudit
2021-05-19T15:16:20.4969638Z - D:\a\1\s\VATReturn
2021-05-19T15:16:20.4973314Z Test application folders
2021-05-19T15:16:20.4981206Z - D:\a\1\s\TrialBalance.Test
2021-05-19T15:16:20.5050756Z 
2021-05-19T15:16:20.5058697Z   _____       _ _ _                                          _        _                            
2021-05-19T15:16:20.5062961Z  |  __ \     | | (_)                                        (_)      (_)                           
2021-05-19T15:16:20.5071105Z  | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___ 
2021-05-19T15:16:20.5075353Z  |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
2021-05-19T15:16:20.5082132Z  | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
2021-05-19T15:16:20.5085992Z  |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
2021-05-19T15:16:20.5092720Z                            __/ |   __/ |                                                 __/ |     
2021-05-19T15:16:20.5097591Z                           |___/   |___/                                                 |___/      
2021-05-19T15:16:20.5100138Z 
2021-05-19T15:16:21.2229256Z Pulling mcr.microsoft.com/businesscentral:10.0.17763.1879
2021-05-19T15:20:57.8644953Z 
2021-05-19T15:20:57.8656573Z Pulling generic image took 277 seconds
2021-05-19T15:20:57.8946071Z 
2021-05-19T15:20:57.8955252Z    _____                _   _                               _        _                 
2021-05-19T15:20:57.8960106Z   / ____|              | | (_)                             | |      (_)                
2021-05-19T15:20:57.8968216Z  | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __ 
2021-05-19T15:20:57.8973591Z  | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
2021-05-19T15:20:57.8981531Z  | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |   
2021-05-19T15:20:57.8986399Z   \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|   
2021-05-19T15:20:57.8994252Z                                      __/ |                                             
2021-05-19T15:20:57.8998770Z                                     |___/                                              
2021-05-19T15:20:57.9002100Z 
2021-05-19T15:20:58.4891335Z WARNING: Container name should not exceed 15 characters
2021-05-19T15:20:58.8637293Z BcContainerHelper is version 2.0.12
2021-05-19T15:20:58.8643157Z BcContainerHelper is running as administrator
2021-05-19T15:20:58.8663576Z Host is Microsoft Windows Server 2019 Datacenter - ltsc2019
2021-05-19T15:21:00.4805222Z Docker Client Version is 20.10.4
2021-05-19T15:21:00.4831101Z Docker Server Version is 20.10.4
2021-05-19T15:21:01.1192938Z Downloading application artifact /onprem/17.2.19367.19735/gb
2021-05-19T15:21:01.1574139Z Downloading C:\Users\Vss***istrator\AppData\Local\Temp\d8323f9b-5a5d-43c0-b04d-3374eec3e61f.zip
2021-05-19T15:21:22.5931919Z Unpacking application artifact to tmp folder using 7zip
2021-05-19T15:21:28.6502995Z Downloading platform artifact /onprem/17.2.19367.19735/platform
2021-05-19T15:21:28.6527293Z Downloading C:\Users\Vss***istrator\AppData\Local\Temp\d0cbb4b5-7c72-42f6-a422-a25f1f22857d.zip
2021-05-19T15:21:52.5831225Z Unpacking platform artifact to tmp folder using 7zip
2021-05-19T15:22:08.6505885Z Downloading Prerequisite Components
2021-05-19T15:22:08.6645880Z Downloading c:\bcartifacts.cache\onprem\17.2.19367.19735\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
2021-05-19T15:22:09.1564440Z Downloading c:\bcartifacts.cache\onprem\17.2.19367.19735\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
2021-05-19T15:22:09.1877253Z Downloading c:\bcartifacts.cache\onprem\17.2.19367.19735\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
2021-05-19T15:22:09.3189769Z Fetching all docker images
2021-05-19T15:22:09.7097526Z Fetching all docker volumes
2021-05-19T15:22:10.0502806Z Using image mcr.microsoft.com/businesscentral:10.0.17763.1879
2021-05-19T15:22:11.0503960Z Creating Container hostedagent-fintools-ci
2021-05-19T15:22:11.0508531Z Version: 17.2.19367.19735-gb
2021-05-19T15:22:11.0513629Z Style: onprem
2021-05-19T15:22:11.0524240Z Multitenant: No
2021-05-19T15:22:11.0529118Z Platform: 17.0.19353.19730
2021-05-19T15:22:11.0533958Z Generic Tag: 1.0.1.7
2021-05-19T15:22:11.0581028Z Container OS Version: 10.0.17763.1879 (ltsc2019)
2021-05-19T15:22:11.0588768Z Host OS Version: 10.0.17763.1879 (ltsc2019)
2021-05-19T15:22:11.0608342Z Using process isolation
2021-05-19T15:22:11.0633553Z Using locale en-GB
2021-05-19T15:22:11.0689749Z Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
2021-05-19T15:22:11.1012881Z Downloading C:\ProgramData\BcContainerHelper\Extensions\hostedagent-fintools-ci\Microsoft.VisualStudio.Services.VSIXPackage.vsix
2021-05-19T15:22:11.8688922Z Using license file https://evolveapp.blob.core.windows.net/app/BC18License.flf
2021-05-19T15:22:11.8707430Z Downloading C:\ProgramData\BcContainerHelper\Extensions\hostedagent-fintools-ci\my\license.flf
2021-05-19T15:22:12.1390175Z Additional Parameters:
2021-05-19T15:22:12.1401605Z --volume "D:\a\1\s:c:\sources"
2021-05-19T15:22:12.1406102Z --env customNavSettings=EnableTaskScheduler=False
2021-05-19T15:22:12.1415533Z Files in C:\ProgramData\BcContainerHelper\Extensions\hostedagent-fintools-ci\my:
2021-05-19T15:22:12.1451468Z - AdditionalOutput.ps1
2021-05-19T15:22:12.1458794Z - license.flf
2021-05-19T15:22:12.1467678Z - MainLoop.ps1
2021-05-19T15:22:12.1478689Z - SetupVariables.ps1
2021-05-19T15:22:12.1490975Z - updatehosts.ps1
2021-05-19T15:22:12.1491649Z Creating container hostedagent-fintools-ci from image mcr.microsoft.com/businesscentral:10.0.17763.1879
2021-05-19T15:22:12.7899981Z c19f7670e6e56d7769debb041105aa1b3493a50a2983481d10517074ad1151d7
2021-05-19T15:22:26.6716544Z Waiting for container hostedagent-fintools-ci to be ready
2021-05-19T15:22:56.5146479Z Adding HOSTEDAGENT-FIN to hosts file
2021-05-19T15:22:56.5153119Z Using artifactUrl https://bcartifacts.azureedge.net/onprem/17.2.19367.19735/gb
2021-05-19T15:22:56.5159790Z Using installer from C:\Run\150-new
2021-05-19T15:22:56.5171073Z Installing Business Central
2021-05-19T15:22:56.5177826Z Installing from artifacts
2021-05-19T15:23:00.8748853Z Starting Local SQL Server
2021-05-19T15:23:00.8756837Z WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to 
2021-05-19T15:23:02.3174777Z start...
2021-05-19T15:23:02.3186050Z Starting Internet Information Server
2021-05-19T15:23:02.3189009Z Copying Service Tier Files
2021-05-19T15:23:04.2985707Z c:\dl\onprem\17.2.19367.19735\platform\ServiceTier\Program Files
2021-05-19T15:23:04.2993061Z c:\dl\onprem\17.2.19367.19735\platform\ServiceTier\System64Folder
2021-05-19T15:23:04.3005827Z Copying PowerShell Scripts
2021-05-19T15:23:04.3014189Z c:\dl\onprem\17.2.19367.19735\platform\WindowsPowerShellScripts\Cloud\NAV***istration
2021-05-19T15:23:06.5919548Z c:\dl\onprem\17.2.19367.19735\platform\WindowsPowerShellScripts\WebSearch
2021-05-19T15:23:06.5930084Z Copying dependencies
2021-05-19T15:23:06.5936155Z Copying ReportBuilder
2021-05-19T15:23:06.5944253Z Importing PowerShell Modules
2021-05-19T15:23:17.0718894Z Determining Database Collation from c:\dl\onprem\17.2.19367.19735\gb\database\Demo Database NAV (17-0).bak
2021-05-19T15:23:54.5688057Z Changing Database Server Collation to Latin1_General_100_CI_AS
2021-05-19T15:24:03.4030740Z Restoring CRONUS Demo Database
2021-05-19T15:24:04.6966800Z Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
2021-05-19T15:24:04.6979817Z Modifying Business Central Service Tier Config File for Docker
2021-05-19T15:24:04.6984166Z Creating Business Central Service Tier
2021-05-19T15:24:04.6993010Z Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
2021-05-19T15:24:04.6997941Z Copying Web Client Files
2021-05-19T15:24:04.7009431Z c:\dl\onprem\17.2.19367.19735\platform\WebClient\Microsoft Dynamics NAV
2021-05-19T15:24:04.7012587Z Copying Client Files
2021-05-19T15:24:04.7020763Z c:\dl\onprem\17.2.19367.19735\platform\LegacyDlls\program files\Microsoft Dynamics NAV
2021-05-19T15:24:04.7038589Z c:\dl\onprem\17.2.19367.19735\platform\LegacyDlls\program files\Microsoft Dynamics NAV
2021-05-19T15:24:04.7041504Z c:\dl\onprem\17.2.19367.19735\platform\LegacyDlls\systemFolder
2021-05-19T15:24:04.7046493Z Copying ModernDev Files
2021-05-19T15:24:04.7052919Z c:\dl\onprem\17.2.19367.19735\platform
2021-05-19T15:24:04.7060136Z c:\dl\onprem\17.2.19367.19735\platform\ModernDev\program files\Microsoft Dynamics NAV
2021-05-19T15:24:04.7068503Z Copying additional files
2021-05-19T15:24:04.7073028Z Copying ConfigurationPackages
2021-05-19T15:24:04.7078142Z C:\dl\onprem\17.2.19367.19735\gb\ConfigurationPackages
2021-05-19T15:24:04.7093316Z Copying Test Assemblies
2021-05-19T15:24:04.7107268Z C:\dl\onprem\17.2.19367.19735\platform\Test Assemblies
2021-05-19T15:24:04.7107808Z Copying Applications
2021-05-19T15:24:04.7115434Z C:\dl\onprem\17.2.19367.19735\gb\Applications
2021-05-19T15:25:37.8223245Z Starting Business Central Service Tier
2021-05-19T15:25:39.1963686Z Importing license file
2021-05-19T15:25:39.1964495Z Stopping Business Central Service Tier
2021-05-19T15:25:39.1976089Z Installation took 169 seconds
2021-05-19T15:25:39.1985504Z Installation complete
2021-05-19T15:25:39.1989353Z Initializing...
2021-05-19T15:25:39.1994843Z Setting host.containerhelper.internal to 172.31.16.1 in container hosts file
2021-05-19T15:25:39.2004549Z Starting Container
2021-05-19T15:25:39.2009088Z Hostname is hostedagent-fintools-ci
2021-05-19T15:25:40.9366967Z PublicDnsName is hostedagent-fintools-ci
2021-05-19T15:25:40.9375079Z Using NavUserPassword Authentication
2021-05-19T15:25:43.8540377Z Creating Self Signed Certificate
2021-05-19T15:25:43.8547220Z Self Signed Certificate Thumbprint F62D3472D861168CA9D3BBBA995173CF16FEC774
2021-05-19T15:25:43.8555513Z Modifying Service Tier Config File with Instance Specific Settings
2021-05-19T15:25:43.8565004Z Modifying Service Tier Config File with settings from environment variable
2021-05-19T15:25:45.5322082Z Setting EnableTaskScheduler to False
2021-05-19T15:26:08.4465825Z Starting Service Tier
2021-05-19T15:26:08.4472258Z Registering event sources
2021-05-19T15:26:13.0971982Z Creating DotNetCore Web Server Instance
2021-05-19T15:26:13.0976368Z Using license file 'c:\run\my\license.flf'
2021-05-19T15:26:14.8653409Z Import License
2021-05-19T15:26:14.8666275Z Creating http download site
2021-05-19T15:26:14.8672650Z Setting SA Password and enabling SA
2021-05-19T15:26:14.8682715Z Creating admin as SQL User and add to sysadmin
2021-05-19T15:26:22.4397760Z Creating SUPER user
2021-05-19T15:26:22.4406229Z Container IP Address: 172.31.21.137
2021-05-19T15:26:22.4410810Z Container Hostname  : hostedagent-fintools-ci
2021-05-19T15:26:22.4422952Z Container Dns Name  : hostedagent-fintools-ci
2021-05-19T15:26:22.4427029Z Web Client          : http://hostedagent-fintools-ci/BC/
2021-05-19T15:26:22.4432030Z Dev. Server         : http://hostedagent-fintools-ci
2021-05-19T15:26:24.0881159Z Dev. ServerInstance : BC
2021-05-19T15:26:24.0889890Z Setting hostedagent-fintools-ci to 172.31.21.137 in host hosts file
2021-05-19T15:26:24.0893767Z 
2021-05-19T15:26:24.0900938Z Files:
2021-05-19T15:26:24.0916069Z http://hostedagent-fintools-ci:8080/Microsoft.VisualStudio.Services.VSIXPackage.vsix
2021-05-19T15:26:24.0923362Z 
2021-05-19T15:26:24.0930985Z Container Total Physical Memory is 7.0Gb
2021-05-19T15:26:24.0937504Z Container Free Physical Memory is 3.3Gb
2021-05-19T15:26:24.0940667Z 
2021-05-19T15:26:24.0956430Z Initialization took 45 seconds
2021-05-19T15:26:24.0965741Z Ready for connections!
2021-05-19T15:26:24.1029449Z Reading CustomSettings.config from hostedagent-fintools-ci
2021-05-19T15:26:26.1280125Z Creating Desktop Shortcuts for hostedagent-fintools-ci
2021-05-19T15:26:26.6459977Z Container hostedagent-fintools-ci successfully created
2021-05-19T15:26:26.6464697Z 
2021-05-19T15:26:26.6474029Z Use:
2021-05-19T15:26:26.6483360Z Get-BcContainerEventLog -containerName hostedagent-fintools-ci to retrieve a snapshot of the event log from the container
2021-05-19T15:26:26.6495460Z Get-BcContainerDebugInfo -containerName hostedagent-fintools-ci to get debug information about the container
2021-05-19T15:26:26.6511459Z Enter-BcContainer -containerName hostedagent-fintools-ci to open a PowerShell prompt inside the container
2021-05-19T15:26:26.6528376Z Remove-BcContainer -containerName hostedagent-fintools-ci to remove the container again
2021-05-19T15:26:26.6535297Z docker logs hostedagent-fintools-ci to retrieve information about URL's again
2021-05-19T15:26:26.6712967Z 
2021-05-19T15:26:26.6726982Z Creating container took 329 seconds
2021-05-19T15:26:26.6733241Z 
2021-05-19T15:26:26.6738750Z    _____                      _ _ _                                     
2021-05-19T15:26:26.6746234Z   / ____|                    (_) (_)                                    
2021-05-19T15:26:26.6754869Z  | |     ___  _ __ ___  _ __  _| |_ _ __   __ _    __ _ _ __  _ __  ___ 
2021-05-19T15:26:26.6761452Z  | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
2021-05-19T15:26:26.6788153Z  | |____ (_) | | | | | | |_) | | | | | | | (_| | | (_| | |_) | |_) \__ \
2021-05-19T15:26:26.6819390Z   \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
2021-05-19T15:26:26.6820035Z                        | |                 __/ |       | |   | |        
2021-05-19T15:26:26.6820588Z                        |_|                |___/        |_|   |_|        
2021-05-19T15:26:26.6820807Z 
2021-05-19T15:26:26.8057869Z Using custom ruleset
2021-05-19T15:26:26.8103481Z Using Version 17.0.356.0
2021-05-19T15:26:27.1193378Z Creating AppSourceCop.json for validation
2021-05-19T15:26:28.8359507Z Using Symbols Folder: D:\a\1\s\.packages
2021-05-19T15:26:39.3672921Z Downloading symbols: Microsoft_Application_17.2.19367.19735.app
2021-05-19T15:26:39.3834603Z Url : http://172.31.21.137:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default
2021-05-19T15:26:41.4049839Z Adding dependency to System Application from Microsoft
2021-05-19T15:26:41.4087422Z Adding dependency to Base Application from Microsoft
2021-05-19T15:26:41.4132196Z Downloading symbols: Microsoft_System_17.0.19353.19730.app
2021-05-19T15:26:41.4138230Z Url : http://172.31.21.137:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default
2021-05-19T15:26:42.0208728Z Downloading symbols: Evolve iMS Ltd._iMS Extension Management_17.0.0.0.app
2021-05-19T15:26:42.0219215Z Url : http://172.31.21.137:7049/BC/dev/packages?publisher=Evolve%20iMS%20Ltd.&appName=iMS%20Extension%20Management&versionText=17.0.0.0&tenant=default
2021-05-19T15:26:42.4384642Z 
2021-05-19T15:26:42.4396699Z   _____                           _                _____            _        _                 
2021-05-19T15:26:42.4409746Z  |  __ \                         (_)              / ____|          | |      (_)                
2021-05-19T15:26:42.4417926Z  | |__) |___ _ __ ___   _____   ___ _ __   __ _  | |     ___  _ __ | |_ __ _ _ _ __   ___ _ __ 
2021-05-19T15:26:42.4423994Z  |  _  // _ \ '_ ` _ \ / _ \ \ / / | '_ \ / _` | | |    / _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
2021-05-19T15:26:42.4438161Z  | | \ \  __/ | | | | | (_) \ V /| | | | | (_| | | |____ (_) | | | | |_ (_| | | | | |  __/ |   
2021-05-19T15:26:42.4447363Z  |_|  \_\___|_| |_| |_|\___/ \_/ |_|_| |_|\__, |  \_____\___/|_| |_|\__\__,_|_|_| |_|\___|_|   
2021-05-19T15:26:42.4452593Z                                            __/ |                                               
2021-05-19T15:26:42.4456032Z                                           |___/                                                
2021-05-19T15:26:42.4463849Z 
2021-05-19T15:26:43.5071582Z Removing container hostedagent-fintools-ci
2021-05-19T15:26:47.2398823Z Removing hostedagent-fintools-ci from container hosts file
2021-05-19T15:26:47.4114990Z Removing hostedagent-fintools-ci-* from container hosts file
2021-05-19T15:26:47.4142760Z Removing C:\ProgramData\BcContainerHelper\Extensions\hostedagent-fintools-ci
2021-05-19T15:26:47.4329509Z 
2021-05-19T15:26:47.4335879Z Removing container took 5 seconds
2021-05-19T15:26:47.4345586Z NOTE: The app in D:\a\1\s\SourceNames has ShowMyCode set to true. This means that people will be able to debug and see the source code of your app. (see https://aka.ms/showMyCode)
2021-05-19T15:26:48.0066490Z ##[error]The remote server returned an error: (404) Not Found. No published package matches the provided arguments. 
(ms-correlation-x = )
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.12\AppHandling\Compile-AppInNavContainer.ps1:370 
char:21
+                     throw (GetExtenedErrorMessage $_.Exception)
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (The remote serv...rrelation-x = ):String) [], RuntimeException
    + FullyQualifiedErrorId : The remote server returned an error: (404) Not Found. No published package matches the p 
   rovided arguments. (ms-correlation-x = )
2021-05-19T15:26:48.0220021Z ##[error]PowerShell exited with code '1'.
2021-05-19T15:26:48.1209800Z ##[section]Finishing: Run Pipeline

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

freddydk commented 3 years ago

The error is not caused by removing the container - removing the container is the cleanup. The last thing before the container removal is that it tries to download symbols from this:

Url : http://172.31.21.137:7049/BC/dev/packages?publisher=Evolve%20iMS%20Ltd.&appName=iMS%20Extension%20Management&versionText=17.0.0.0&tenant=default

and that fails with (404) Not Found. No published package matches the provided arguments. If your app has a dependency on that app, it should be included either in appfolders or as installapps.

GreatScott000 commented 3 years ago

Okay, great. I forgot about the dependency and would have thought to see an error about the missing dependencies (when compiling apps or something). Did not connect the 404 with the missing dependency. And with #1927 just resolved I guessed is was related.