How do I download symbols for Business Central on-premise?

Hi experts,

Our customer uses Business Central version 13.11 op-premise. (13.0.35820.0.)

When I log on the NAV-server, I cannot download symbols in Visual Studio Code, even though I am on the same server as BC.

I get this output:


[2020-03-25 10:30:50.25] Using reference symbols cache path: c:\Users\admms\Desktop\MHS\AL\Forh\./.alpackages
[2020-03-25 10:30:50.30] Targeting server 'http://FFS01NAV.montes.dk' and server instance 'BC365-FFS-UDV'.
[2020-03-25 10:30:50.30] Using Windows authentication.
[2020-03-25 10:30:50.33] Sending request to http://ffs01nav.montes.dk:7049/BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=System&versionText=15.0.0.0
[2020-03-25 10:30:50.35] Sending request to http://ffs01nav.montes.dk:7049/BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=System Application&versionText=1.0.0.0
[2020-03-25 10:30:50.35] Sending request to http://ffs01nav.montes.dk:7049/BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=Base Application&versionText=15.0.0.0
[2020-03-25 10:30:50.39] Error: Der opstod en fejl under afsendelse af anmodningen.
Den underliggende forbindelse blev lukket: Der opstod en uventet fejl ved modtagelse..
Der kunne ikke læses data fra transportforbindelsen: En eksisterende forbindelse blev tvangsafbrudt af en ekstern vært.
En eksisterende forbindelse blev tvangsafbrudt af en ekstern vært

[2020-03-25 10:30:50.39] Error: Der opstod en fejl under afsendelse af anmodningen.
Den underliggende forbindelse blev lukket: Der opstod en uventet fejl ved modtagelse..
Der kunne ikke læses data fra transportforbindelsen: En eksisterende forbindelse blev tvangsafbrudt af en ekstern vært.
En eksisterende forbindelse blev tvangsafbrudt af en ekstern vært

[2020-03-25 10:30:50.41] Error: Der opstod en fejl under afsendelse af anmodningen.
Den underliggende forbindelse blev lukket: Der opstod en uventet fejl ved modtagelse..
Der kunne ikke læses data fra transportforbindelsen: En eksisterende forbindelse blev tvangsafbrudt af en ekstern vært.
En eksisterende forbindelse blev tvangsafbrudt af en ekstern vært

Translated into something like: "There was an error when sending the request. The underlying connection was closed: There was an unexpected error when receiving.. It was not possible to read data from the transport connection: An existing connection was forced to close by an external host."


Launch.json:
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "Your own server",
"server": "http://FFS01NAV.montes.dk",
"serverInstance": "BC365-FFS-UDV",
"authentication": "Windows",
"startupObjectId": 22,
"startupObjectType": "Page",
"breakOnError": true,
"launchBrowser": true,
"enableLongRunningSqlStatements": true,
"enableSqlInformationDebugger": true

Best Answers

  • MortenSteengaardMortenSteengaard Member Posts: 130
    Answer ✓
    Thanks, ShaiHulud.
    Your answer made me look into the version number and platform number in my files. It turned out that my entire project was made on a wrong version of BC. When I made my "AL:Go!" project in Visual Studio Code, I selected the version that in my opinion matched the CU. I should have selected the one that matches October 2018 where BC version 13 is from.

    But now I have a new projekt with symbols loaded. I have made my app file.

    When I press F5 it makes the app file, but cannot start BC in a browser because it is not set up to use a browser. (I get this error: "Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set.")

    Is is possible for me to install my app in BC in some other way? I cannot find anywhere in BC the option to create/install a new extension.

Answers

  • airamairam Member Posts: 88
    Is the service running?
  • sanjoypaulsanjoypaul Member Posts: 6
    add Port-

    like
    "port": 7049
  • MortenSteengaardMortenSteengaard Member Posts: 130
    Hi again.

    I am sorry, it took a long time for me to get back to this. Other tasts were more important...

    Airam:
    The server instance "BC365-FFS-UDV" is running fine and I can use this Business Central from my browser. Is there any specific other service, that we should have started?

    Sanjoypaul:
    I can see that when I try to download symbols, the system find out that it should use port 7049. You can see that in the error messages above. That is the port number that is standing under "Management services" in the "Business Central Administration" program.

    So it must be correct, as far as I know.

    I get the same result if I add the line, "port": 7049, as you suggested.

    I hope you can help me...
  • MortenSteengaardMortenSteengaard Member Posts: 130
    Thank you very much, ShaiHulud.

    Now I get this error:

    [2020-04-15 15:37:55.91] Using reference symbols cache path: c:\Users\admms\Desktop\MHS\AL\Forh\./.alpackages
    [2020-04-15 15:37:55.91] Sending request to http://ffs01nav.montes.dk:7053/BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=System&versionText=15.0.0.0
    [2020-04-15 15:37:55.91] Sending request to http://ffs01nav.montes.dk:7053/BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=System Application&versionText=1.0.0.0
    [2020-04-15 15:37:55.91] Sending request to http://ffs01nav.montes.dk:7053/BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=Base Application&versionText=15.0.0.0
    [2020-04-15 15:37:55.96] The request for path /BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=Base%20Application&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments.
    [2020-04-15 15:37:55.97] The request for path /BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=System%20Application&versionText=1.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments.
    [2020-04-15 15:37:55.99] The request for path /BC365-FFS-UDV/dev/packages?publisher=Microsoft&appName=System&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments.
    [2020-04-15 15:37:55.99] 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.

    My app.json looks like this:

    {
    "id": "22bbee0e-bc08-40ab-a548-def06b003904",
    "name": "Forh",
    "publisher": "Default publisher",
    "version": "1.0.0.0",
    "brief": "",
    "description": "",
    "privacyStatement": "",
    "EULA": "",
    "help": "",
    "url": "",
    "logo": "",
    "dependencies": [
    {
    "appId": "63ca2fa4-4f03-4f2b-a420-172fef340d3f",
    "publisher": "Microsoft",
    "name": "System Application",
    "version": "1.0.0.0"
    },
    {
    "appId": "437dbf0e-84ff-417a-964d-ed2bb9650972",
    "publisher": "Microsoft",
    "name": "Base Application",
    "version": "15.0.0.0"
    }
    ],
    "screenshots": [],
    "platform": "15.0.0.0",
    "idRanges": [
    {
    "from": 50100,
    "to": 50149
    }
    ],
    "contextSensitiveHelpUrl": "https://Forh.com/help/",
    "showMyCode": true,
    "runtime": "4.0"
    }

    I have changed the ids in this comment, because I don't know if they can be used for hacking, if I publish them here.

    I'm wondering if the fields "platform" and "runtime" are correct. But I don't know.

    I also think it is funny that I should write this in launch.json:

    "name": "Your own server",

    I cannot find any real description of this field anywhere.
  • ShaiHuludShaiHulud Member Posts: 228
    Sounds like the packages (System, Application, Base Application) are either not published (some info on that here in step 6), or unreachable. Have you tried changing the server address to use IP? Also, do you have SSL enabled? If so, then the server address needs to say "https" instead of "http"
  • MortenSteengaardMortenSteengaard Member Posts: 130
    Answer ✓
    Thanks, ShaiHulud.
    Your answer made me look into the version number and platform number in my files. It turned out that my entire project was made on a wrong version of BC. When I made my "AL:Go!" project in Visual Studio Code, I selected the version that in my opinion matched the CU. I should have selected the one that matches October 2018 where BC version 13 is from.

    But now I have a new projekt with symbols loaded. I have made my app file.

    When I press F5 it makes the app file, but cannot start BC in a browser because it is not set up to use a browser. (I get this error: "Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set.")

    Is is possible for me to install my app in BC in some other way? I cannot find anywhere in BC the option to create/install a new extension.
  • ShaiHuludShaiHulud Member Posts: 228
    Thanks, ShaiHulud.
    Your answer made me look into the version number and platform number in my files. It turned out that my entire project was made on a wrong version of BC. When I made my "AL:Go!" project in Visual Studio Code, I selected the version that in my opinion matched the CU. I should have selected the one that matches October 2018 where BC version 13 is from.

    But now I have a new projekt with symbols loaded. I have made my app file.

    When I press F5 it makes the app file, but cannot start BC in a browser because it is not set up to use a browser. (I get this error: "Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set.")

    Is is possible for me to install my app in BC in some other way? I cannot find anywhere in BC the option to create/install a new extension.

    Once the app file is made, you can deploy it to any compatible system using powershell's commands (Administration Shell). First you publish, then you install:
    Publish-NAVApp -ServerInstance <Server instance name> -Path "<full path to the app file>"
    Install-NavApp -ServerInstance <Server instance name> -Name "<name you gave your extension>"
    
  • MortenSteengaardMortenSteengaard Member Posts: 130
    Thanks again. You are great!

    I get this error, when I publish:

    Publish-NAVApp -ServerInstance BC365-FFS-UDV -Path "<my file>"
    WARNING: This license is not compatible with this version of Business Central.
    Publish-NAVApp : You cannot publish an extension that has not been code signed. To overrule this check and publish the
    unsigned extension, set the –SkipVerification parameter.
    At line:1 char:1
    + Publish-NAVApp -ServerInstance BC365-FFS-UDV -Path "C:\Users\admms\De ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Publish-NAVApp], InvalidOperationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC365-FFS-UDV/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp

    I didn't understand that, but I tried setting the -SkipVerification parameter. Then I got this error:

    PS C:\Windows\system32> Publish-NAVApp -ServerInstance BC365-FFS-UDV -Path "<my file>" -SkipVerification
    WARNING: This license is not compatible with this version of Business Central.
    Publish-NAVApp : This extension cannot be published into the global scope because it is currently or was previously published into the tenant scope. An extension cannot be published into multiple scopes at the same time. Also, you cannot change the scope for an extension, unless you make sure that it was unpublished, and you then restart the service.
    At line:1 char:1
    + Publish-NAVApp -ServerInstance BC365-FFS-UDV -Path "C:\Users\admms\De ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Publish-NAVApp], InvalidOperationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC365-FFS-UDV/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp

    There is only one (or should I say zero?) tenant(s) in this BC.
  • MortenSteengaardMortenSteengaard Member Posts: 130
    You are right!
    My functionality is there and I can see my app on the list of installed extensions.
    And if I change anything in VS Code and press F5, it gets published and installed in BC at once.

    Thank you very much!
Sign In or Register to comment.