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

The language service could not be started - Error: Timed out waiting for session file to appear #3088

Closed
mco84 opened this issue Dec 10, 2020 · 10 comments
Labels
Resolution-Inactive Will close automatically.

Comments

@mco84
Copy link

mco84 commented Dec 10, 2020

Issue Description

I can't start the PowerShell extension in 2020.6.0. When I downgrade to version 2020.1.0 it is working. Also this version 2020.6.0 is working on other similar installation, so maybe this is something environmental like group policy restrictions or something? But why does this work with version 2020.1.0?

I've seen similar issues where the solution was to update the .NET Framework to 4.6 or higher. This environment has 4.8.03761 installed. Are the any known issues? We're not using Avecto/BeyondSoft, also I've disabled Antivirus Real Time Scan (McAfee) with no luck.

Unfortunately I didn't manage to capture "Language Server Protocol payload log". What settings file must be modified to achieve that?

Attached Logs

1607605312-ecd2253c-2b03-4cd8-a007-41533c9f1cb81607605301686.zip

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.14393
VSCode 1.51.1
PowerShell Extension Version 2020.6.0

PowerShell Information

Name Value
PSVersion 5.1.14393.3866
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.14393.3866
BuildVersion 10.0.14393.3866
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
powershell ms-vscode 2020.6.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Dec 10, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Dec 10, 2020

Here's the relevant line from the log:

[ERR]: Exception encountered starting EditorServices. Exception logged in D:\a\1\s\src\PowerShellEditorServices.Hosting\Commands\StartEditorServicesCommand.cs on line 248 in EndProcessing:
System.EntryPointNotFoundException: Entry point was not found.
   at Microsoft.Extensions.Logging.ILoggerFactory.AddProvider(ILoggerProvider provider)
   at Serilog.SerilogLoggerFactoryExtensions.AddSerilog(ILoggerFactory factory, ILogger logger, Boolean dispose)
   at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesServerFactory.Create(String logPath, Int32 minimumLogLevel, IObservable`1 hostLogger)
   at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesRunner..ctor(HostLogger logger, EditorServicesConfig config, ISessionFileWriter sessionFileWriter, IReadOnlyCollection`1 loggersToUnsubscribe)
   at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesLoader.LoadAndRunEditorServicesAsync()
   at Microsoft.PowerShell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()

@rjmholt
Copy link
Contributor

rjmholt commented Dec 10, 2020

Possibly related to #2538

@rjmholt
Copy link
Contributor

rjmholt commented Dec 10, 2020

Ok I think it's a separate issue, but a very weird one. Here's the doc for that exception.

@rjmholt
Copy link
Contributor

rjmholt commented Dec 10, 2020

Actually it may not be such a separate issue...

It's hard to know because the exception message doesn't say anything beyond what kind of exception it is; other examples I'm seeing provide the name of the assembly and possibly the entry point.

I see you've got .NET 4.8 installed, so that shouldn't be an issue.

You're also on what I'm guessing is Windows Server 2016, so that should be ok.

It might be an issue with the GAC maybe? Otherwise it's possible that there's some native call bug in one of our dependencies, but that seems pretty strange to me.

@rjmholt
Copy link
Contributor

rjmholt commented Dec 10, 2020

Try running this:

& 'C:\Program Files (x86)\Microsoft.NET\SDK\v1.1\Bin\gacutil.exe' /l

gacutil might be in a different place though, or possibly not installed at all...

Basically we need to see if Serilog is in your GAC.

@SydneyhSmith SydneyhSmith added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Dec 10, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Dec 10, 2020

Ok I've opened this StackOverflow question — hopefully someone can help us understand the issue here

@mco84
Copy link
Author

mco84 commented Dec 10, 2020

Thanks a lot so far! I will check and get back with more information on this asap!

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Dec 10, 2020
@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Dec 11, 2020
@mco84
Copy link
Author

mco84 commented Dec 11, 2020

Ok, so gacutil is not installed and as this is occurs on machines in productive (developmental) use I don't want to install too much stuff on it just for testing purpose. Is there any other chance to investigate further?

You were all right. This is on Windows Server 2016 with .NET 4.8. Maybe it's worth mentioning there also a SharePoint 2019 installation on it. However: your extension works perfectly on that very machine(s) until version 2020.1.0, newer version run into the mentioned error.

I do have another lab machine on my Azure subscription running basically the same configuration (Windows 2016, .NET 4.8 and SP2019) where your extension is running fine with the latest version 2020.6.0. Also I do have another configuration in the customer environment with Windows 2012 R2, .NET 4.8 and SharePoint 2013 installed. Also here, 2020.6.0 is running fine. Where is the caveat?

Let me know if and how I can contribute in further investigation.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Dec 11, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Dec 11, 2020

until version 2020.1.0

Yes we made some significant changes in the following version for #535. In particular the way we load assemblies changed. For almost all users this has been fine, but some have machines in configurations that seem to cause issues.

However, it's not clear what's happening in your case, and nor do I know what further information we need. The GAC and possibly Fusion Logs are the only things I can think of.

@ghost
Copy link

ghost commented Dec 25, 2020

This issue is being closed as inactive, if this issue is still occurring it will be re-opened

@ghost ghost added the Resolution-Inactive Will close automatically. label Dec 25, 2020
@ghost ghost closed this as completed Dec 25, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label May 18, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Inactive Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants