AL icon indicating copy to clipboard operation
AL copied to clipboard

Unable to download symbols for newly created local docker sandbox environment (2020 wave 2)

Open QaziTanzeel opened this issue 4 years ago • 13 comments

Hello folks, I created a local docker container of sandbox for wave 2, 2020. Following are the commands that I used to create the sandbox environment.

$artifactUrl = Get-BCArtifactUrl -select Latest
$credential = New-Object pscredential 'admin', (ConvertTo-SecureString -String 'Alpha_975' -AsPlainText -Force)
New-BcContainer -accept_eula -containerName ax365bc -artifactUrl $artifactUrl -Credential $credential -assignPremiumPlan -updateHosts -imageName mcr.microsoft.com/businesscentral -includeAL  -includeTestToolkit -installCertificateOnHost -memoryLimit 6G  -useSSL 

The container got successfully created and I can browse and everything seems fine. I then created an extension in VS Code using the AL Go, but when I try to download symbols I am getting the following error.

Authorization has failed or the credentials have expired. The credential cache has been cleaned. Any access to reach Business Central would require new authorization.

Following the launch.json and app.json files

Launch.json

{ "version": "0.2.0", "configurations": [ { "name": "Your own server", "request": "launch", "type": "al", "environmentType": "Sandbox", "server": "https://ax365bc", "serverInstance": "BC", "authentication": "UserPassword", "startupObjectId": 22, "startupObjectType": "Page", "breakOnError": true, "launchBrowser": true, "enableLongRunningSqlStatements": true, "enableSqlInformationDebugger": true, "tenant": "default" } ] }

app.json

{ "id": "8d8e0534-bda4-4907-8867-aeb58e05f623", "name": "ALProject3", "publisher": "Default publisher", "version": "1.0.0.0", "brief": "", "description": "", "privacyStatement": "", "EULA": "", "help": "", "url": "", "logo": "", "dependencies": [], "screenshots": [], "platform": "17.0.0.0", "application": "17.0.0.0", "idRanges": [ { "from": 50100, "to": 50149 } ], "contextSensitiveHelpUrl": "https://ALProject3.com/help/", "showMyCode": true, "runtime": "6.0" }

This is the user card, below, I tried the username with and without the domain name, but no luck.

(image)

QaziTanzeel avatar Nov 02 '20 20:11 QaziTanzeel

Can you try clearing your credentials and redownload the symbols?

atoader avatar Nov 03 '20 17:11 atoader

after creating the new docker machine based on runtime 17 (2020 wave 2). I was unable to download even for the first time. I cleared credentials for not less than hundred of times but no luck.

QaziTanzeel avatar Nov 03 '20 18:11 QaziTanzeel

Adding "tenant": "default" to launch.json solved it for me.

https://demiliani.com/2020/08/28/dynamics-365-business-central-sandbox-docker-containers-and-multitenancy/

TrippyZ avatar Nov 11 '20 16:11 TrippyZ

We will look into improving the experience by introducing a better error message.

atoader avatar Nov 12 '20 11:11 atoader

Adding "tenant": "default" to launch.json solved it for me.

https://demiliani.com/2020/08/28/dynamics-365-business-central-sandbox-docker-containers-and-multitenancy/

Thanks, this works for me :-)

jeffreypoen avatar Nov 17 '20 10:11 jeffreypoen

Adding "tenant": "default" to launch.json solved it for me.

https://demiliani.com/2020/08/28/dynamics-365-business-central-sandbox-docker-containers-and-multitenancy/

Worked for me too. Thanks

KuljitSinghParmar avatar Dec 21 '20 17:12 KuljitSinghParmar

We will look into changing the default configuration to contain the default tenant.
https://freddysblog.com/tag/multitenancy/

atoader avatar Dec 28 '20 15:12 atoader

I'm getting this error message against a real installation. I do have tenant default already (and so did the OP). It doesn't ask for any credentials, and I have not given any. It's a different problem though because it's windows login, and my computers login differs from the login on the server which I connect to using a vpn tunnel. A better error message, or a prompt to enter the credentials of the server is needed.. I had to revert to UserPassword login to be able to debug there. I see you have input-needed tag attached. Let me know what you need to know @atoader

AbsolutelyFreeWeb avatar Feb 19 '21 19:02 AbsolutelyFreeWeb

Hey @atoader may I ask what's the current status of this https://github.com/microsoft/AL/issues/6273#issuecomment-751746196?

@AbsolutelyFreeWeb I don't think https://github.com/microsoft/AL/issues/6273#issuecomment-782303315 belongs here any longer, so maybe it's time to reference it in a new issue.

This issue can be closed, even tho @QaziTanzeel hasn't answered to this, I think.

Thanks @TrippyZ for the solution!

christianbraeunlich avatar Dec 01 '21 16:12 christianbraeunlich

It looks to me like atoader no longer works on this project / for MS.

dzzzb avatar Dec 01 '21 16:12 dzzzb

I am getting this error on a newly created sandbox container running the latest build (19.5). Tenant is set to Default, but on the other hand it is also set to default in the supplied launch.json of the original question. Unless I misunderstand something. Does anybody have any other idea what can be done about it?

bdgjope avatar Mar 18 '22 15:03 bdgjope

I suggest that you raise a new issue and refer back to this one.

TrippyZ avatar Mar 18 '22 15:03 TrippyZ

I have the same issue on an Onpremis BC 2017. This is how it resolved https://dynamics-inspire.com/any-access-to-reach-business-central-would-require-new-authorization/

rehansatti-DI avatar Nov 15 '23 06:11 rehansatti-DI