Share via

StreamJsonRpc.RemoteInvocationException while launching Visual Studio

Donkena, Trilochan 6 Reputation points
2022-01-04T05:00:30.707+00:00

Fresh install of Visual Studio 2022 results in a StreamJsonRpc.RemoteInvocationException exception...

Checked the log under C:\Users[myId]\AppData\Local\Temp\servicehub\logs..

Below is the content of the log, Please help...

01/03/2022 20:37:53 Pacific Standard Time : Error : Creating an account
IsPersonalization account 'False'
Checking if the account is an MSA account. 'False'
Setting properties.
Checking if we are windows platform to determine if we want to get the profile or not.
We are on the windows platform. Getting profile information.
Failed to get VSO Profile during account Creation because of 'System.MissingMethodException: Method not found: 'Void Newtonsoft.Json.Serialization.JsonDictionaryContract.set_DictionaryKeyResolver(System.Func`2<System.String,System.String>)'.
at JsonDictionaryContract Microsoft.VisualStudio.Services.WebApi.VssCamelCasePropertyNamesContractResolver.CreateDictionaryContract(Type type)
at JsonContract Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
at JsonContract Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver.ResolveContract(Type type)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at object System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, Encoding effectiveEncoding, IFormatterLogger formatterLogger)
at object System.Net.Http.Formatting.JsonMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, Encoding effectiveEncoding, IFormatterLogger formatterLogger)
at object System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)
at Task<object> System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStreamAsync(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)
at async Task<T> System.Net.Http.HttpContentExtensions.ReadAsAsyncCore<T>(HttpContent content, Type type, IFormatterLogger formatterLogger, MediaTypeFormatter formatter, CancellationToken cancellationToken)
at async Task<T> Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.ReadJsonContentAsync<T>(HttpResponseMessage response, CancellationToken cancellationToken)
at async Task<T> Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.ReadContentAsAsync<T>(HttpResponseMessage response, CancellationToken cancellationToken)
at async Task<T> Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync<T>(HttpRequestMessage message, object userState, CancellationToken cancellationToken)
at async Task<ConnectionData> Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.GetConnectionDataAsync(ConnectOptions connectOptions, long lastChangeId, CancellationToken cancellationToken, object userState)
at async Task<ConnectionData> Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.GetConnectionDataAsync(ConnectOptions connectOptions, int lastChangeId, CancellationToken cancellationToken)
at async Task Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.ConnectAsync(ConnectOptions connectOptions, CancellationToken cancellationToken)
at async Task<VssConnection> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.GetVssConnectionAsync(VssAadCredential aadCredential, CancellationToken cancellationToken)
at async Task<(string displayName, byte[] userThumbnail, Guid vsid)> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.GetVSOProfileDetailsAsync(AuthenticationInfo authInfo, bool promptIfNeeded, string queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary<string, string> additionalAuthProperties, string displayName, byte[] userThumbnail, CancellationToken cancellationToken)
at async Task<IProfileInformation> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderNetworkServicesBase.GetProfileInfoAsync(AuthenticationInfo authInfo, bool promptIfNeeded, string queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary<string, string> additionalAuthProperties, CancellationToken cancellationToken)
at async Task<Account> Microsoft.Developer.IdentityService.AccountProvider.AadAccountProviderService.CreateAccountFromAadAsync(Account account, ImmutableArray<ScopeInfo> scopes, List<Exception> errors, AuthenticationInfo authInfo, bool promptIfNeeded, bool clearMfaResource, bool clearMfaFlag, string queryParameters, AuthenticationFlowType authenticationFlowType, Dictionary<string, string> additionalAuthProperties, CancellationToken cancellationToken)'
Getting tenant and scope info.
Setting more properties.
Checking if the id token is null or empty.
Id Token found. Parsing the token.
Getting the images
Tenant sanity check before instantiating the account.
HomeTenantId:'46c98d88-e344-4ed4-8496-4ed7712e255d' Number of tenants:'1' Tenant details:'[{"UniqueId":"5bd28cc0-fe26-42f7-aff5-75a01912b364.46c98d88-e344-4ed4-8496-4ed7712e255d","TenantId":"46c98d88-e344-4ed4-8496-4ed7712e255d","FriendlyName":"Intel Corporation","IsOwned":true}]'
Instantiating the new account.
Returning the new account.

Developer technologies | .NET | .NET Runtime
Developer technologies | Visual Studio | Setup
Developer technologies | VB
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


2 answers

Sort by: Most helpful
  1. Bruce Maynard 5 Reputation points
    2023-08-25T00:26:29.7133333+00:00

    I getting this problem with 17.7.2 update on my Windows 10 system. It worked fine previously. What is going on?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Donkena, Trilochan 6 Reputation points
    2022-01-06T02:21:45.077+00:00

    Hi @Tianyu Sun-MSFT Appreciate your help! I tried the recommended steps. I am seeing a different error now

    StreamJsonRPC.ConnectionLostException. Details from the log are below.

    Error : Exception: Newtonsoft.Json.JsonSerializationException: Unable to deserialize JsonRpcMessage. ---> Newtonsoft.Json.JsonSerializationException: Unrecognized JSON-RPC 2.0 message ("jsonrpc" property must be set to "2.0", or set ProtocolVersion to 1.0 mode.): {
    "Result": null,
    "ResultDeclaredType": null,
    "Id": 2,
    "RequestId": 2,
    "Version": "2.0",
    "result": null
    }
    at StreamJsonRpc.JsonMessageFormatter.Deserialize(JToken json)
    --- End of inner exception stack trace ---
    at StreamJsonRpc.JsonMessageFormatter.Deserialize(JToken json)
    at StreamJsonRpc.JsonMessageFormatter.Deserialize(ReadOnlySequence`1 contentBuffer, Encoding encoding)
    at StreamJsonRpc.PipeMessageHandler.<DeserializeMessageAsync>d__23.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 StreamJsonRpc.HeaderDelimitedMessageHandler.<ReadCoreAsync>d__26.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 StreamJsonRpc.MessageHandlerBase.<ReadAsync>d__22.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at StreamJsonRpc.JsonRpc.<ReadAndHandleRequestsAsync>d__159.MoveNext()

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.