AL
AL copied to clipboard
Publishing AL Extension while another user is using a control addin freezes BC server
1. Describe the bug If a user has a control addin opened as a modal part of a page while someone publishes an updated AL extension to the same Business Central server, the server freezes and has to be restarted.
2. To Reproduce Steps to reproduce the behavior:
- Create a page using a control addin:
page 50000 ControlAddinPage
{
layout
{
area(Content)
{
usercontrol(ControlName; MyControlAddin)
{
}
}
}
}
- Create procedure to open the page containing the control addin (for example, by triggering the opening on some other page:
action("Open Control Addin"){
ApplicationArea = All;
trigger OnAction()
var
ControlAddinPage: Page "ControlAddinPage";
begin
ControlAddinPage.RunModal();
end;
}
- Let one user have the control addin page open while another user publishes an extension to be BC server.
3. Expected behavior The user currently using the control addin will be greeted with a message saying that an adminstrator has changed an extension and that the page needs to be closed. At the same time, the extension is published to the server.
4. Actual behavior The developer trying to publish a developer extension gets following error message: "Error: An error occurred while sending the request." and the BC server freezes until restarted.
5. Versions:
- AL Language: v8.3.570094
- Visual Studio Code: 1.62.3
- Business Central: DE Business Central 19.3
- List of Visual Studio Code extensions that you have installed: AL Language, AL AZ Dev Tools
So this is the cause of my error I get to enjoy multiple times throughout the day?
Error: An error occurred while sending the request.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
An existing connection was forcibly closed by the remote host.
Error: An error occured while processing the request.
I think it started occurring in BC 19+ but I have no idea how to reproduce, so maybe this is the key to it, I'm in fact working with a controladdin in a tab, with launchbrowser: false because I refresh the tab myself to see the changes.
Happens in OnPrem, w. Windows Authentication, BC 19.3 (at the time of this writing), latest vscode + AL Language extension. Really, really, really hope MS finds the source of this bug.
@IridiumWasTaken @bjarkihall - Are you still experiencing this issue? We haven't been able to reproduce this issue on the latest release
@qutreson No, but thanks for checking! At the time of the comment we had the controladdin in the same extension we were frequently publishing (a ~6000 object extension). We were also using .NET interoperability in the extension, which we're not doing anymore - but to see .NET changes we had to constantly restart the service tier in development, so maybe that could've been causing it? Maybe vscode or AL Language extension improved the handling of an active debugging session or the publishing process was polished? Either way, I'm really happy this bug is the thing of the past. :)
It could have been related to .NET files, but hard to say without having a repro of the issue. Thank you for confirming that the issue appears to be resolved on your side too!