vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout'

Open fjqingyou opened this issue 9 years ago • 7 comments

Environment data

dotnet --info output: VS Code version:1.16.0 C# Extension version:1.12.1

Steps to reproduce

Expected behavior

Actual behavior

1: vscode set "omnisharp.projectLoadTimeout": 600, 2: src file patch a test code: ... ". current is " + timeoutDuration));//it's a test patch,file path:CShappPath/out/src/omnisharp/server.js,

    const promise = new Promise((resolve, reject) => {
        let listener;
        // Convert the timeout from the seconds to milliseconds, which is required by setTimeout().
        const timeoutDuration = this._options.projectLoadTimeout * 1000;
        // timeout logic
        const handle = setTimeout(() => {
            if (listener) {
                listener.dispose();
            }
            reject(new Error("OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute). current is " + timeoutDuration));
        }, timeoutDuration);
        // handle started-event
        listener = this.onOmnisharpStart(() => {
            if (listener) {
                listener.dispose();
            }
            clearTimeout(handle);
            resolve();
        });
    });

3:but console log write:[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute). current is 10000

4: what ? currrnet is 10000?? Help me please! thanks!!!

fjqingyou avatar Sep 08 '17 06:09 fjqingyou

Could you clarify the issue with C# for VS Code here? It sounds like you're changing the JavaScript in your extension?

DustinCampbell avatar Sep 08 '17 13:09 DustinCampbell

chanage javascript code ? Yes,i try find error log generating reason,this a test code.

I try override setting attribute "omnisharp.projectLoadTimeout": 600

but code this._options.projectLoadTimeout this value is 10. Why?

My english very bad,Forgive me please.

oh,this run in mac system

fjqingyou avatar Sep 08 '17 15:09 fjqingyou

Could you copy and paste your settings.json here? I have no idea why this would have a value of 10 since it's default is 60: https://github.com/OmniSharp/omnisharp-vscode/blob/master/src/omnisharp/options.ts#L48 and https://github.com/OmniSharp/omnisharp-vscode/blob/master/package.json#L362.

DustinCampbell avatar Sep 08 '17 16:09 DustinCampbell

Thanks!

VSCode work computer is in the company

Copy JSON tomorrow at work!

current date is 2017-9-9 00:38:13 on my here

fjqingyou avatar Sep 08 '17 16:09 fjqingyou

sorry! i find project folder override settings.json file,this json body have override "omnisharp.projectLoadTimeout": 10

I always find user level setting.json file ,Ignore project level also have a setting.json,This is my fault. I'm sorry.

Thank you!

fjqingyou avatar Sep 09 '17 01:09 fjqingyou

Not a problem. I'm glad you found the issue!

DustinCampbell avatar Sep 09 '17 14:09 DustinCampbell

I had the same problem with Omnisharp, Where intelligence was not working even with a Console application. I had to install .Net Framework 4, 4.5 and 4.7.2. Hope this will help in case of issue with Omnisharp.

Thanks, Shashi Bhan

shashibhanmaurya avatar Jun 21 '18 10:06 shashibhanmaurya