microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
722 stars 242 forks source link

Sending notification workspace/didChangeConfiguration failed #7664

Closed sschuh closed 4 months ago

sschuh commented 5 months ago

1. Describe the bug Everytime i open a workspace i get the following error message.

image

[Error - 9:41:18 AM] Sending notification workspace/didChangeConfiguration failed

2. To Reproduce Open a workspace file.

{
    "folders": [
        {
            "name": ".alpackages",
            "path": ".alpackages"           
        },
        {
            "name": "App",
            "path": "app"           
        },
        {
            "name": "TestApp",
            "path": "testapp"
        }
    ],
    "settings": {
    }
}

3. Expected behavior No error message :(

4. Actual behavior Error message.

5. Versions:

javisoft commented 4 months ago

I had the same issue, and it was a typo within the app.json file. I found it by looking at the git pending changes. The app.json was like this:

image

Removing the typo: "F" got rid of the error. I replicated it by putting it back, and I got the same error again with a delayed loading workspace dialog.

image

I hope that helps.

sschuh commented 4 months ago

Hi,

thanks for the suggestion. I double checked my app.json's and can not find any typo or special characters.

If needed for analysis i will send my app.json's in here.

kalberes commented 4 months ago

Hi @sschuh

I have tried this a few times on the latest 24.x and I have no repro. Do you have an active workspace? In other words do you have any AL file, or the app.json opened with keyboard focus on when you have opened your workspace?

sschuh commented 4 months ago

Hi,

nothing opened.

Version: v14.0.951286 (pre-release)

image

The error comes before the loading of the workspace. After i open the app.json in the app-Folder, the process starts loading:

image
fvet commented 4 months ago

Same here when opening workspace files (no active editor / file opened)

image

Name: AL Language extension for Microsoft Dynamics 365 Business Central Id: ms-dynamics-smb.al Description: Development tools for Dynamics 365 Business Central Version: 14.0.951286 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al

When packaging the app, I then get below output

[Error - 11:51:07 PM] No active project was found. Make sure to select a project in the VS Code Explorer.

JesperSchulz commented 4 months ago

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25.0.17048.0 and VS Code Extension Version 14.0.954663.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

fvet commented 3 months ago

@JesperSchulz

Any chance on backporting this to the current 13.x vsix? I'm running the latest released version (13.0.964488) and now encounter this issue, resulting in not being able to 'package' my apps in a multi project workspace.

[Error - 8:53:38 AM] No active project was found. Make sure to select a project in the VS Code Explorer.

NKarolak commented 3 months ago

I am affected only since updating to AL 13.0. Workaround: Before you close VS Code, close all AL files (others like .json or the AL Explorer seem to be fine), so that on starting (not reloading) VS Code, there are no open AL files.

If the BusinessCentral.LinterCop extension is installed, update it (see also https://github.com/StefanMaron/BusinessCentral.LinterCop/issues/568#issuecomment-2006595133).

JesperSchulz commented 3 months ago

@JesperSchulz

Any chance on backporting this to the current 13.x vsix? I'm running the latest released version (13.0.964488) and now encounter this issue, resulting in not being able to 'package' my apps in a multi project workspace.

[Error - 8:53:38 AM] No active project was found. Make sure to select a project in the VS Code Explorer.

@qutreson, would that be doable?

qutreson commented 3 months ago

This fix has been backported to version 13 and will be part of the next release of the AL extension for VS code.