tact-vscode
tact-vscode copied to clipboard
Request textDocument/definition failed Code: -32603
Use environment: windows wsl IDE: VS code Plugin version: Tact Language Support for TON blockchain v1.4.4 Trigger method: When you double-click and select certain parameters under the .tact file to copy and paste An error will be reported in the output box below The information is
[Error - 4:29:29 PM] Request textDocument/definition failed.
Message: Request textDocument/definition failed with message: Cannot read properties of null (reading '1')
Code: -32603
[Error - 4:30:50 PM] Request textDocument/definition failed.
Message: Request textDocument/definition failed with message: Cannot read properties of null (reading '1')
Code: -32603
[Error - 4:30:50 PM] Request textDocument/definition failed.
Message: Request textDocument/definition failed with message: Cannot read properties of null (reading '1')
Code: -32603
Please, provide the code from .tact file, at least some part, else I can't reproduce this error.
Got a similar error. At least the error code is the same.
[Error - 10:44:48 AM] Request textDocument/hover failed.
Message: Request textDocument/hover failed with message: Cannot read properties of undefined (reading 'body')
Code: -32603
It appears if the code contains a similar snippet.
if(msg.status) {
self.someFieldA = true;
self.someFieldB = 172800;
} else {
self.someFieldA = true;
self.someFieldB = 172800;
}
But if the else branch contains only one expression, everything will work fine... Let me set commenting like this
if(msg.status) {
self.someFieldA = true;
self.someFieldB = 172800;
} else {
//self.someFieldA = true; << This line has been turned into a comment
self.someFieldB = 172800;
}
everything miraculously works
if (msg.status) {
self.someFieldA = true;
self.someFieldB = 172800;
} else //self.someFieldA = true;
self.someFieldB = 172800;
Thus, I believe the problem lies somewhere around the } else { construct.
Thank you for your report. I have fixed it and scheduled an updated version for publication early next week.