-
Notifications
You must be signed in to change notification settings - Fork 275
Open
Description
1. Describe the bug
I tried to publish the full dependency tree after my cached credentials expired. I tried to publish to a an on-prem docker container. It compiles the projects and then fails with the following error:
[2026-01-13 13:47:30.51] Error: Exception of type 'Microsoft.Dynamics.Nav.Deployment.Authentication.UserNotAuthenticatedException' was thrown.
[2026-01-13 13:47:30.51] Error: Failed to publish: MyApp
[2026-01-13 13:47:30.51] Error: Microsoft.Dynamics.Nav.Deployment.Authentication.UserNotAuthenticatedException: Exception of type 'Microsoft.Dynamics.Nav.Deployment.Authentication.UserNotAuthenticatedException' was thrown.
at Microsoft.Dynamics.Nav.Deployment.Http.OnPremiseHttpClientFactory.GetCredentials(ConnectionOptions connectionOptions, IEmitLogger logger) in X:\source\Prod\Microsoft.Dynamics.Nav.Deployment\Http\OnPremiseHttpClientFactory.cs:line 107
at Microsoft.Dynamics.Nav.Deployment.Http.OnPremiseHttpClientFactory.Create(ConnectionOptions connectionOptions, IEmitLogger logger, Boolean skipRequestLogging, CookieContainer cookieContainer) in X:\source\Prod\Microsoft.Dynamics.Nav.Deployment\Http\OnPremiseHttpClientFactory.cs:line 61
at Microsoft.Dynamics.Nav.Deployment.ApiClients.AppsApiClient.GetHttpClient() in X:\source\Prod\Microsoft.Dynamics.Nav.Deployment\ApiClients\AppsApiClient.cs:line 191
at Microsoft.Dynamics.Nav.Deployment.ApiClients.AppsApiClient.SendPackage(Uri uri, String packageFilePath, DependencyPublishingOption publishingOption, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.Deployment\ApiClients\AppsApiClient.cs:line 89
at Microsoft.Dynamics.Nav.Deployment.ApiClients.AppsApiClient.PublishPackageFile(String packageFilePath, SchemaUpdateMode schemaUpdateMode, CancellationToken cancellationToken, Boolean isRad, DependencyPublishingOption publishingOption, Boolean forceUpgrade, Boolean disableInstallDebugging) in X:\source\Prod\Microsoft.Dynamics.Nav.Deployment\ApiClients\AppsApiClient.cs:line 78
at Microsoft.Dynamics.Nav.Deployment.Publishing.Publisher.Publish(PublishOptions options, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.Deployment\Publishing\Publisher.cs:line 64
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.BuildAndPublishHelper.PublishProjectsAsync(VsCodeWorkspace workspace, IEmitLogger logger, Func`3 publishCallback, IFileSystem fileSystem, List`1 sortedProjects, PooledDictionary`2 outputFileLookup, PublishOptions publishOptions, Solution currentSolution, CustomTelemetryEvent telemetryEvent, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\BuildAndPublishHelper.cs:line 350
This does only affect on-prem. I could publish the full dependency tree for my cloud sandbox.
2. To Reproduce
Steps to reproduce the behavior:
- Clear credentials cache (or let it expire)
- Add an on-prem launch configuration to launch.json or to the workspace file
- Run the command "AL: Publish full dependency tree for active project"
- Open the "OUTPUT" view (Ctrl+Shift+U)
- Wait for the exception
3. Expected behavior
Asking for Username and Password and then publish the full dependency tree
4. Actual behavior
Not asking for username/password and throwing an error after compiling the projects.
5. Versions:
- AL Language: Version: 17.0.1998613
- Visual Studio Code: 1.108.0
- Business Central: BC25
- Operating System: Windows
** 6. Workaround **
- First use "AL: Publish with debugging" or any other Publish/Debug command except the full dependency thingy.
- Enter your credentials
- Run "AL: Publish full dependency tree ..."
Metadata
Metadata
Assignees
Labels
No labels