mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.51k stars 303 forks source link

the SQLTools language server crashed, SyntaxError: Unexpected token #1129

Open yadav-vikas opened 1 year ago

yadav-vikas commented 1 year ago

Describe the bug

[1680593694397] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" /home/sapat/.vscode/extensions/mtxr.sqltools-0.27.1/dist/languageserver.js:1 (()=>{var __webpack_modules={797:(unused_webpack_module,exports)=>{"use strict";const internalssuspectRx=/"(?:|\u005[Ff])(?:|\u005[Ff])(?:p|\u0070)(?:r|\u0072)(?:o|\u006[Ff])(?:t|\u0074)(?:o|\u006[Ff])(?:|\u005[Ff])(?:_|\u005[Ff])"\s*\:/;exports.parse=function(text,...args){const firstOptions="object"==typeof args[0]&&args[0],reviver=args.length>1||!firstOptions?args[0]:void 0,options=args.length>1&&args[1]||firstOptions||{},obj=JSON.parse(text,reviver);return"ignore"===options.protoAction?obj:obj&&"object"==typeof obj&&text.match(internals_suspectRx)?(exports.scan(obj,options),obj):obj},exports.scan=function(obj,options={}){let next=[obj];for(;next.length;){const nodes=next;next=[];for(const node of nodes){if(Object.prototype.hasOwnProperty.call(node,"proto")){if("remove"!==options.protoAction)throw new SyntaxError("Object contains forbidden prototype property");delete node.proto}for(const key in node){con

SyntaxError: Unexpected token ; at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) [Error - 13:04:54] Connection to server got closed. Server will not be restarted.

I even fully reinstalled the VScode Just out of frustation and it still didn't work. for some people downgrading to lower versions helped, unfortunately not for me ? Can you explain what's going on here ?

To Reproduce

i not sure why this happend, it was working nicely since yesterday.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

guhls commented 1 year ago

Same here to WSL2 Ubuntu22.04, but the downgrade to v 0.26.0 worked for me

yadav-vikas commented 1 year ago

Yeah I did that too, it worked for me as well. I guess I should have updated earlier

marov commented 1 year ago

Same for me. 0.26.0 works

loic-fontaine-msr commented 8 months ago

same here :/

Mingun commented 3 months ago

I have the same problem, just the error about . token:

...

[1724045896483] INFO  (ext): EXECUTING COMMAND => sqltools.refreshTree
[1724045896483] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
/home/mingun/.vscode/extensions/mtxr.sqltools-0.28.3/dist/languageserver.js:1
...very long dump of some minified JS source...

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
[Error - 10:38:23] Connection to server got closed. Server will not be restarted.
[1724045903975] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
...the last entry repeated many times...

The full output of SQLPlus debug window is in file: SQLTools.output.txt