Processing of message 'al/gotodefinition' failed with error: 'Value cannot be null. (Parameter 'projectId')'
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
[Error - 7:58:52 PM] 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: 'Value cannot be null. (Parameter 'projectId')'
Details:
System.ArgumentNullException: Value cannot be null. (Parameter 'projectId')
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Solution.GetProject(ProjectId projectId) in X:\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Workspace\Solution\Solution.cs:line 281
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.EnsureCompilationContextIsSet(CancellationToken token) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 211
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.ReferenceSymbolDefinitionManager.GetDefinitionForSymbolAtPositionAsync(Uri previewUri, Position requestPosition, LaunchConfiguration configuration, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\ReferenceSymbolDefinitionManager.cs:line 98
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.AlDefinitionRequestHandler.ProcessRequestAsync(AlDefinitionRequest request, Int32 requestId, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\AlDefinitionRequestHandler.cs:line 57
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.NavServerRequestHandler2.HandleAsync(T request, Int32 requestId, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\NavServerRequestHandler.cs:line 40 at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 85
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in X:\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 84
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ReferenceSymbolDefinitionManager.cs at EnsureCompilationContextIsSet and trace the al/gotodefinition request through AlDefinitionRequestHandler.cs and Solution.cs. Reproduce the request if possible and determine why projectId is null; done means the request no longer fails with this ArgumentNullException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100