AL icon indicating copy to clipboard operation
AL copied to clipboard

Unable to download symbols after visual studio code update

Open umang11 opened this issue 7 years ago • 21 comments

[Error - 3:11:45 PM] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible. Processing of message 'al/downloadSymbols' failed with error: 'Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.' Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.NavServerRequestHandler1.<HandleAsync>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.NavServerRequestHandler1.HandleAsync(T request, Int32 requestId, CancellationToken cancellationToken) at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.d__9.MoveNext() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 43 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.d__6.MoveNext() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 64

=== Pre-bind state information === LOG: DisplayName = System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///c:/Users/usrivastava/.vscode/extensions/ms-dynamics-smb.al-3.0.115791/bin/ LOG: Initial PrivatePath = NULL Calling assembly : Microsoft.Dynamics.Nav.EditorServices.Protocol, Version=3.0.1.50257, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

LOG: This bind starts in default load context. LOG: Using application configuration file: c:\Users\usrivastava.vscode\extensions\ms-dynamics-smb.al-3.0.115791\bin\Microsoft.Dynamics.Nav.EditorServices.Host.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: Attempting download of new URL file:///c:/Users/usrivastava/.vscode/extensions/ms-dynamics-smb.al-3.0.115791/bin/System.Net.Http.DLL. LOG: Attempting download of new URL file:///c:/Users/usrivastava/.vscode/extensions/ms-dynamics-smb.al-3.0.115791/bin/System.Net.Http/System.Net.Http.DLL. LOG: Attempting download of new URL file:///c:/Users/usrivastava/.vscode/extensions/ms-dynamics-smb.al-3.0.115791/bin/System.Net.Http.EXE. LOG: Attempting download of new URL file:///c:/Users/usrivastava/.vscode/extensions/ms-dynamics-smb.al-3.0.115791/bin/System.Net.Http/System.Net.Http.EXE.

umang11 avatar Apr 16 '19 09:04 umang11

Please install .Net Framework 4.7.2 and restart machine and try again

pmohanakrishna avatar Apr 16 '19 11:04 pmohanakrishna

Hi @umang11, can you follow the steps listed above and update us if it has fixed your issue?

qutreson avatar Apr 16 '19 11:04 qutreson

Please install .Net Framework 4.7.2 and restart machine and try again

Mohana,

I've got the same issue, but I've already get .net fw 4.7.2 installed; reboot did not help.

ajansari avatar Apr 16 '19 17:04 ajansari

Update: Through trial and error, here's what I found out.

I'm able to download symbols if I change the following in app.json from:

  "platform": "14.0.0.0",
  "application": "14.0.0.0",
  "runtime": "3.0"

to

  "platform": "13.0.0.0",
  "application": "13.0.0.0",
  "runtime": "2.2"

Also, note that runtime 2.2 does not support "idranges" (for multiple id ranges); be sure to change to "idrange" as shown below.

  "idRange": {
      "from": 60000,
      "to": 60005
    },

With these changes, I am able to download symbols just fine.

ajansari avatar Apr 16 '19 17:04 ajansari

@ajansari which version of Business Central are you targeting? If you are not targeting the April 19 release (version 14.0), but the Fall 18 (version 13.*) release you should use 13.0.0.0 for the symbols in your manifest.

qutreson avatar Apr 16 '19 19:04 qutreson

Please install .Net Framework 4.7.2 and restart machine and try again

Installed .net framework 4.7.2 but still not able to download symbols for my sandbox.

App.json { "id": "8d8dfb71-79dd-4b8a-b65f-f395d0000d35", "name": "ALProject2", "publisher": "Default publisher", "brief": "", "description": "", "version": "1.0.0.0", "privacyStatement": "", "EULA": "", "help": "", "url": "", "logo": "", "capabilities": [], "dependencies": [], "screenshots": [], "platform": "14.0.0.0", "application": "14.0.0.0", "idRange": { "from": 50100, "to": 50149 }, "runtime": "3.0" }

Launch.JSon { "version": "0.2.0", "configurations": [ { "type": "al", "request": "launch", "name": "Microsoft cloud sandbox", "startupObjectId": 22, "startupObjectType": "Page", "breakOnError": true } ] }

error : [2019-04-17 09:06:47.51] Using reference symbols cache path: c:\Users\usrivastava\Documents\AL\ALProject2./.alpackages [2019-04-17 09:06:47.51] Authenticating... [2019-04-17 09:06:48.10] Sending request to https://api.businesscentral.dynamics.com/v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Application&versionText=14.0.0.0 [2019-04-17 09:06:48.10] Sending request to https://api.businesscentral.dynamics.com/v1.0/sandbox/dev/packages?publisher=Microsoft&appName=System&versionText=14.0.0.0 [2019-04-17 09:07:29.06] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Application&versionText=14.0.0.0 failed with code InternalServerError. Reason: Internal Server Error [2019-04-17 09:07:29.06] 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.

umang11 avatar Apr 17 '19 03:04 umang11

Update: Through trial and error, here's what I found out.

I'm able to download symbols if I change the following in app.json from:

  "platform": "14.0.0.0",
  "application": "14.0.0.0",
  "runtime": "3.0"

to

  "platform": "13.0.0.0",
  "application": "13.0.0.0",
  "runtime": "2.2"

Also, note that runtime 2.2 does not support "idranges" (for multiple id ranges); be sure to change to "idrange" as shown below.

  "idRange": {
      "from": 60000,
      "to": 60005
    },

With these changes, I am able to download symbols just fine.

This worked for BC Onprem but not for sandbox environment

umang11 avatar Apr 17 '19 03:04 umang11

@umang11, can you try using the designer in your sandbox? If you can successfully create an extension with it, it means that symbols are published there and that you are hitting the same issue as #4787. As a workaround, if you could download symbols from your on-prem instance, you could then copy them to the .alpackages of the project your are developing for your sandbox.

qutreson avatar Apr 17 '19 06:04 qutreson

@umang11, can you try using the designer in your sandbox? If you can successfully create an extension with it, it means that symbols are published there and that you are hitting the same issue as #4787. As a workaround, if you could download symbols from your on-prem instance, you could then copy them to the .alpackages of the project your are developing for your sandbox.

but my on-prem and online versions are diffrent

umang11 avatar Apr 17 '19 07:04 umang11

@umang11 @ajansari First we need to check sandbox version in system information page and use that in our app.json I guess current one is 13.5 then we have to use 13.5.0.0 in app.json and not 14.0.0.0 and same with runtime property.

pmohanakrishna avatar Apr 17 '19 10:04 pmohanakrishna

Update: Through trial and error, here's what I found out. I'm able to download symbols if I change the following in app.json from:

  "platform": "14.0.0.0",
  "application": "14.0.0.0",
  "runtime": "3.0"

to

  "platform": "13.0.0.0",
  "application": "13.0.0.0",
  "runtime": "2.2"

Also, note that runtime 2.2 does not support "idranges" (for multiple id ranges); be sure to change to "idrange" as shown below.

  "idRange": {
      "from": 60000,
      "to": 60005
    },

With these changes, I am able to download symbols just fine.

This worked for BC Onprem but not for sandbox environment

Umang, I was able to get it working for both. (And publish to both BC Cloud with Spring 2019 Update, and a tenant that Microsoft has not yet updated and is on Fall 2018 Update)

ajansari avatar Apr 17 '19 15:04 ajansari

We got error when we tried to download symbol from 14.0.0.0.0 sandbox, here is error return

[2019-04-22 17:47:44.25] Targeting Dynamics 365 Business Central. [2019-04-22 17:47:44.28] Sending request to https://api.businesscentral.dynamics.com/v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Application&versionText=14.0.0.0 [2019-04-22 17:47:44.29] Sending request to https://api.businesscentral.dynamics.com/v1.0/sandbox/dev/packages?publisher=Microsoft&appName=System&versionText=14.0.0.0 [2019-04-22 17:48:27.85] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Application&versionText=14.0.0.0 failed with code InternalServerError. Reason: Internal Server Error [2019-04-22 17:48:27.85] 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.

We tried to use design mode and download code, in the app.json, the platform and application version are slightly different, but even we refer to that, helloworld download symbol still return same error message.

Am I missing anything?

Thanks Tom

tguangithub avatar Apr 23 '19 00:04 tguangithub

Has anyone solved this?

My steps:

1- AL:GO 2- insert name and server properties in my launch.json 3- Download symbols 4- Same error as @tguangithub

If I change the Application version and platform to 13.0.0.0(initially was 14.0.0.0) I am able to download symbols but I cant publish because of the runtime version.

[2019-04-29 16:34:28.52] The request for path /v1.0/sandbox/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: The runtime version of the extension package is currently set to '3.0'. The runtime version must be set to '2.4' or earlier in the app.json file in order to install the extension package on this server.

BCRog avatar Apr 29 '19 16:04 BCRog

Thank you, We are working on fix for this issue. A work around would be to get the symbols from another source and update the package. In case it is blocking you please open a support ticket.

AndreyKorepanov avatar Apr 30 '19 12:04 AndreyKorepanov

Same issue in #4935

AndreyKorepanov avatar Apr 30 '19 12:04 AndreyKorepanov

We are experiencing the same issue when downloading symbols from sandbox. Any solution yet?

Pbossen avatar May 14 '19 12:05 Pbossen

is there any update regarding this we are still facing the same issue.

umang11 avatar May 16 '19 06:05 umang11

Closing this issue as it is tracked by #4895.

We made a fix that has been deployed to tenants running on Spring 2019 CU1 and that we are in the process of backporting and deploying to other versions. In the meanwhile, you should try to get your symbols from another source, by either opening a ticket or by downloading them from docker as mentioned in #4935

qutreson avatar Jun 05 '19 20:06 qutreson

Hello all,

I am unable to download symbols: It takes 10 minutes to run this command 'Download Symbols' and then download fails and throws following error:

[2020-05-27 10:14:42.61] Sending request to https://api.businesscentral.dynamics.com/v2.0/dev/packages?publisher=Microsoft&appName=Base Application&versionText=15.0.0.0 [2020-05-27 10:24:42.66] Error: The request was canceled by the system because it exceeded the maximum timeout period. Set the property 'disableHttpRequestTimeout' to 'true' in your launch configuration and try again. [2020-05-27 10:24:42.66] Error: An error occured while processing the request. Request ID: f28c8360-c60a-4c01-aeea-bb462232e976 Session ID: c2bf2ee3-e370-477e-8910-1e55c115e4f2

If you are targeting a cloud instance, supply these IDs if contacting Microsoft support.

I am using BC version 15.x

I have defined Tenant ID as well as SandboxName in launch.json

I have defined versions aptly as well.

I have user permissions of D365 Extension Mgt.

I would really appreciate prompt help from anyone on the matter!

For your reference following is my launch.json { "version": "0.2.0", "configurations": [ { "type": "al", "request": "launch", "name": "Microsoft cloud sandbox", "breakOnError": true, "launchBrowser": true, "enableLongRunningSqlStatements": true, "enableSqlInformationDebugger": true, "tenant": "***************", "sandboxName": "" } ] }

Following is app.json: { "id": "33aa87d3-a166-49ea-97dd-ddae8e137719", "name": "ALProject1", "publisher": "Default publisher", "version": "1.0.0.0", "brief": "", "description": "", "privacyStatement": "", "EULA": "", "help": "", "url": "", "logo": "", "dependencies": [ { "appId": "63ca2fa4-4f03-4f2b-a480-172fef340d3f", "publisher": "Microsoft", "name": "System Application", "version": "1.0.0.0" }, { "appId": "437dbf0e-84ff-417a-965d-ed2bb9650972", "publisher": "Microsoft", "name": "Base Application", "version": "15.0.0.0" } ], "screenshots": [], "platform": "15.0.0.0", "idRanges": [ { "from": 50100, "to": 50149 } ], "contextSensitiveHelpUrl": "https://ALProject1.com/help/", "showMyCode": true, "runtime": "4.0" }

neelam-arya avatar May 27 '20 05:05 neelam-arya

See last comment from this discussion:

"you should try to get your symbols from another source, by either opening a ticket or by downloading them from docker as mentioned in #4935"

qutreson avatar May 27 '20 07:05 qutreson