microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
279 stars 114 forks source link

AL-Pipeline not installing appDependencyProbingPaths #719

Closed cegekaJG closed 1 year ago

cegekaJG commented 1 year ago

I've set up a dependency to a different GitHub repository within the .AL-Go\settings.json file, but it looks like it's not being installed as I am creating a new environment. Therefore, by the time the pipeline tries to download the symbols, it runs into an error.

Here are my dependency settings:

"installApps": [
  "dependencies/Cosmo Consult"
],
"appDependecyProbingPaths": [
  {
    "repo": "https://github.com/CBS-BC-AT/CGK.secondUnit",
    "version": "latest",
    "release_status": "release",
    "authTokenSecret": "GHTOKENWORKFLOW",
    "projects": "*"
  }
]

Here is the log from localdevenv.ps1:

 _____                _       _                   _                           _                 _
|  __ \              | |     (_)                 | |                         | |               (_)
| |__) |___ ___  ___ | |_   ___ _ __   __ _    __| | ___ _ __   ___ _ __   __| | ___ _ __   ___ _  ___ ___
|  _  // _ \ __|/ _ \| \ \ / / | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '_ \ / _` |/ _ \ '_ \ / __| |/ _ \ __|
| | \ \  __\__ \ (_) | |\ V /| | | | | (_| | | (_| |  __/ |_) |  __/ | | | (_| |  __/ | | | (__| |  __\__ \
|_|  \_\___|___/\___/|_| \_/ |_|_| |_|\__, |  \__,_|\___| .__/ \___|_| |_|\__,_|\___|_| |_|\___|_|\___|___/
                                       __/ |            | |
                                      |___/             |_|

Sorted App folders
- C:\Users\cegekaJG\Documents\clients\DXXXXX
- C:\Users\cegekaJG\Documents\clients\DXXXXX Connector
External dependencies
- 2d83b4d8-c1e2-4961-a088-0c416fe06408:Cegeka_Second Unit_1.0.6.0.app
- 054645c0-4d36-4d7a-9d5a-935afa49fc77:Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0.app
- 437dbf0e-84ff-417a-965d-ed2bb9650972:Microsoft_Base Application_22.0.0.0.app
- 63ca2fa4-4f03-4f2b-a480-172fef340d3f:Microsoft_System Application_22.0.0.0.app
Sorted TestApp folders
- None

  _____           _        _ _ _
 |_   _|         | |      | | (_)
   | |  _ __  ___| |_ __ _| | |_ _ __   __ _    __ _ _ __  _ __  ___
   | | | '_ \/ __| __/ _` | | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
  _| |_| | | \__ \ |_ (_| | | | | | | | (_| | | (_| | |_) | |_) \__ \
 |_____|_| |_|___/\__\__,_|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                                        __/ |       | |   | |
                                       |___/        |_|   |_|

Publishing C:\ProgramData\BcContainerHelper\Extensions\depentest\d55a230e-9f4d-4423-9cff-7f6ffb459d62\Cosmo Consult_COSMO Licensing_2.2.155953.0.app
Synchronizing COSMO Licensing on tenant default
Installing COSMO Licensing on tenant default
App Cosmo Consult_COSMO Licensing_2.2.155953.0.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\depentest\d55a230e-9f4d-4423-9cff-7f6ffb459d62\Cosmo Consult_COSMO VAT ID Validation_19.1.6.0.app
Synchronizing COSMO VAT ID Validation on tenant default
Installing COSMO VAT ID Validation on tenant default
App Cosmo Consult_COSMO VAT ID Validation_19.1.6.0.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\depentest\d55a230e-9f4d-4423-9cff-7f6ffb459d62\Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0.app
Synchronizing COSMO Intra-Community Taxation on tenant default
Installing COSMO Intra-Community Taxation on tenant default
App Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0.app successfully published

Installing apps took 47 seconds

   _____                      _ _ _
  / ____|                    (_) (_)
 | |     ___  _ __ ___  _ __  _| |_ _ __   __ _    __ _ _ __  _ __  ___
 | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
 | |____ (_) | | | | | | |_) | | | | | | | (_| | | (_| | |_) | |_) \__ \
  \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                       | |                 __/ |       | |   | |
                       |_|                |___/        |_|   |_|

Compiling C:\Users\cegekaJG\Documents\clients\DXXXXX
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\220\Service to assemblyProbingPath
Removing dotnet Framework Assemblies
Using Symbols Folder: C:\Users\cegekaJG\Documents\clients\DXXXXX\.alPackages
Processing dependency Microsoft_Application_22.0.0.0 ()
Dependency App exists
Processing dependency Microsoft_System_1.0.0.0 ()
Dependency App exists
Processing dependency Cegeka_Second Unit_1.0.6.0 (2d83b4d8-c1e2-4961-a088-0c416fe06408)
Downloading symbols: Cegeka_Second Unit_1.0.6.0.app
Url : http://192.168.169.93:7049/BC/dev/packages?appId=2d83b4d8-c1e2-4961-a088-0c416fe06408&versionText=1.0.6.0&tenant=default
Downloading using HttpClient
ERROR Exception calling "GetResult" with "0" argument(s): "Response status code does not indicate success: 404 (Not Found)."
Compile-AppInBcContainer Telemetry Correlation Id: 31b15657-b152-4790-a6ed-f9a7240860da
Run-AlPipeline Telemetry Correlation Id: 2e0eafeb-2ae9-44b0-98f7-cbfa45b7028a
Removing BcContainerHelper
Error: Exception calling "GetResult" with "0" argument(s): "Response status code does not indicate success: 404 (Not Found)."
Response status code does not indicate success: 404 (Not Found).
Stacktrace: at Compile-AppInBcContainer, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Compile-AppInNavContainer.ps1: line 486
at <ScriptBlock>, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 771
at <ScriptBlock>, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1847
at <ScriptBlock>, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1399
at <ScriptBlock>, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1392
at <ScriptBlock>, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 896
at Run-AlPipeline, C:\Users\cegekaJG\AppData\Local\Temp\5\31dd5f5a-8d19-40f1-9778-a5f99b9454c9\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 858
at CreateDevEnv, C:\Users\cegekaJG\AppData\Local\Temp\5\tmp59FA.tmp.ps1: line 1676
at <ScriptBlock>, C:\Users\cegekaJG\Documents\clients\Durmont\DUR.base\.AL-Go\localDevEnv.ps1: line 126
at <ScriptBlock>, <No file>: line 1

The release does exist in the dependency repo, and the artifact contains the appropriate app as well. I'm not quite sure what's going on here.

freddydk commented 1 year ago

I think this is fixed in the preview version.

cegekaJG commented 1 year ago

Is the preview version available someplace else? I updated the system files to the latest commit and I still got the same error.

freddydk commented 1 year ago

You ran update AL-Go System files with microsoft/AL-Go-PTE@preview? (or AppSource)

cegekaJG commented 1 year ago

Ah, I forgot about the preview branch. Unfortunately, I keep running into an error whenever I try to run the update action.

Run microsoft/AL-Go-Actions/CheckForUpdates@v3.2
Run $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
Downloading BcContainerHelper latest version from CDN
BcContainerHelper version 5.0.5
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Applying settings from D:\a\DUR.base\DUR.base\.github\AL-Go-Settings.json
Using template from https://github.com/microsoft/AL-Go-PTE@preview
Using ArchiveUrl https://api.github.com/repos/microsoft/AL-Go-PTE/zipball/preview
Projects found: 1
- .
Checking .github\workflows\*
- AddExistingAppOrTestApp.yaml
Updated workflow 'Add existing app or test app' (.github\workflows\AddExistingAppOrTestApp.yaml) available
- CICD.yaml
Updated workflow ' CI/CD' (.github\workflows\CICD.yaml) available
- CreateApp.yaml
Updated workflow 'Create a new app' (.github\workflows\CreateApp.yaml) available
- CreateOnlineDevelopmentEnvironment.yaml
Updated workflow ' Create Online Dev. Environment' (.github\workflows\CreateOnlineDevelopmentEnvironment.yaml) available
- CreatePerformanceTestApp.yaml
Updated workflow 'Create a new performance test app' (.github\workflows\CreatePerformanceTestApp.yaml) available
- CreateRelease.yaml
Updated workflow ' Create release' (.github\workflows\CreateRelease.yaml) available
- CreateTestApp.yaml
Updated workflow 'Create a new test app' (.github\workflows\CreateTestApp.yaml) available
- Current.yaml
Updated workflow ' Test Current' (.github\workflows\Current.yaml) available
- IncrementVersionNumber.yaml
Updated workflow ' Increment Version Number' (.github\workflows\IncrementVersionNumber.yaml) available
- NextMajor.yaml
Updated workflow ' Test Next Major' (.github\workflows\NextMajor.yaml) available
- NextMinor.yaml
Updated workflow ' Test Next Minor' (.github\workflows\NextMinor.yaml) available
- PublishToEnvironment.yaml
Updated workflow ' Publish To Environment' (.github\workflows\PublishToEnvironment.yaml) available
- PullRequestHandler.yaml
Updated workflow 'Pull Request Build' (.github\workflows\PullRequestHandler.yaml) available
- UpdateGitHubGoSystemFiles.yaml
Updated workflow ' Update AL-Go System Files' (.github\workflows\UpdateGitHubGoSystemFiles.yaml) available
- _BuildALGoProject.yaml
Updated workflow '_Build AL-GO project' (.github\workflows\_BuildALGoProject.yaml) available
Checking .github\*.copy.md
- RELEASENOTES.copy.md
Updated releasenotes (.github\RELEASENOTES.copy.md) available
Checking .AL-Go\*.ps1
- cloudDevEnv.ps1
Updated script (.\.AL-Go\cloudDevEnv.ps1) available
- localDevEnv.ps1
Updated script (.\.AL-Go\localDevEnv.ps1) available

AL-Go action ran: CheckForUpdates Telemetry Correlation Id: d3662226-2[47](https://github.com/CBS-BC-AT/DUR.base/actions/runs/6250277835/job/16968772115#step:8:49)4-41a7-9dcd-3a7714b819b3
Removing BcContainerHelper
Error: Unexpected error when running action. Error Message: Failed to create a pull-request to AL-Go System Files. Make sure that the personal access token, defined in the secret called GhTokenWorkflow, is not expired and it has permission to update workflows. (Error was Cloning into 'DUR.base'... remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication. fatal: Authentication failed for 'https://github.com/CBS-BC-AT/DUR.base/'  ExitCode: 128 Commandline: git clone ***github.com/CBS-BC-AT/DUR.base ), StackTrace: at <ScriptBlock>, D:\a\_actions\microsoft\AL-Go-Actions\v3.2\CheckForUpdates\CheckForUpdates.ps1: line [53](https://github.com/CBS-BC-AT/DUR.base/actions/runs/6250277835/job/16968772115#step:8:55)0 <- at <ScriptBlock>, D:\a\_temp\47aca0c6-f91b-4[72](https://github.com/CBS-BC-AT/DUR.base/actions/runs/6250277835/job/16968772115#step:8:74)2-9f19-f329bea39fb5.ps1: line 4 <- at <ScriptBlock>, <No file>: line 1
Error: Process completed with exit code 1.

It looks like it can't create a new pull request, but I'm not sure why. The repo settings allow actions to create PRs, and the GHTOKENWORKFLOW secret has all write permissions and hasn't expired yet.

image image image

freddydk commented 1 year ago

I, myself haven't been able to make the fine grained PATs work yet - this error has something to do with the GhTokenWorkflow

freddydk commented 1 year ago

did you try a direct commit?

cegekaJG commented 1 year ago

I've created a new classic token which did work in updating the system files - however, it still doesn't work with the preview. I tried it both with GitHub Actions and localDevEnv.ps1.

freddydk commented 1 year ago

I would need the full output of localDevEnv - or access to the repo to see what is going on here

cegekaJG commented 1 year ago

I can't give you access to the repository because it's company property, but I can give you the full output. Is there a flag I should use for more thorough logs?

freddydk commented 1 year ago

no - but you can send the output to freddyk@microsoft.com if you don't want to dump it here.

cegekaJG commented 1 year ago

I'd rather dump it here for future reference - I replaced identifying information.


  _                     _   _____             ______
 | |                   | | |  __ \           |  ____|
 | |     ___   ___ __ _| | | |  | | _____   __ |__   _ ____   __
 | |    / _ \ / __/ _` | | | |  | |/ _ \ \ / /  __| | '_ \ \ / /
 | |____ (_) | (__ (_| | | | |__| |  __/\ V /| |____| | | \ V /
 |______\___/ \___\__,_|_| |_____/ \___| \_/ |______|_| |_|\_/

This script will create a docker based local development environment for your project.

NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1

All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a Local Sandbox configuration point to your environment.

Applying settings from C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\.github\AL-Go-Settings.json
Applying settings from C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\.AL-Go\settings.json
Checking System Requirements

Container name
--------------
Please enter the name of the container to create (default bcserver) dependtest
dependtest selected

Authentication mechanism for container
--------------------------------------
a Username/Password authentication
b Windows Authentication

Select authentication mechanism for container (default a) 
Username/Password authentication selected

PowerShell credential request
Please enter username and password for your container
Password for user admin: *****

LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps

Local path or a secure download URL to license file  (default none)
none selected

Import from C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\BcContainerHelper.ps1
BcContainerHelper version 5.0.6-preview1070
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on PowerShell 7
Applying settings from C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\.github\AL-Go-Settings.json
Applying settings from C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\.AL-Go\settings.json
Checking type
Checking appFolders, testFolders and bcptTestFolders
Application Dependency 22.0.0.0
Checking artifact setting for project
Downloading artifacts from https://bcartifacts.azureedge.net/sandbox/22.1.55890.56394/at
Updating app- and test Dependencies
Analyzing Test App Dependencies
WARNING: No test apps found in testFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv
Container name                  dependtest
Image name
ArtifactUrl                     https://bcartifacts.azureedge.net/sandbox/22.1.55890.56394/at
SasToken                        Not Specified
BcAuthContext                   Not Specified
Environment
ReUseContainer                  False
KeepContainer                   True
useCompilerFolder               False
artifactCachePath
useDevEndpoint                  True
Auth                            UserPassword
Credential                      Specified
CompanyName
MemoryLimit                     8G
FailOn                          error
TreatTestFailuresAsWarnings     False
Enable Task Scheduler           False
Assign Premium Plan             False
Install Test Runner             False
Install Test Framework          False
Install Test Libraries          False
Install Perf. Toolkit           False
InstallOnlyReferencedApps       True
generateDependencyArtifact      False
CopySymbolsFromContainer        False
enableCodeCop                   True
enableAppSourceCop              False
enableUICop                     True
enablePerTenantExtensionCop     False
doNotPerformUpgrade             False
doNotPublishApps                False
uninstallRemovedApps            False
escapeFromCops                  False
doNotBuildTests                 False
doNotRunTests                   True
doNotRunBcptTests               True
useDefaultAppSourceRuleSet      False
rulesetFile
azureDevOps                     False
gitLab                          False
gitHubActions                   False
vsixFile
License file                    Not specified
CodeSignCertPfxFile             Not specified
CodeSignCertPfxPassword         Not specified
CodeSignCertIsSelfSigned        False
KeyVaultCertPfxFile             Not specified
KeyVaultCertPfxPassword         Not specified
KeyVaultClientId
BuildOutputFile
ContainerEventLogFile
TestResultsFile                 C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\TestResults.xml
BcptTestResultsFile             C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\bcptTestResults.json
TestResultsFormat               JUnit
AdditionalCountries
PackagesFolder                  .packages
OutputFolder
BuildArtifactFolder
CreateRuntimePackages           False
AppVersion
AppBuild                        0
AppRevision                     0
SourceRepositoryUrl
SourceCommit
BuildBy                         BcContainerHelper,5.0.6-preview1070
BuildUrl
Install Apps
- dependencies/Cosmo Consult
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base
- C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base Connector
Test application folders
- None
BCPT Test application folders
- None
BCPT Test suites
- None
Custom CodeCops
- None

  _____       _ _ _                                          _        _
 |  __ \     | | (_)                                        (_)      (_)
 | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___
 |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
 | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
 |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
                           __/ |   __/ |                                                 __/ |
                          |___/   |___/                                                 |___/

Pulling mcr.microsoft.com/businesscentral:10.0.20348.1787-dev

Pulling generic image took 1 seconds

   _____                _   _                               _        _
  / ____|              | | (_)                             | |      (_)
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
                                     __/ |
                                    |___/

Creaing docker container
BcContainerHelper is version 5.0.6-preview1070
BcContainerHelper is not running as administrator
UsePsSession is True
Host is Microsoft Windows Server 2022 Datacenter Azure Edition - 10.0.20348.1787
Docker Client Version is 20.10.9
Docker Server Version is 24.0.2
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1787-dev
Creating Container dependtest
Style: sandbox
Multitenant: Yes
Version: 22.1.55890.56394
Platform: 22.0.56380.0
Generic Tag: 1.0.2.14-dev
Container OS Version: 10.0.20348.1787 (ltsc2022)
Host OS Version: 10.0.20348.1787 (ltsc2022)
Using process isolation
Using locale de-AT
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\cegekaJG\Documents\clients\DUR\DUR.base:c:\sources"
--volume "C:/Users/cegekaJG/Documents/clients/Durmont/DUR.base:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\dependtest\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container dependtest from image mcr.microsoft.com/businesscentral:10.0.20348.1787-dev
1c5394a02200e4f42db1232c30e6ff51225c9bdf868cc9b6a857f97ae16a9048
Waiting for container dependtest to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/22.1.55890.56394/at
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\22.1.55890.56394\platform\ServiceTier\Program Files
c:\dl\sandbox\22.1.55890.56394\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\22.1.55890.56394\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\22.1.55890.56394\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\22.1.55890.56394\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\22.1.55890.56394\platform
c:\dl\sandbox\22.1.55890.56394\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\22.1.55890.56394\at\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\22.1.55890.56394\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\22.1.55890.56394\at\Extensions
Copying Applications
C:\dl\sandbox\22.1.55890.56394\platform\Applications
Copying Applications.AT
C:\dl\sandbox\22.1.55890.56394\at\Applications.AT
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 217 seconds
Installation complete
Initializing...
Setting host.docker.internal to 172.27.0.4 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 172.27.0.4 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.19.96.1 in container hosts file
Starting Container
Hostname is dependtest
PublicDnsName is dependtest
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 2F669A02276E6A53A6FF7910486F2D2F5367D9DE
DNS identity dependtest
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to False
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements.
It should be at least 8 characters long and contain at least one uppercase
letter, one lowercase letter, and one number.
Container IP Address: 172.19.101.254
Container Hostname  : dependtest
Container Dns Name  : dependtest
Web Client          : http://dependtest/BC/?tenant=default
Dev. Server         : http://dependtest
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting dependtest to 172.19.101.254 in host hosts file
Setting dependtest-default to 172.19.101.254 in host hosts file
Setting dependtest-default to 172.19.101.254 in container hosts file

Files:
http://dependtest:8080/ALLanguage.vsix

WARNING: You are running a container which is 99 days old.
Microsoft recommends that you always run the latest version of our containers.

Container Total Physical Memory is 32.0Gb
Container Free Physical Memory is 15.5Gb

Initialization took 30 seconds
Ready for connections!

Creating Container user winrm
Reading CustomSettings.config from dependtest
Creating Desktop Shortcuts for dependtest
Cleanup old dotnet core assemblies
Container dependtest successfully created

Use:
Get-BcContainerEventLog -containerName dependtest to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName dependtest to get debug information about the container
Enter-BcContainer -containerName dependtest to open a PowerShell prompt inside the container
Remove-BcContainer -containerName dependtest to remove the container again
docker logs dependtest to retrieve information about URL's again

Creating container took 258 seconds

 _____                _       _                   _                           _                 _
|  __ \              | |     (_)                 | |                         | |               (_)
| |__) |___ ___  ___ | |_   ___ _ __   __ _    __| | ___ _ __   ___ _ __   __| | ___ _ __   ___ _  ___ ___
|  _  // _ \ __|/ _ \| \ \ / / | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '_ \ / _` |/ _ \ '_ \ / __| |/ _ \ __|
| | \ \  __\__ \ (_) | |\ V /| | | | | (_| | | (_| |  __/ |_) |  __/ | | | (_| |  __/ | | | (__| |  __\__ \
|_|  \_\___|___/\___/|_| \_/ |_|_| |_|\__, |  \__,_|\___| .__/ \___|_| |_|\__,_|\___|_| |_|\___|_|\___|___/
                                       __/ |            | |
                                      |___/             |_|

Sorted App folders
- C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base
- C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base Connector
External dependencies
- 2d83b4d8-c1e2-4961-a088-0c416fe06408:Cegeka_Second Unit_1.0.0.0.app
- 054645c0-4d36-4d7a-9d5a-935afa49fc77:Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0.app
- 437dbf0e-84ff-417a-965d-ed2bb9650972:Microsoft_Base Application_22.0.0.0.app
- 63ca2fa4-4f03-4f2b-a480-172fef340d3f:Microsoft_System Application_22.0.0.0.app
Sorted TestApp folders
- None

  _____           _        _ _ _
 |_   _|         | |      | | (_)
   | |  _ __  ___| |_ __ _| | |_ _ __   __ _    __ _ _ __  _ __  ___
   | | | '_ \/ __| __/ _` | | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
  _| |_| | | \__ \ |_ (_| | | | | | | | (_| | | (_| | |_) | |_) \__ \
 |_____|_| |_|___/\__\__,_|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                                        __/ |       | |   | |
                                       |___/        |_|   |_|

Publishing C:\ProgramData\BcContainerHelper\Extensions\dependtest\ad858a55-f03e-4518-8696-9800bb3371bd\Cosmo Consult_COSMO Licensing_2.2.155953.0.app
Synchronizing COSMO Licensing on tenant default
Installing COSMO Licensing on tenant default
App Cosmo Consult_COSMO Licensing_2.2.155953.0.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\dependtest\ad858a55-f03e-4518-8696-9800bb3371bd\Cosmo Consult_COSMO VAT ID Validation_19.1.6.0.app
Synchronizing COSMO VAT ID Validation on tenant default
Installing COSMO VAT ID Validation on tenant default
App Cosmo Consult_COSMO VAT ID Validation_19.1.6.0.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\dependtest\ad858a55-f03e-4518-8696-9800bb3371bd\Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0.app
Synchronizing COSMO Intra-Community Taxation on tenant default
Installing COSMO Intra-Community Taxation on tenant default
App Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0.app successfully published

Installing apps took 48 seconds

   _____                      _ _ _
  / ____|                    (_) (_)
 | |     ___  _ __ ___  _ __  _| |_ _ __   __ _    __ _ _ __  _ __  ___
 | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
 | |____ (_) | | | | | | |_) | | | | | | | (_| | | (_| | |_) | |_) \__ \
  \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                       | |                 __/ |       | |   | |
                       |_|                |___/        |_|   |_|

Compiling C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\220\Service to assemblyProbingPath
Removing dotnet Framework Assemblies
Using Symbols Folder: C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base\.alPackages
Processing dependency Microsoft_Application_22.0.0.0 ()
Dependency App exists
Processing dependency Microsoft_System_1.0.0.0 ()
Dependency App exists
Processing dependency Cegeka_Second Unit_1.0.0.0 (2d83b4d8-c1e2-4961-a088-0c416fe06408)
Dependency App exists
Processing dependency Cosmo Consult_COSMO Intra-Community Taxation_21.2.0.0 (054645c0-4d36-4d7a-9d5a-935afa49fc77)
Dependency App exists
Compiling...
.\alc.exe /project:"c:\sources\Durmont Base" /packagecachepath:"c:\sources\Durmont Base\.alPackages" /out:"c:\sources\Durmont Base\Cegeka_Durmont Base_1.0.14.5.app" /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.CodeCop.dll /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.UICop.dll /assemblyprobingpaths:"C:\Program Files\dotnet\shared","C:\ProgramData\BcContainerHelper\Extensions\dependtest\.netPackages\Service"
Microsoft (R) AL Compiler version 11.0.12.7293
Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project 'Durmont Base' containing '98' files at '11:41:56.102'.

Compilation ended at '11:42:01.396'.

C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\Durmont Base\Cegeka_Durmont Base_1.0.14.5.app successfully created in 54 seconds
Publishing Cegeka_Durmont Base_1.0.14.5.app to http://172.19.101.254:7049/BC/dev/apps?SchemaUpdateMode=synchronize&tenant=default
Status Code UnprocessableEntity : Unprocessable Entity
Extension compilation failed
error AL1024: A package with publisher 'Cegeka', name 'Second Unit', and a version compatible with '1.0.0.0' could not be loaded. Symbols for the requested app Second Unit by Cegeka 1.0.0.0 could not be found in the database.
src/page/DURSalesLineCard.Page.al(50,45): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU UOM Code 2'
src/page/DURSalesLineCard.Page.al(84,53): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Quantity UOM 2'
src/page/DURSalesLineCard.Page.al(102,58): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Reserved Qty. UOM 2'
src/page/DURSalesLineCard.Page.al(110,59): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Outstanding Quantity'
src/page/DURSalesOrderLines.Page.al(88,45): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU UOM Code 2'
src/page/DURSalesOrderLines.Page.al(92,49): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Quantity UOM 2'
src/page/DURSalesOrderLines.Page.al(96,55): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Outstanding Quantity'

Publish-BcContainerApp Telemetry Correlation Id: 10d2ee71-8f57-495a-8e03-f2b502ac3a35
Run-AlPipeline Telemetry Correlation Id: 27cab366-42ea-4713-8240-3818de693fc3
Error: Status Code UnprocessableEntity : Unprocessable Entity
Extension compilation failed
error AL1024: A package with publisher 'Cegeka', name 'Second Unit', and a version compatible with '1.0.0.0' could not be loaded. Symbols for the requested app Second Unit by Cegeka 1.0.0.0 could not be found in the database.
src/page/DURSalesLineCard.Page.al(50,45): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU UOM Code 2'
src/page/DURSalesLineCard.Page.al(84,53): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Quantity UOM 2'
src/page/DURSalesLineCard.Page.al(102,58): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Reserved Qty. UOM 2'
src/page/DURSalesLineCard.Page.al(110,59): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Outstanding Quantity'
src/page/DURSalesOrderLines.Page.al(88,45): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU UOM Code 2'
src/page/DURSalesOrderLines.Page.al(92,49): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Quantity UOM 2'
src/page/DURSalesOrderLines.Page.al(96,55): error AL0132: 'Record "Sales Line"' does not contain a definition for 'CSU Outstanding Quantity'

Stacktrace: at <ScriptBlock>, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Publish-NavContainerApp.ps1: line 286
at Publish-BcContainerApp, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Publish-NavContainerApp.ps1: line 157
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 792
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1897
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1399
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1392
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 896
at Run-AlPipeline, C:\ProgramData\BcContainerHelper\5.0.6-preview1070\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 858
at CreateDevEnv, C:\Users\cegekaJG\AppData\Local\Temp\2\tmp4173.tmp.ps1: line 1841
at <ScriptBlock>, C:\Users\cegekaJG\Documents\clients\DUR\DUR.base\.al-Go\localDevEnv.ps1: line 125
at <ScriptBlock>, <No file>: line 1
freddydk commented 1 year ago

In which settings file is the AppDependencyProbingPaths defined?

I am asking because I would have expected something happening in your output (after Checking AppDependencyProbingPaths):

Analyzing Test App Dependencies
WARNING: No test apps found in testFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv
Container name                  dependtest

Running localDevEnv on my own machine (in this repo: https://github.com/businesscentralapps/DependencyDemo) gives this output:

Checking appDependencyProbingPaths
Dependency to projects '*' in https://github.com/microsoft/bcsamples-bingmaps.pte@main, version latest, release status release
No token available, will attempt to invoke gh auth token for access to repository
Dependency to projects '*' in https://github.com/BusinessCentralApps/LicensingDemo@main, version latest, release status latestBuild
Using secret GhTokenWorkflow for access to repository
Downloading dependencies ...
Locating Apps artifacts for projects: *
Analyzing releases https://api.github.com/repos/microsoft/bcsamples-bingmaps.pte/releases
Downloading release v6.0, projects *, type Apps
project '*'
AssetPatterns: '*-*-Apps-*.zip' | '*-Apps-*.zip'
https://api.github.com/repos/microsoft/bcsamples-bingmaps.pte/releases/assets/115107011
Locating Apps artifacts for projects: *
Analyzing artifacts
https://api.github.com/repos/BusinessCentralApps/LicensingDemo/actions/artifacts?per_page=100&page=1
ArtifactPattern: *-main-Apps-*
Project: *
ArtifactPattern: *-main-Apps-*
Downloading artifact LicensingDemo-main-Apps-1.0.25.0
https://api.github.com/repos/BusinessCentralApps/LicensingDemo/actions/artifacts/909672096/zip
Locating TestApps artifacts for projects: *
Analyzing releases https://api.github.com/repos/microsoft/bcsamples-bingmaps.pte/releases
Downloading release v6.0, projects *, type TestApps
project '*'
AssetPatterns: '*-*-TestApps-*.zip' | '*-TestApps-*.zip'
https://api.github.com/repos/microsoft/bcsamples-bingmaps.pte/releases/assets/115107016
Locating TestApps artifacts for projects: *
Analyzing artifacts
https://api.github.com/repos/BusinessCentralApps/LicensingDemo/actions/artifacts?per_page=100&page=1
ArtifactPattern: *-main-TestApps-*
Project: *
ArtifactPattern: *-main-TestApps-*
Could not find any TestApps artifacts for projects *, version latest
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv

It seems like it doesn't detect your AppDependencyProbingPaths setting... My settings looks like:

    "appDependencyProbingPaths":  [
        {
            "repo":  "https://github.com/microsoft/bcsamples-bingmaps.pte"
        },
        {
            "repo":  "https://github.com/BusinessCentralApps/LicensingDemo",
            "release_status":  "latestBuild",
            "AuthTokenSecret":  "GhTokenWorkflow"
        }
    ],

I see now that you have a spelling mistake in the settings - it says: appDependecyProbingPaths (missing an n)

I assume that your CI/CD workflow is also failing then, right?

cegekaJG commented 1 year ago

You're completely right, thanks. Yes, the workflow kept failing, and I just assumed there was something wrong with accessing the external repo. I'll run some tests, then close the issue if everything works again.

freddydk commented 1 year ago

OK - if you had mentioned that your CI/CD workflow also failed, it would have been much easier to troubleshoot. There is no such thing as too much information in a bug report.