MissingTypeSymbol in Test Libraries
Describe the bug Test Libraries apparently don't include necessary symbols anymore. As far as I can see all procedures with a record as parameter are affected.
To Reproduce
- Create a docker container from "mcr.microsoft.com/businesscentral/sandbox:us" using NavContainerHelper with
-includeTestToolkitand-includeTestLibrariesOnly. - Create new project (code see below).
- Compile
error AL0133: Argument 1: cannot convert from 'Record "Sales Header"' to 'var __MissingTypeSymbol__'
pageextension 50100 CustomerListExt extends "Customer List"
{
trigger OnOpenPage();
var
LibrarySales: Codeunit "Library - Sales";
SalesHeader: Record "Sales Header";
begin
LibrarySales.CreateSalesInvoice(SalesHeader);
end;
}
Expected behavior Should compile without error.
5. Versions:
- AL Language: 4.0.209944
- Business Central: 15.3 (Platform 15.0.39447.0 + Application 15.3.39470.0)
The last version where this worked was 15.3.39275.0-us.
We are running into the same issue when trying to compile apps that use the test libraries on the next minor and next major version of BC.
Hi! It looks like you are using a preview version of the platform 15.3 with the version of the VSIX that is available from the marketplace. You should be using the version of the VSIX that comes on the Docker image. Could you try using that one and let us know if you are still facing the problem?
The VSIX from that docker image has the same version number, the error persists.
I am seeing the error in my build pipelines as well, the compiler used there is extracted from the respective image.
In the latest minor/major releases the issue is no longer present.
In the latest minor/major releases the issue is no longer present.
Which versions? We're still experiencing this problem in both bcinsider.azurecr.io/bcsandbox and bcsandbox-master
AL Compiler version 4.0.3.24415 (although the in the container is al-4.0.221017) for bcsandbox AL Compiler version 5.0.3.22698 for bcsandox-master
AL Compiler version 4.0.3.24415 (although the in the container is al-4.0.221017) for bcsandbox AL Compiler version 5.0.3.22698 for bcsandox-master
Those exact versions worked for me.
We are also running into the issue with the following AL compiler version (4.0.3.25368):

Results in:
error AL0133: Argument 1: cannot convert from 'Record "Sales Line Discount"' to 'var __MissingTypeSymbol__'
It looks like it might be standard methods that take a var record parameter (which of course a lot of the test library methods are). Calling var record parameters in our own app compiles as expected.
Hello!
Any news regarding this issue? We are also running into it on latest bcsandbox-master container (16.0.10855.0).
Download symbols:

Compiling with AL Compiler version 5.0.3.22698 results in:

As far as we know, the issue has been fixed. Can you please provide a full repro?
I had several repos build overnight which:
- failed against bcinsider.azurecr.io/bcsandbox - with the same errors that we've been discussing
- passed against bcinsider.azurecr.io/bcsandbox-master
Don't know if you're seeing the same results @MatjazSega?
@atoader what more info would you need for a repro? Can you compile code which calls a function with a var Record parameter in a container built from bcinsider.azurecr.io/bcsandbox?
@atoader I have created a new container from bcinsider.azurecr.io/bcsandbox-master (16.0.10961.0) and with compiler version 5.0.3.31592 our project builds successfully. It seems that new master version solved the issue. Thanks!
@jimmymcp I have also created a new container from bcinsider.azurecr.io/bcsandbox:latest (15.4.40515.0) and with compiler version 4.0.3.29696 successfully built our project. I am not sure if this changed recently, because we have been using 15.2 version and had no issues.
Hi, we are still struggling with this problem. This is the output from a build that I've just done against mcr.microsoft.com/businesscentral/sandbox.
Our main app compiles OK, but compiling the test app fails on test library functions that take var Record parameters. The same
Microsoft (R) AL Compiler version 4.0.3.34752 Copyright (C) Microsoft Corporation. All rights reserved
Compilation started for project 'Clever Handheld for Warehousing Tests' containing '22' files at '12:58:18.769'.
C:\ProgramData\NavContainerHelper\9d975bb3-9517-4671-a3f1-7023fec2eb7c\Tests\Cod9059379.SetupSubscriberCHHWTMN.al(6,48): error AL0284: The type of the parameter 'Customer' on the event subscriber 'OnAfterCreatedCustomer' does not match the expected type 'MissingTypeSymbol'. C:\ProgramData\NavContainerHelper\9d975bb3-9517-4671-a3f1-7023fec2eb7c\Tests\Cod9059379.SetupSubscriberCHHWTMN.al(21,45) : error AL0284: The type of the parameter 'Vendor' on the event subscriber 'OnAfterCreateVendor' does not match the expe cted type 'MissingTypeSymbol'. C:\ProgramData\NavContainerHelper\9d975bb3-9517-4671-a3f1-7023fec2eb7c\Tests\Cod9059379.SetupSubscriberCHHWTMN.al(35,43) : error AL0284: The type of the parameter 'Item' on the event subscriber 'OnAfterCreateItem' does not match the expected type 'MissingTypeSymbol'. C:\ProgramData\NavContainerHelper\9d975bb3-9517-4671-a3f1-7023fec2eb7c\Tests\Cod9059379.SetupSubscriberCHHWTMN.al(41,56) : error AL0284: The type of the parameter 'Item' on the event subscriber 'OnAfterCreateItemManufacturing' does not match the expected type 'MissingTypeSymbol'.
Compilation ended at '12:59:10.147'.
Am I doing something wrong?
Update: rebuilding the same code against mcr.microsoft.com/businesscentral/sandbox:15.2.39558.39825-w1-ltsc2016 works.
Building against bcinsider.azurecr.io/bcsandbox-master:latest-ltsc2016 also works.
Building against these current images does not work
- mcr.microsoft.com/businesscentral/sandbox
- bcinsider.azurecr.io/bcsandbox
😟
Hi @jimmymcp! I think the issue is resolved, but there might still be a problem with your build system. Are you downloading the following packages when building on 15.3 and later?
- "System"
- "System Application"
- "Base Application"
- "Application"
Hi @atoader,
Yes that was the resolution, thanks for your help. Now that we are downloading the Application symbols the builds are working again 👍