microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
732 stars 243 forks source link

Could not download symbols. No published package matches the provided arguments. 14.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. #5357

Closed HennieBink closed 4 years ago

HennieBink commented 4 years ago

We have upgraded the database from version 13 to version 14.

We changed in app.json "platform": "14.0.0.0", "application": "14.0.0.0", "runtime": "3.0"

After that we get an error below.

[2019-10-15 14:40:29.32] Using reference symbols cache path: --./.alpackages [2019-10-15 14:40:29.32] Sending request to http://localhost:7049/--/dev/packages?publisher=Microsoft&appName=Application&versionText=14.0.0.0 [2019-10-15 14:40:29.32] Sending request to http://localhost:7049/--/dev/packages?publisher=Microsoft&appName=System&versionText=14.0.0.0 [2019-10-15 14:40:29.34] The request for path /--/dev/packages?publisher=Microsoft&appName=System&versionText=14.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-10-15 14:40:29.35] The request for path /--/dev/packages?publisher=Microsoft&appName=Application&versionText=14.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-10-15 14:40:29.35] Could not download reference symbols. Please ensure that:

  1. The correct server name and instance are specified in the launch.json file.
  2. The correct application version is specified in the app.json file.
  3. The dependencies are correctly specified in the app.json file.

When we change the version back to 13 in app.json "platform": "13.0.0.0", "application": "13.0.0.0", "runtime": "3.0"

the download of the symbols proceed without an error but we missing some references.

rdebath commented 4 years ago

What are the version numbers of the "app" packages that you successfully download? If they are 13.X.X.X you are connecting to a V13 service tier; you need to point your launch.json at a version 14 service tier with v14 Cronus data.

HennieBink commented 4 years ago

Version numbers of de "app" packages that successfully download. Microsoft_Application_13.0.26413.0.app Microsoft_System_13.0.12929.0.app

Version of the service tier where launch.json is pointing at: 14.0.29530.0

We have removed the old BC13 version.

rdebath commented 4 years ago

You're probably better off using a V14 later than the RTM, There was a nasty problem with that version. (IIRC).

Ah, I see a database upgrade. You need to upgrade the extensions in the database too. Including both of the "symbols only" extensions that you're downloading.

HennieBink commented 4 years ago

I've upgraded to V14 CU05. First removed V14 and a fresh install of V14 CU05. Database converted and reinstalled the apps.

Problem is not solved unfortunately.

When using version 13 in app.json the symbols will download but not when I use version 14. "platform": "13.0.0.0", "application": "13.0.0.0", "runtime": "3.0"

In this case we now get the following symbols: Microsoft_Application_13.2.26556.0.app (this is changed!) Microsoft_System_13.0.12929.0.app

atoader commented 4 years ago

Hi! @HennieBink are you using C/SIDE side-by-side development? Have you updated the application version while performing the technical upgrade? If you are not doing side-by-side development, have you updated the application symbols published to your service?

HennieBink commented 4 years ago

Hi @atoader, We use C/SIDE side-by-side development. We have generated the symbols using

finsql.exe Command=generatesymbolreference, Database=, ServerName=\ See: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-running-cside-and-al-side-by-side

No errors (no naverrorlog.txt is created).

I'm not sure what you mean by "Have you updated the application version while performing the technical upgrade?". We do have done a technical upgrade but I think we haven't updated the application version. Can you explain?

I think the last question is not applicable, we do side-by-side development.

atoader commented 4 years ago

When doing side-by-side development, the version of the application symbols are taken from the application version set in the database (applicationversion column in the dbo.$ndo$dbproperty table) . If this is set to 13.0.0.0, and you are trying to download application symbols 14.0.0.0, you will get an error saying that the symbols are not found. You can use https://docs.microsoft.com/en-us/powershell/module/microsoft.dynamics.nav.management/set-navapplication?view=businesscentral-ps-15 to set the application version to a value that makes sense to your scenario.

HennieBink commented 4 years ago

Great! This does the trick for the application version.

Following PS-script gives: ApplicationVersion 13.0.26413.0

Import-Module "${env:ProgramFiles}\Microsoft Dynamics 365 Business Central\140\Service\Microsoft.Dynamics.Nav.Management.psd1"-Force Get-NAVApplication -ServerInstance [ServerInstance]

Following PS-script sets ApplicationVersion to 14.0.36463.0

Import-Module "${env:ProgramFiles}\Microsoft Dynamics 365 Business Central\140\Service\Microsoft.Dynamics.Nav.Management.psd1"-Force Set-NAVApplication -ServerInstance [ServerInstance] -ApplicationVersion '14.0.36463.0' -Force

Following settings in app.json works fine now: "platform": "13.0.0.0", "application": "14.0.0.0",

When I change the platform version to 14 I still get the following error. Microsoft&appName=System&versionText=14.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments.

Do you know a way to update the platform/system version?

atoader commented 4 years ago

For the System.app that contains the system tables and codeunits, you will need to use Unpublish-NavApp to unpublish the existing symbols and Publish-NavApp to publish the new System.app for that platform version. You can find the new System.app on the DVD.

HennieBink commented 4 years ago

Thanks @atoader! Problems are solved!

Problem 1: Missing some references in a CAL/AL Side-by-side development environment

Solution: Generate Symbols with following batch-script (repeat after changes in C/AL) finsql.exe Command=generatesymbolreference, Database=, ServerName=

See: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-running-cside-and-al-side-by-side Important: Enable loading application symbols at server startup in Business Central Administration/Development

Problem 2: Can't find application symbols after upgrade

Solution: Update ApplicationVersion with following PS-Script Import-Module "${env:ProgramFiles}\Microsoft Dynamics 365 Business Central\140\Service\Microsoft.Dynamics.Nav.Management.psd1"-Force Set-NAVApplication -ServerInstance [ServerInstance] -ApplicationVersion '14.0.36463.0' -Force

Problem 3: Can't find the system symbols after upgrade

Solution: Unpublish old System.app and publish new System.app with following PS-Script Import-Module "${env:ProgramFiles}\Microsoft Dynamics 365 Business Central\140\Service\Microsoft.Dynamics.Nav.Management.psd1"-Force Unpublish-NAVApp -Name System -ServerInstance [ServerInstance]

Publish-NAVApp -Path "_[...]DVD\ModernDev\program files\Microsoft Dynamics NAV\140\AL Development Environment\System.app" -ServerInstance [ServerInstance]_ -PackageType SymbolsOnly