AL icon indicating copy to clipboard operation
AL copied to clipboard

Can't download symbols NAV 2018

Open j-wilder opened this issue 8 years ago • 7 comments

Trying to download the symbols for a specific database. I have no problem doing this on a Cronus database all works fine. I have a database from a Partner that does not have the symbol metadata in it. I am doing this all on NAV 2018 CU8 (11.0.23572.0).

When I run Get-NavAppInfo -ServerInstance DynamicsNAV110 -SymbolsOnly against this same database nothing is returned. This issue is talked about in this post: https://github.com/Microsoft/AL/issues/1186

My next step is to get the "application" symbols installed. In a command prompt I changed my directory to C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client and then ran this command finsql.exe Command=generatesymbolreference, Database="MyDatabaseName", ServerName=MySQLServerName. Seems like nothing was happening but I noticed there was a process called Microsfot Dynamics NAV Developement Environment that was present for about 30 minutes. As soon as it went away I re-ran Get-NavAppInfo -ServerInstance DynamicsNAV110 -SymbolsOnly and still returns nothing. If I run the finsql.exe Command=generatesymbolreference again a process appears for about 30 seconds then goes away but still no Symbols were created.

Now what?

j-wilder avatar Sep 11 '18 18:09 j-wilder

Symbols must be loaded into the database via Powershell. Here a link with how to do this task: https://blogs.msdn.microsoft.com/nav/2018/02/02/import-symbols-in-new-or-upgrade-databases-with-microsoft-dynamics-nav-2018/

demiliani avatar Sep 11 '18 20:09 demiliani

Good link. I am now able to see the System and Test Symbols when running Get-NavAppInfo -ServerInstance DynamicsNAV110 -SymbolsOnly . To get the Application symbols the Fin.exe command ran for 1572 seconds and then I saw some errors in the navcommandresult.txt file (there is no naverrorlog.txt) which I have attached.

navcommandresult.txt

Because there are errors does it not create any application symbols (since it is not show when I run Get-NavAppInfo -ServerInstance DynamicsNAV110 -SymbolsOnly)? Do I need to correct all errors before I can get the application symbols?

j-wilder avatar Sep 12 '18 13:09 j-wilder

Not a good sign id there are errors. I think you need to fix them.

demiliani avatar Sep 12 '18 15:09 demiliani

Did you see the line number (666) of the first error, pretty creepy!

The first 3 errors are from declaring a system.array dotnet variable (Array@50003 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Array";)

I saw another codeunit that declared this same variable but instead of a subtype of System.Array.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' it used System.Array.'mscorlib'

This other codeunit is not causing any symbol generation issues so why are these 3 erroring on that variable declaration?

j-wilder avatar Sep 12 '18 17:09 j-wilder

What happens if you start finsql.exe with the generatesymbolreference=yes flag and compile the failing application objects? Does that succeed? It could be an issue in the .net symbol reference generation, that may have been fixed in the latest docker versions and not backported. Nav 2018 related issues are handled as described here: https://github.com/Microsoft/AL/wiki/Frequently-Asked-Questions

kalberes avatar Sep 13 '18 07:09 kalberes

@kalberes good idea. When I open the Developer Environment with generatesymbolreference=yes and compile the offending objects I get the same message that I get in the navcommandresult.txt. This is nice though because I see the message immediately instead of waiting for the navcommandresult.txt to generate. Still stuck.

j-wilder avatar Sep 13 '18 12:09 j-wilder

I have found the issue to the error I was getting with ([Codeunit Amazon FBM Import Header]: Symbol reference generation failed in application object 50066, line 666, column 7, message Begin expected.) This stemmed from the variable name. Here is my variable: (Array@50003 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Array";)

Notice the name of the variable is "Array" which is the same name of the class System.Array. Though this compiles fine in C/AL, AL is getting confused with the name of the variable and the type of the variable because they are the same. I simply changed the name of the variable to vArray and problem is solved.

It was super helpful entering the C/AL developer environment with generatesymbolreference=yes so I could try different things and see if it works in realtime so thanks for that tip kalberes.

j-wilder avatar Sep 20 '18 13:09 j-wilder