Download Symbols Error: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server
Please include the following with each issue:
1. Describe the bug Every time i try to download symbols for the first time, I receive the following error on the output.
2. To Reproduce Steps to reproduce the behavior:
- Create a new App
- Download Symbols (for the first time)
3. Expected behavior There shouln't be any bug on downloading symbols.
4. Actual behavior
[Error - 15:49:34] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/didChange' failed with error: 'The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
'
Details:
System.InvalidOperationException: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.BufferManager.UpdateBuffer(DidChangeTextDocumentRequest updateRequest, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\BufferManager.cs:line 104
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.DidChangeTextDocumentRequestHandler.HandleAsync(DidChangeTextDocumentRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\DidChangeTextDocumentRequestHandler.cs:line 50
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 108
[Error - 15:49:34] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/didChange' failed with error: 'The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
'
Details:
System.InvalidOperationException: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.BufferManager.UpdateBuffer(DidChangeTextDocumentRequest updateRequest, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\BufferManager.cs:line 104
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.DidChangeTextDocumentRequestHandler.HandleAsync(DidChangeTextDocumentRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\DidChangeTextDocumentRequestHandler.cs:line 50
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 108
[Error - 15:49:34] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/didChange' failed with error: 'The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
'
Details:
System.InvalidOperationException: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.BufferManager.UpdateBuffer(DidChangeTextDocumentRequest updateRequest, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\BufferManager.cs:line 104
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.DidChangeTextDocumentRequestHandler.HandleAsync(DidChangeTextDocumentRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\DidChangeTextDocumentRequestHandler.cs:line 50
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 108
[Error - 15:49:34] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/didChange' failed with error: 'The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
'
Details:
System.InvalidOperationException: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.BufferManager.UpdateBuffer(DidChangeTextDocumentRequest updateRequest, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\BufferManager.cs:line 104
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.DidChangeTextDocumentRequestHandler.HandleAsync(DidChangeTextDocumentRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\DidChangeTextDocumentRequestHandler.cs:line 50
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 108
[2022-07-11 15:49:36.56] All reference symbols have been downloaded.
5. Versions:
- AL Language: 9.3.646020
- Visual Studio Code: Version: 1.68.1 (user setup) Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630 Date: 2022-06-14T12:48:58.283Z Electron: 17.4.7 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Windows_NT x64 10.0.19044
- Business Central:
- List of Visual Studio Code extensions that you have installed:
Final Checklist
Please remember to do the following:
-
[ ] Search the issue repository to ensure you are reporting a new issue
-
[ ] Reproduce the issue after disabling all extensions except the AL Language extension
-
[ ] Simplify your code around the issue to better isolate the problem
Hi, can you answer the following for us:
- Are you downloading from SaaS or a docker?
- What symbols are you downloading?
- Does this repro with only Application and System dependencies? If not, does it repro only with a specific dependency?
Hi,
- I download from a Business Central Cloud Sandbox Docker Environment (with AAD Authentication)
- I can reproduce this issue with a dymmy AL-Go Project.
After some investigation it seems to be related to Workspaces. If I open my MainApp Folder everything is working correctly. As soons as I Open the workspace and select one file in the MainApp Folder and start Downloading the symbols for the first time i receive this error:
[Error - 10:50:15] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/didChange' failed with error: 'The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
'
Details:
System.InvalidOperationException: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.BufferManager.UpdateBuffer(DidChangeTextDocumentRequest updateRequest, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\BufferManager.cs:line 104
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.DidChangeTextDocumentRequestHandler.HandleAsync(DidChangeTextDocumentRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\DidChangeTextDocumentRequestHandler.cs:line 50
at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 108
[2022-07-12 10:50:16.94] All reference symbols have been downloaded.
Can you please enable verbose logging in VsCode "al.editorServicesLogLevel": "Verbose" and restart the language server and somehow send the DebuggerServices.log found in C:\Users
Don't forget to reset the settings, since the log will grow very fast very large.
@kalberes I changed the setting to verbose (at user settings), but my DebuggerServices.log in the path C:\Users\username\.vscode\extensions\ms-dynamics-smb.al-9.3.646020\bin\win32 doesn't change.
I restarted all VS Code Sessions, I did reboot my computer, but nothing changes.
How can I restart the language server?
Sorry I meant EditorServices.log. There are two log files created depending on your scenario. debugger when you debug and editor when you edit
Also seeing a lot of the above when downloading symbols from SaaS
EditorServices.log shows
Details:
System.InvalidOperationException: The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.BufferManager.UpdateBuffer(DidChangeTextDocumentRequest updateRequest, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\BufferManager.cs:line 104 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.DidChangeTextDocumentRequestHandler.HandleAsync(DidChangeTextDocumentRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\DidChangeTextDocumentRequestHandler.cs:line 50 at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103 at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 108
09/27/2022 13:38:27 [/42] Content starting at line 0 ending at line 7 is an invalid text update for document c:///****/.vscode/temp-al-proxy.al.
09/27/2022 13:38:27 [/42] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.
Processing of message 'textDocument/didChange' failed with error: 'The language server must close to prevent text buffers not being in sync between Visual Studio Code and the AL language server.
Please restart your workspace either by reloading the window in the Visual Studio Code command palette, or by restarting Visual Studio Code with your workspace.
Details for the failure can be found in the EditorServices.log file in the extension installation folder.