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

the SQLTools language server crashed, SyntaxError: Unexpected token

Open yadav-vikas opened this issue 1 year ago • 5 comments

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 internals_suspectRx=/"(?:|\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):

  • SQLTools Version [e.g. v0.17.x]
  • VS Code Version: [e.g 1.x.y]
  • OS: [e.g. Windows, Linux, Mac]
  • Driver:
    • [x] PostgreSQL/Redshift
    • [x] MySQL/MariaDB
    • [ ] MSSQL/Azure
    • [x] SQLite
    • [ ] Other? Which...
  • Database version: [e.g. MySQL v5.6, PostgreSQL vX...]

Additional context Add any other context about the problem here.

yadav-vikas avatar Apr 04 '23 09:04 yadav-vikas

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

guhls avatar Jun 30 '23 01:06 guhls

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

yadav-vikas avatar Jul 03 '23 13:07 yadav-vikas

Same for me. 0.26.0 works

marov avatar Jul 31 '23 23:07 marov

same here :/

loic-fontaine-msr avatar Mar 08 '24 17:03 loic-fontaine-msr

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

Mingun avatar Aug 19 '24 05:08 Mingun