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

A request hes failed. #30

Open
KittenRaee opened this issue May 9, 2020 · 10 comments
Open

A request hes failed. #30

KittenRaee opened this issue May 9, 2020 · 10 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@KittenRaee
Copy link

I've installed Extension, Probe mod, added folder and whenever I try to write anything in a script, there's an error showing up:
[Error - 18:42:52] Request textDocument/completion failed. Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined Code: -32603 [Error - 18:42:52] Request textDocument/completion failed. Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined Code: -32603 [Error - 18:42:52] Request textDocument/completion failed. Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined Code: -32603 [Error - 18:42:52] Request textDocument/completion failed. Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined Code: -32603 [Error - 18:42:52] Request textDocument/completion failed. Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined Code: -32603 [Error - 18:42:53] Request textDocument/completion failed. Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined Code: -32603

@Yesterday17
Copy link
Owner

hmm... That's strange. I cannot reproduce it.

@Yesterday17 Yesterday17 added the help wanted Extra attention is needed label May 16, 2020
@copygirl
Copy link

copygirl commented May 24, 2020

I have a similar issue. When I create an empty .zs file or open one, I get the following:

(node:18684) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of null
    at Function.<anonymous> (/home/copygirl/.vscode-oss/extensions/yesterday17.zenscript-0.2.4/out/server/services/zsDocumentContentChange.js:37:64)
    at Generator.next (<anonymous>)
    at fulfilled (/home/copygirl/.vscode-oss/extensions/yesterday17.zenscript-0.2.4/out/server/services/zsDocumentContentChange.js:5:58)
(node:18684) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of null
    at Function.<anonymous> (/home/copygirl/.vscode-oss/extensions/yesterday17.zenscript-0.2.4/out/server/services/zsDocumentContentChange.js:37:64)
    at Generator.next (<anonymous>)
    at fulfilled (/home/copygirl/.vscode-oss/extensions/yesterday17.zenscript-0.2.4/out/server/services/zsDocumentContentChange.js:5:58)
(node:18684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:18684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

When typing, I get the same error as above:

[Error - 20.00.05] Request textDocument/completion failed.
  Message: Request textDocument/completion failed with message: Cannot read property 'tokens' of undefined
  Code: -32603 

When hovering over any code, I get this:

[Error - 20.00.52] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'isInterpreted' of undefined
  Code: -32603

Not sure if relevant, but I am on Linux. My pack has 77 mods.

@Yesterday17
Copy link
Owner

Seems relevant to #28. How did you open the file, directly without folder(workspace) opened?

@copygirl
Copy link

I've opened the .minecraft folder of a MultiMC instance in VSCode.

@Krutoy242
Copy link

Krutoy242 commented May 25, 2020

Have same issue. Sometimes errors jumps not instantly, but after some time.

  Message: Request textDocument/hover failed with message: Cannot read property 'oredictionary' of undefined
  Code: -32603 

@copygirl
Copy link

Have same issue if i opened minecraft root folder as project folder.
Issue wont happen if project folder is .scripts

(@Krutoy242 edited their message as I was writing my response.)

Ah, I see. I had tried opening the scripts folder directly before but had no luck there.

When looking at the readme, it says the following, and I decided that it meant the "minecraft folder mode" was the default (made sense to me, since I'd probably be editing both configs and scripts) and didn't think much of it.

zenscript.supportMinecraftFolderMode: Whether your active folder is 'minecraft' like, which means that the extension detects ./scripts/.zsrc, not ./.zsrc.

Perhaps you could change the way the .zsrc file is detected: When a .zs file is opened or found, travel up the directory tree to find the corresponding .zsrc. Either until the root directory, or perhaps a maximum of, say, 5 folders. You may have a good reason for the way you have it set up, though.

@Yesterday17
Copy link
Owner

I published v0.2.5, could you please try this version?

@KittenRaee @copygirl @Krutoy242

@Krutoy242
Copy link

Still happens. Also, you can see keywords dont highlite propertly

Downgraded back to 1.41

@Yesterday17
Copy link
Owner

@Krutoy242 That's strange. Could you provide a (minimal) environment to reproduce this problem?

@Krutoy242
Copy link

@Krutoy242 That's strange. Could you provide a (minimal) environment to reproduce this problem?

This would take many hours to test. Maybe i would try one day.

@Yesterday17 Yesterday17 added the bug Something isn't working label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants