microsoft / microsoft/AL

Processing of message 'al/gotodefinition' failed with error: 'Value cannot be null. (Parameter 'projectId')'

Open
#8,271 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

input-needed
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.