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

AssetService.RequestAssetsAsync throws System.InvalidOperationException: Unexpected Null #43855

Closed
vsfeedback opened this issue Apr 30, 2020 · 3 comments · Fixed by #47461
Closed
Assignees
Labels
Area-IDE Concept-OOP Related to out-of-proc Developer Community The issue was originally reported on https://developercommunity.visualstudio.com
Milestone

Comments

@vsfeedback
Copy link

vsfeedback commented Apr 30, 2020

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


04/29/2020 12:06:15 W. Europe Standard Time: Error : 1 :Unexpected exception from FindReferencesAsync: System.InvalidOperationException: Unexpected Null
   at Roslyn.Utilities.Contract.ThrowIfNull[T](T value, String message)
   at Microsoft.CodeAnalysis.Remote.AssetService.<RequestAssetsAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.AssetService.<RequestAssetAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.AssetService.<GetAssetAsync>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.SolutionCreator.<IsIncrementalUpdateAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.SolutionService.<CreateSolution_NoLockAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.SolutionService.<GetSolutionInternalAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.CodeAnalysisService.<>c__DisplayClass18_0.<<FindReferencesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.ServiceBase.<RunServiceAsync>d__16.MoveNext()

Original Comments

Scott Steesy on 4/29/2020, 05:38 AM:

Due to Covid-19 I have been working from home since March 19. At first I was RDPing to my work computer, but the latency was making it very hard to work. At work I have VS-2017 but couldn't find that download, but found VS-2019 online. So I installed VS-2019 at home and accidentally got the PREVIEW version. When it works I'm productive, but it often has issues. I am currently on 16.6.0 Preview 4.0. Clean boot this morning, started VS, opened a solution and started writing code in C#. I haven't opened a single tool, compiled or anything. And WHAM, up pops a Yellow bar saying an error occurred and I should save and restart. I didn't copy down the exact working of the error message before it disappeared when I went to find the version of VS I'm running. But this reported stack trace is EXACTLY what I saw when I searched for the issue here.

I feel like (but can't verify) nearly every issue I've had has to do with threads, background or foreground, that try to communicate with the team server (on-premise at work) and timeout. Our team server is used just for source control and a few basic builds we use when we want to produce a releasable product. Our team server was TFS 2017 Express (we only have 3 developers) but VS-2019 from first use did nothing but complain about DevOps services not available, so I upgraded it to Azure DevOps Server 2019 Update 1.1 Express. I still get that complaint occasionally but after several forced "Connect" to the team server it will work again.

In case it matters:
* I have .Net Framework 4.8.03752 (according the the VS-2019 Help About)
* I have 4 C# cs files open, and 2 xaml files open (in full XAML view, I rarely use the Design view).
* I am connected to work using a hardware tunnel established using a Sophos RED device (attached to my gateway router) which connects to my workplace's Sophos XG210 gateway firewall, attached to one NIC of my machine. The other NIC is connected to my gateway router for my normal internet connection traffic. Appropriate routes exist to send only work traffic to the RED. The VOIP phone attached the RED so I can have a work phone extension at home works flawlessly.

Scott Steesy on 4/29/2020, 05:50 AM:

Further info. Before restarting VS I noticed that above every function in the editor is just says "- references" and not the usual information for # of references with a hyperlink to show them. At first I thought to myself "why would local code references need a JSON-RPC call", then I remembered that it also shows the person that last edited that function, which to do MUST be hitting source control on the team server. so maybe that is what died in the background. BTW, I can't say as I ever have needed to know the last editor, so if I could turn that off to fix some of my problems i'd do it.

Visual Studio Feedback System on 4/29/2020, 08:48 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Visual Studio Feedback System on 4/30/2020, 09:30 AM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

@tmat
Copy link
Member

tmat commented Apr 30, 2020

04/29/2020 12:06:15 W. Europe Standard Time: Error : 1 :Unexpected exception from FindReferencesAsync: System.InvalidOperationException: Unexpected Null
   at Roslyn.Utilities.Contract.ThrowIfNull[T](T value, String message)
   at Microsoft.CodeAnalysis.Remote.AssetService.<RequestAssetsAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.AssetService.<RequestAssetAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.AssetService.<GetAssetAsync>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.SolutionCreator.<IsIncrementalUpdateAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.SolutionService.<CreateSolution_NoLockAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.SolutionService.<GetSolutionInternalAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.CodeAnalysisService.<>c__DisplayClass18_0.<<FindReferencesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Remote.ServiceBase.<RunServiceAsync>d__16.MoveNext()

@tmat tmat added the Area-IDE label Apr 30, 2020
@tmat tmat self-assigned this Apr 30, 2020
@tmat tmat added this to the 16.7 milestone Apr 30, 2020
@tmat tmat changed the title The JSON-RPC connection with the remote party was lost before the request could complete. AssetService.RequestAssetsAsync throws System.InvalidOperationException: Unexpected Null Apr 30, 2020
@jinujoseph jinujoseph added Concept-OOP Related to out-of-proc Developer Community The issue was originally reported on https://developercommunity.visualstudio.com labels May 7, 2020
@jinujoseph jinujoseph modified the milestones: 16.7, 16.8.P1 Jun 29, 2020
@jinujoseph jinujoseph modified the milestones: 16.8.P1, 16.8 Sep 3, 2020
@denious
Copy link

denious commented Sep 24, 2020

Can you please confirm if the 16.8 milestone is still valid?

Started getting this today every time I access a NET Framework project. The error kills Intellisense and other IDE features, making it impossible to work on the project.

@tmat
Copy link
Member

tmat commented Sep 24, 2020

Yes, 16.8 P4 should come with a significant improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-OOP Related to out-of-proc Developer Community The issue was originally reported on https://developercommunity.visualstudio.com
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants