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

SQF Language Server Error #29

Closed
bux opened this issue Feb 13, 2019 · 7 comments
Closed

SQF Language Server Error #29

bux opened this issue Feb 13, 2019 · 7 comments
Assignees

Comments

@bux
Copy link

bux commented Feb 13, 2019

VS Code about output

Version: 1.31.0 (system setup)
Commit: 7c66f58312b48ed8ca4e387ebd9ffe9605332caa
Date: 2019-02-05T22:35:56.624Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134

An error shows up in the output windows after opening an sqf file.

  throw new ERR_INVALID_CALLBACK();
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:157:9)
    at Object.fs.writeFile (fs.js:1290:14)
    at c:\Users\bux\.vscode\extensions\armitxes.sqf-1.0.6\server\events.js:39:20
    at fs.js:753:9
    at FSReqWrap.oncomplete (fs.js:169:20)
[Info  - 10:30:21] Connection to server got closed. Server will restart.
[Error - 10:30:22] Notification handler 'workspace/didChangeConfiguration' failed with message: c:\Users\bux\.vscode\extensions\armitxes.sqf-1.0.6\syntaxes\sqf.min.json: Unexpected end of JSON input

image

After reloading the highlighting doesn't work anymore and I get the following new error message in the output window.

[Error - 10:33:51] Notification handler 'workspace/didChangeConfiguration' failed with message: c:\Users\bux\.vscode\extensions\armitxes.sqf-1.0.6\syntaxes\sqf.min.json: Unexpected end of JSON input

When inspecting the sqf.min.json it's just an empty 0kb file.

image

@Tanin69
Copy link

Tanin69 commented Mar 5, 2019

Same problem for me. Have found any workaround, bux ?

@Armitxes
Copy link
Owner

Armitxes commented Mar 5, 2019

Sorry for the late answer. Had to deal with 2 other projects.

This issue occurs since Visual Studio Code introduced a feature which this extension already had.
Reloading itself once the config is changed. Had this solved for myself but I can't remember how :/ will try to reproduce and release a fix.

The issue also no longer occurs in milestone branch for fresh installs so the fix must be in there ^^
Give me a bit to test it out ;)

@Armitxes Armitxes added the bug label Mar 5, 2019
@Armitxes Armitxes self-assigned this Mar 5, 2019
@bux
Copy link
Author

bux commented Mar 5, 2019

@bux
Copy link
Author

bux commented Mar 5, 2019

^For reference ... how veteran and I fixed it on our side.

@Armitxes
Copy link
Owner

Armitxes commented Mar 5, 2019

Yea that's still back from the time where we had absolutely no documentation for VS Code.
It was pure learning by reverse engineering, trying things out ^^ and by looking into the extensions of Microsoft itself.

I remember that one of the big issues back then was that we had no possibility to properly change the provided highlighting based on custom settings.

Will fix it.

@Armitxes
Copy link
Owner

Armitxes commented Mar 8, 2019

Fixed in development.
5b5c991

Releasing it this weekend together with some new features.

@Armitxes Armitxes added this to the v2.0.0 (Milestone 3) milestone Mar 10, 2019
@Armitxes
Copy link
Owner

Fixed and released :) Thanks for reporting

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

No branches or pull requests

3 participants