Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 'Missing import discovery' is currently unavailable due to an internal error. #62737

Closed
vsfeedback opened this issue Jul 18, 2022 · 4 comments · Fixed by #76027
Closed
Assignees
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice] [regression] [worked-in:17.2]
While building my project, I opened a file that was created via the new "source generators" feature and encountered a gold bar with this error: Feature 'Missing import discovery' is currently unavailable due to an internal error.

Please see attached trace files and screenshot.

Stack trace:

StreamJsonRpc.RemoteInvocationException: Object reference not set to an instance of an object.
   at StreamJsonRpc.JsonRpc.d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.d__20`1.MoveNext()
RPC server exception:
System.NullReferenceException: Object reference not set to an instance of an object.
      at Microsoft.CodeAnalysis.Remote.RemoteMissingImportDiscoveryService.<>c__DisplayClass3_0.<b__0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Threading.Tasks.ValueTask`1.get_Result()
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass10_0`1.<g__TryFastGetSolutionAndRunAsync|0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Threading.Tasks.ValueTask`1.get_Result()
      at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.d__10`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Threading.Tasks.ValueTask`1.get_Result()
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.d__11`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Threading.Tasks.ValueTask`1.get_Result()
      at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.d__14`1.MoveNext()


Original Comments

Feedback Bot on 7/15/2022, 03:12 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 18, 2022
@sharwell
Copy link
Member

sharwell commented Jul 18, 2022

This feature assumes the document is not a source generated document, and provides no handling for the case where the document does not exist:

@CyrusNajmabadi CyrusNajmabadi added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 18, 2022
@Eli-Black-Work
Copy link

Thanks for taking a look at this, @sharwell 🙂 BTW, were the traces from VS helpful in this case?

@kbarrows-work

This comment was marked as off-topic.

@sharwell
Copy link
Member

@kbarrows-work Your issue does not appear to be related to this issue. Can you file a new feedback using the Report a Problem tool in Visual Studio?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants