microsoft / AL-Go

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

More "illegal characters in path" on #811

Closed buzzwick closed 8 months ago

buzzwick commented 11 months ago

During a build after merging a pull request, we get this error when trying to download symbols for the named dependent app. Because this app will not build, then a Publish to Environment cannot find any build artifacts. So we need to understand how to get an app with a dependency to build in its own repository.

Going back to the Workshop files on Dependencies, to see if this is covered there.


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

  Using Version 1.1.5.0

  Compiling D:\a\Elemet-Inc\Elemet-Inc\Elemet Custom Mods
  Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\220\Service to assemblyProbingPath
  Removing dotnet Framework Assemblies
  Using Symbols Folder: D:\a\Elemet-Inc\Elemet-Inc\.packages
  Copying System.app from Container
  Copying Microsoft_AMC Banking 365 Fundamentals_22.0.54157.55210.app from Container
  Copying Microsoft_Any_22.0.54157.55210.app from Container
  Copying Microsoft_API Reports - Finance_22.0.54157.55210.app from Container
  Copying Microsoft_Application_22.0.54157.55210.app from Container
  Copying Microsoft_Audit File Export_22.0.54157.55210.app from Container
  Copying Microsoft_Base Application_22.0.54157.55210.app from Container
  Copying Microsoft_Business Central Cloud Migration - Previous Release (US)_22.0.54157.55210.app from Container
  Copying Microsoft_Business Central Cloud Migration - Previous Release_22.0.54157.55210.app from Container
  Copying Microsoft_Business Central Cloud Migration API_22.0.54157.55210.app from Container
  Copying Microsoft_Business Central Intelligent Cloud_22.0.54157.55210.app from Container
  Copying Microsoft_Ceridian Payroll_22.0.54157.55210.app from Container
  Copying Microsoft_Company Hub_22.0.54157.55210.app from Container
  Copying Microsoft_Contoso Coffee Demo Dataset (US)_22.0.54157.55210.app from Container
  Copying Microsoft_Contoso Coffee Demo Dataset_22.0.54157.55210.app from Container
  Copying Microsoft_Czech language (Czechia)_22.0.54157.55210.app from Container
  Copying Microsoft_Danish language (Denmark)_22.0.54157.55210.app from Container
  Copying Microsoft_Data Archive_22.0.54157.55210.app from Container
  Copying Microsoft_Data Search_22.0.54157.55210.app from Container
  Copying Microsoft_DIOT - Localization for Mexico_22.0.54157.55210.app from Container
  Copying Microsoft_Dutch language (Belgium)_22.0.54157.55210.app from Container
  Copying Microsoft_Dutch language (Netherlands)_22.0.54157.55210.app from Container
  Copying Microsoft_Dynamics GP Historical Data_22.0.54157.55210.app from Container
  Copying Microsoft_Dynamics GP History SmartLists_22.0.54157.55210.app from Container
  Copying Microsoft_Dynamics GP Intelligent Cloud_22.0.54157.55210.app from Container
  Copying Microsoft_Email - Current User Connector_22.0.54157.55210.app from Container
  Copying Microsoft_Email - Microsoft 365 Connector_22.0.54157.55210.app from Container
  Copying Microsoft_Email - Outlook REST API_22.0.54157.55210.app from Container
  Copying Microsoft_Email - SMTP API_22.0.54157.55210.app from Container
  Copying Microsoft_Email - SMTP Connector_22.0.54157.55210.app from Container
  Copying Microsoft_English language (Australia)_22.0.54157.55210.app from Container
  Copying Microsoft_English language (Canada)_22.0.54157.55210.app from Container
  Copying Microsoft_English language (New Zealand)_22.0.54157.55210.app from Container
  Copying Microsoft_English language (United Kingdom)_22.0.54157.55210.app from Container
  Copying Microsoft_English language (United States)_22.0.54157.55210.app from Container
  Copying Microsoft_Envestnet Yodlee Bank Feeds_22.0.54157.55210.app from Container
  Copying Microsoft_Essential Business Headlines_22.0.54157.55210.app from Container
  Copying Microsoft_Finnish language (Finland)_22.0.54157.55210.app from Container
  Copying Microsoft_French language (Belgium)_22.0.54157.55210.app from Container
  Copying Microsoft_French language (Canada)_22.0.54157.55210.app from Container
  Copying Microsoft_French language (France)_22.0.54157.55210.app from Container
  Copying Microsoft_French language (Switzerland)_22.0.54157.55210.app from Container
  Copying Microsoft_German language (Austria)_22.0.54157.55210.app from Container
  Copying Microsoft_German language (Germany)_22.0.54157.55210.app from Container
  Copying Microsoft_German language (Switzerland)_22.0.54157.55210.app from Container
  Copying Microsoft_Icelandic language (Iceland)_22.0.54157.55210.app from Container
  Copying Microsoft_Image Analyzer_22.0.54157.55210.app from Container
  Copying Microsoft_Import of QuickBooks Payroll Files_22.0.54157.55210.app from Container
  Copying Microsoft_Intelligent Cloud Base_22.0.54157.55210.app from Container
  Copying Microsoft_IRS 1096_22.0.54157.55210.app from Container
  Copying Microsoft_Italian language (Italy)_22.0.54157.55210.app from Container
  Copying Microsoft_Italian language (Switzerland)_22.0.54157.55210.app from Container
  Copying Microsoft_Late Payment Prediction_22.0.54157.55210.app from Container
  Copying Microsoft_Library Assert_22.0.54157.55210.app from Container
  Copying Microsoft_Library Variable Storage_22.0.54157.55210.app from Container
  Copying Microsoft_Microsoft Pay Payments_22.0.54157.55210.app from Container
  Copying Microsoft_Migration of QuickBooks Data_22.0.54157.55210.app from Container
  Copying Microsoft_Norwegian language (Norway)_22.0.54157.55210.app from Container
  Copying Microsoft_Payment Links to PayPal_22.0.54157.55210.app from Container
  Copying Microsoft_Performance Toolkit_22.0.54157.55210.app from Container
  Copying Microsoft_Permissions Mock_22.0.54157.55210.app from Container
  Copying Microsoft_Recommended Apps_22.0.54157.55210.app from Container
  Copying Microsoft_Russian language (Russia)_22.0.54157.55210.app from Container
  Copying Microsoft_Sales and Inventory Forecast_22.0.54157.55210.app from Container
  Copying Microsoft_Send remittance advice by email_22.0.54157.55210.app from Container
  Copying Microsoft_Send To Email Printer_22.0.54157.55210.app from Container
  Copying Microsoft_Shopify Connector_22.0.54157.55210.app from Container
  Copying Microsoft_Simplified Bank Statement Import_22.0.54157.55210.app from Container
  Copying Microsoft_Spanish language (Mexico)_22.0.54157.55210.app from Container
  Copying Microsoft_Spanish language (Spain)_22.0.54157.55210.app from Container
  Copying Microsoft_Statistical Accounts_22.0.54157.55210.app from Container
  Copying Microsoft_Swedish language (Sweden)_22.0.54157.55210.app from Container
  Copying Microsoft_System Application_22.0.54157.55210.app from Container
  Copying Microsoft_Test Runner_22.0.54157.55210.app from Container
  Copying Microsoft_Troubleshoot FA Ledger Entries_22.0.54157.55210.app from Container
  Copying Microsoft_Universal Print Integration_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_AnonymizedDataSharing__22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_APIV1__22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_APIV2__22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Bank Deposits_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_ClientAddIns__22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Connectivity Apps_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Email Logging Using Graph API_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Master_Data_Management_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Microsoft Dynamics 365 - SmartList_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Onboarding Signals_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_PlanConfiguration__22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_ReportLayouts_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_Review_General_Ledger_Entries_22.0.54157.55210.app from Container
  Copying Microsoft__Exclude_SyncBaseApp__22.0.54157.55210.app from Container
  INFO: You have to specify AuthContext and Environment if you are compiling in a filesOnly container in order to download dependencies
  Processing dependency Microsoft_Application_20.0.0.0 ()
  Dependency App exists
  Processing dependency Microsoft_System_20.0.0.0 ()
  Dependency App exists
  Processing dependency CAI Software_CAi Software Precious Metals Solution_22.0.0.0 (8788f8f7-2afb-4cd8-9935-068947847f2a)
  **Downloading symbols: CAI Software_CAi Software Precious Metals Solution_22.0.0.0.app
  Url : /dev/packages?appId=8788f8f7-2afb-4cd8-9935-068947847f2a&versionText=22.0.0.0&tenant=default
  Downloading using WebClient**
  **ERROR Exception calling "DownloadFile" with "2" argument(s): "Illegal characters in path."**
  Compile-AppInBcContainer Telemetry Correlation Id: 300f4212-1272-4032-aeb9-7ed9e787fd50
Removing container
Run-AlPipeline Telemetry Correlation Id: 1ae0bba4-ceb0-4092-b2ae-6e96d24eaeaa
AL-Go action ran: RunPipeline Telemetry Correlation Id: ff3bc851-5760-4ac3-8e7b-1dbc85e31826
Get Event Log from container
Getting event log for bc6837540150
Error getting event log from container: Cannot overwrite the item D:\a\Elemet-Inc\Elemet-Inc\ContainerEventLog.evtx with itself.
Error: Unexpected error when running action. Error Message: Exception calling "DownloadFile" with "2" argument(s): "Illegal characters in path.", StackTrace: at Compile-AppInBcContainer, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Compile-AppInNavContainer.ps1: line 486 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 779 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1894 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1441 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1434 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 904 <- at Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.0.0\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 866 <- at <ScriptBlock>, D:\a\_actions\microsoft\AL-Go-Actions\v4.0\RunPipeline\RunPipeline.ps1: line 371 <- at <ScriptBlock>, D:\a\_temp\409c1b82-73e1-49ab-aedd-f2f1f727e0e1.ps1: line 4 <- at <ScriptBlock>, <No file>: line 1
Error: Process completed with exit code 1.
freddydk commented 11 months ago

We now know why - but it is a strange error - will check why

buzzwick commented 11 months ago

Just noting that we still get this error, after you fixed the "AuthTokenSecret" for appDependencyProbingPaths

freddydk commented 11 months ago

In which repo? I don't see that error in the Element repo?

buzzwick commented 11 months ago

Sorry, I keep jumping back and forth between these two extension repos, because the errors were coming up interchangeably.

This would be the most recent CI/CD run in https://github.com/CAI-Software-Inc/Johnson-Matthey-UK

freddydk commented 11 months ago

Yeah, so the reason for the error is that it tries to download a dependency, which isn't installed (very bad error message) In this repo, it cannot find: Johnson Matthey_JM-CAI Extension_1.0.0.0.app - is that in a different repo?

freddydk commented 11 months ago

I found the root cause of the strange error message and there is a fix for this in a future version. In the future, the error message should look like: image

buzzwick commented 11 months ago

Aha! No, that dependency is not in fact in this repo. Or any repo that we have access to, so far as I know. It turns out that our client is developing their own extension separately; I listed the dependency anticipating our extension relying on fields/tables in their extension. But of course there is no way to compile them together. I will have to remove that reference for now, but I wonder what happens if we do have to include, say, a symbol reference that they have added? A little hazy on that particular situation.

Hoorah for the new error message! That should speed things up enormously and avoid a lot of New Issues!