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

[BUG] <Cannot work with project source controlled by "Perforce for VS Code" extension> #7638

Open
dibarbet opened this issue Oct 7, 2024 · 3 comments
Labels
Milestone

Comments

@dibarbet
Copy link
Member

dibarbet commented Oct 7, 2024

Describe the Issue

When enable the extention plugin "Perforce for VS Code", the total function will not work and it says:

[stdout] {"pipeName":"\\\\.\\pipe\\6801cf8c"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 10:43:39 AM] [Program] Language server initialized
[Error - 10:43:40 AM] [LanguageServerHost] System.UriFormatException: Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at Roslyn.LanguageServer.Protocol.DocumentUriConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in /_/src/LanguageServer/Protocol/Protocol/Converters/DocumentUriConverter.cs:line 17
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](JsonElement element, JsonSerializerOptions options)
   at Microsoft.CommonLanguageServerProtocol.Framework.SystemTextJsonLanguageServer`1.DeserializeRequest[TRequest](Object serializedRequest, RequestHandlerMetadata metadata) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/SystemTextJsonLanguageServer.cs:line 50
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.TryDeserializeRequest[TRequest](AbstractLanguageServer`1 languageServer, RequestHandlerMetadata requestHandlerMetadata, Boolean isMutating, TRequest& request) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 117
[Error - 10:43:40 AM] [LanguageServerHost] System.UriFormatException: Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at Roslyn.LanguageServer.Protocol.DocumentUriConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in /_/src/LanguageServer/Protocol/Protocol/Converters/DocumentUriConverter.cs:line 17
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](JsonElement element, JsonSerializerOptions options)
   at Microsoft.CommonLanguageServerProtocol.Framework.SystemTextJsonLanguageServer`1.DeserializeRequest[TRequest](Object serializedRequest, RequestHandlerMetadata metadata) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/SystemTextJsonLanguageServer.cs:line 50
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.TryDeserializeRequest[TRequest](AbstractLanguageServer`1 languageServer, RequestHandlerMetadata requestHandlerMetadata, Boolean isMutating, TRequest& request) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 117
--- End of stack trace from previous location ---
   at Microsoft.CommonLanguageServerProtocol.Framework.AbstractLanguageServer`1.DelegatingEntryPoint.InvokeAsync(IRequestExecutionQueue`1 queue, Object requestObject, ILspServices lspServices, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/AbstractLanguageServer.cs:line 202
   at Microsoft.CommonLanguageServerProtocol.Framework.SystemTextJsonLanguageServer`1.SystemTextJsonDelegatingEntryPoint.ExecuteRequestAsync(Nullable`1 request, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/SystemTextJsonLanguageServer.cs:line 88
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.CreateRequestContextAsync[TRequest](IMethodHandler handler, RequestHandlerMetadata requestHandlerMetadata, AbstractLanguageServer`1 languageServer, CancellationToken cancellationToken)
   at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.ProcessQueueCoreAsync[TRequest,TResponse](IQueueItem`1 work, IMethodHandler handler, RequestHandlerMetadata metadata, ConcurrentDictionary`2 concurrentlyExecutingTasks, CancellationTokenSource currentWorkCts, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 319
   at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.InvokeProcessCoreAsync(IQueueItem`1 work, RequestHandlerMetadata metadata, IMethodHandler handler, MethodInfo methodInfo, ConcurrentDictionary`2 concurrentlyExecutingTasks, CancellationTokenSource currentWorkCts, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 302
   at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.ProcessQueueAsync() in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 254
[Info  - 10:43:40 AM] Error processing queue, shutting down
[Error - 10:43:40 AM] Workspace diagnostic pull failed.
Canceled: Canceled
	at a.handleFailedRequest (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2137527)
	at a.handleFailedRequest (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:1253271)
	at c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2174939
	at async g.pullWorkspaceAsync (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2172247)
[Error - 10:43:40 AM] Workspace diagnostic pull failed.
Canceled: Canceled
	at a.handleFailedRequest (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2137527)
	at a.handleFailedRequest (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:1253271)
	at c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2174939
	at runNextTicks (node:internal/process/task_queues:60:5)
	at process.processImmediate (node:internal/timers:449:9)
	at async g.pullWorkspaceAsync (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2172247)
[Error - 10:43:40 AM] Workspace diagnostic pull failed.
Canceled: Canceled
	at a.handleFailedRequest (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2137527)
	at a.handleFailedRequest (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:1253271)
	at c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2174939
	at runNextTicks (node:internal/process/task_queues:60:5)
	at process.processImmediate (node:internal/timers:449:9)
	at async g.pullWorkspaceAsync (c:\Users\zhentao.wang\.vscode\extensions\ms-dotnettools.csharp-2.45.25-win32-x64\dist\extension.js:2:2172247)
[Error - 10:43:40 AM] Request textDocument/diagnostic failed.
  Message: Server was requested to shut down.
  Code: -32000

Steps To Reproduce

  1. Download and Enable "Perforce for Vs Code"
  2. Open the c# project
  3. The error pops up and c# Dev kit cannot work

Expected Behavior

No response

Environment Information

Windows, C# Dev Kit v1.10.18, Perforce for VS Code v4.15.7

@dibarbet dibarbet added this to the Backlog milestone Oct 7, 2024
@dibarbet
Copy link
Member Author

dibarbet commented Oct 7, 2024

@dibarbet
Copy link
Member Author

dibarbet commented Oct 7, 2024

@dibarbet
Copy link
Member Author

dibarbet commented Oct 7, 2024

Backlog for now - ideally the invalid URIs provided by the perforce extension would be updated. Otherwise it is likely quite a bit of work to workaround the System.URI issue in the C# extension.

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

No branches or pull requests

1 participant