Open Jiribu73 opened 4 years ago
Hello, I have the same error "environmentType": "OnPrem", "serverInstance": "BC170", 'al/gotodefinition' failed with error: 'Index was outside the bounds of the array.'
Getting the same very often when looking up functions in standard applications my app has dependency on.
Processing of message 'al/gotodefinition' failed with error: 'Index was outside the bounds of the array.'
Details:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Microsoft.Dynamics.Nav.EditorServices.Protocol.FilePathHelper.ParsePreviewFileUrl(Uri uri) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\FilePathHelper.cs:line 97
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDeclaringSymbolAsync(Uri previewUri, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 154
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetContentAsync(Uri previewUri, LaunchConfiguration configuration, CancellationToken token, Boolean relyOnCachedValue) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 93
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDefinitionForSymbolAtPositionAsync(Uri previewUri, Position requestPosition, LaunchConfiguration configuration, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 107
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.AlDefinitionRequestHandler.ProcessRequestAsync(AlDefinitionRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\AlDefinitionRequestHandler.cs:line 71
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.NavServerRequestHandler2.HandleAsync(T request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\NavServerRequestHandler.cs:line 77 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 65
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 80
This always happen if you open .dal files. .al files work without any problem.
@dennisroczek then why sometimes it works perfectly and without errors, sometimes gives an error. I could not find dependency on what I do and how it performs...
Hi, I have proble with AL Object Designer extension and al/gotodefinition error. How to reproduce:
[Error - 15:03:09] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible. Processing of message 'al/gotodefinition' failed with error: 'Index was outside the bounds of the array.' Details: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Microsoft.Dynamics.Nav.EditorServices.Protocol.FilePathHelper.ParsePreviewFileUrl(Uri uri) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\FilePathHelper.cs:line 97 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDeclaringSymbolAsync(Uri previewUri, CancellationToken token) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 137 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetContentAsync(Uri previewUri, LaunchConfiguration configuration, CancellationToken token, Boolean relyOnCachedValue) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 73 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDefinitionForSymbolAtPositionAsync(Uri previewUri, Position requestPosition, LaunchConfiguration configuration, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 101 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.AlDefinitionRequestHandler.ProcessRequestAsync(AlDefinitionRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\AlDefinitionRequestHandler.cs:line 50 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.NavServerRequestHandler
2.HandleAsync(T request, Int32 requestId, CancellationToken cancellationToken) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\NavServerRequestHandler.cs:line 40 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 63 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 64There are several similar issues on the al GitHub but from my investigation the problem is wit AL Object Designer extension.
Regards
Jiri