mtxr / vscode-sqltools

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

New Version 0.25.0 Keeps Crashing #971

Closed xendren closed 2 years ago

xendren commented 2 years ago

Describe the bug This morning (9/15/2022) we were working perfectly fine with the extension version 0.24.0, but it automatically updated and requested that I reload the extension. After updating the latest 0.25.0 version and reloading, the extension is no longer working properly. I have attempted to uninstall and reinstall the extension many times, but I get the same results. In the screenshot below, you can see that the Connection panel is constantly scanning, and an error message pops up in the lower right alert panel stating that the SQLTools Language Server crashed. If I click on the "Add New Connection" button, it does nothing.

SQLTools Output channel [1663266703861] INFO (ext): SQLTools is starting [1663266703867] INFO (ext): initializing language client... [1663266703869] INFO (ext): Detecting node path (if this stalls check Terminal view for the stuck session and kill it)... ns: "lc" [1663266705026] INFO (ext): Registering client for languages [{"scheme":"sqltools"},{"language":"sql","scheme":"untitled"},{"language":"sql","scheme":"file"},{"language":"sql","scheme":"sqltools"}] ns: "lc" [1663266705037] INFO (ext): loading plugins... [1663266705037] INFO (ext): registering Formatter Plugin. plugin: { "name": "Formatter Plugin" } [1663266705038] INFO (ext): registering Connection Manager Plugin. plugin: { "name": "Connection Manager Plugin" } [1663266705038] INFO (ext): registering CodeLens Plugin. plugin: { "name": "CodeLens Plugin", "registeredLanguages": [] } [1663266705040] INFO (ext): registering Dependency Manager Plugin. plugin: { "name": "Dependency Manager Plugin", "installingDrivers": [] } [1663266705043] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266705044] INFO (ext): registering History Manager Plugin. plugin: { "name": "History Manager Plugin" } [1663266705045] INFO (ext): registering Bookmarks Manager Plugin. plugin: { "name": "Bookmarks Manager Plugin" } [1663266705047] INFO (ext): SQLTools activation completed. 1185.205036 ms [1663266705056] INFO (ext): Formatter Plugin registered! [1663266705056] INFO (ext): CodeLens Plugin registered! [1663266705056] INFO (ext): Dependency Manager Plugin registered! [1663266705057] INFO (ext): Connection Manager Plugin registered! [1663266705057] INFO (ext): History Manager Plugin registered! [1663266705057] INFO (ext): Bookmarks Manager Plugin registered! [1663266705110] INFO (ext): registering Snowflake Plugin (driver). plugin: { "extensionId": "koszti.snowflake-driver-for-sqltools", "name": "Snowflake Plugin", "type": "driver" } /home/evickroy/.vscode-server/extensions/mtxr.sqltools-0.25.0/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

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) [Info - 6:31:45 PM] Connection to server got closed. Server will restart. /home/evickroy/.vscode-server/extensions/mtxr.sqltools-0.25.0/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

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) [Info - 6:31:45 PM] Connection to server got closed. Server will restart. /home/evickroy/.vscode-server/extensions/mtxr.sqltools-0.25.0/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

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) [Info - 6:31:45 PM] Connection to server got closed. Server will restart. [1663266706111] INFO (ext): EXECUTING COMMAND => sqltools.refreshTree [1663266706112] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" /home/evickroy/.vscode-server/extensions/mtxr.sqltools-0.25.0/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

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) [Info - 6:31:46 PM] Connection to server got closed. Server will restart. /home/evickroy/.vscode-server/extensions/mtxr.sqltools-0.25.0/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

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 - 6:31:46 PM] Connection to server got closed. Server will not be restarted. [1663266707044] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266744828] INFO (ext): EXECUTING COMMAND => sqltools.getConnections [1663266749247] INFO (ext): EXECUTING COMMAND => sqltools.refreshTree [1663266749247] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266749999] INFO (ext): EXECUTING COMMAND => sqltools.refreshTree [1663266749999] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266750195] INFO (ext): EXECUTING COMMAND => sqltools.refreshTree [1663266750196] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266750414] INFO (ext): EXECUTING COMMAND => sqltools.refreshTree [1663266750414] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266750647] INFO (ext): EXECUTING COMMAND => sqltools.refreshTree [1663266750647] INFO (ext): Connection explorer changed. Will be updated. ns: "conn-man:explorer" [1663266751487] INFO (ext): EXECUTING COMMAND => sqltools.openAddConnectionScreen

To Reproduce Steps to reproduce the behavior:

  1. Allow SQLTools extension to update to 0.25.0
  2. Click on "Add New Connection"
  3. Nothing happens
  4. See error in the VS Code alert panel

Expected behavior Expecting the extension to function properly without crashing.

Screenshots image

Desktop (please complete the following information):

Additional context Uninstalling version 0.25.0 and reinstalling the previous version 0.24.0 does work as expected.

gjsjohnmurray commented 2 years ago

I haven't yet been able to reproduce this. Testing on 64-bit Windows 11 with VS Code 1.71.2 and a workspace in which the only enabled extensions (discounting built-in ones) are SQLTools (0.25.0) and the Snowflake driver (0.4.2).

Your report seems to indicate that you are getting this problem on Windows, Linux and Mac. Is this true? Please give more details about the OS(es) you are seeing the issue in.

Do you get the crash if you restart VS Code after disabling the Snowflake driver and any others you might have installed?

Does the error in the SQLTools output channel only appear when you click the Add New Connection button?

xendren commented 2 years ago

I haven't yet been able to reproduce this. Testing on 64-bit Windows 11 with VS Code 1.71.2 and a workspace in which the only enabled extensions (discounting built-in ones) are SQLTools (0.25.0) and the Snowflake driver (0.4.2).

Your report seems to indicate that you are getting this problem on Windows, Linux and Mac. Is this true? Please give more details about the OS(es) you are seeing the issue in.

Do you get the crash if you restart VS Code after disabling the Snowflake driver and any others you might have installed?

Does the error in the SQLTools output channel only appear when you click the Add New Connection button?

Confirm the issue occurred on a Mac running latest MacOS. Also, confirmed from the same Mac that was remote-ssh extension into an Ubuntu 22.04 server. Another user confirmed having the same issues on Windows 11. That Windows user had everything working all morning, and it popped up wanting to reload the UI for the new 0.25.0 version. After they reloaded the UI, they had the exact same issues.

Originally, I was testing out connecting via remote-ssh to a new linux dev server that did not have any extensions installed. I installed the SQLTools extension, but clicking the "Add New Connection" did nothing. I was not able to find any errors or messages anywhere. I uninstalled and reinstalled several times. I completely shutdown and restarted/connected vs code. VS Code eventually popped up the alert message in the corner that I sent in the screenshot warning that it had crashed many times.

gjsjohnmurray commented 2 years ago

Please try the suggestion at https://github.com/mtxr/vscode-sqltools/issues/972#issuecomment-1248692174

erjenkins29 commented 2 years ago

Not to be vague-- but this new version has crashed my sqltools as well-- I reverted back to 0.24.0 and it worked fine. I'll give a more details in a moment, but basically the project didnt recognize the correct .git, my connection to aws redshift was not displayed, and when trying to add a new connection, the extension didn't respond. everything looked normal in the .vscode/settings.json -- I'm also running in windows 11

gjsjohnmurray commented 2 years ago

@erjenkins29 please try the setting suggested in the linked comment above and let us know if it fixes 0.25.0

erjenkins29 commented 2 years ago

Hi @gjsjohnmurray -- I can confirm that the suggestion in https://github.com/mtxr/vscode-sqltools/issues/972#issuecomment-1248692174 fixes 0.25.0 in my environment -- thanks for the clear instructions

gjsjohnmurray commented 2 years ago

@xendren we published 0.25.1 today which reverts the default of the sqltools.useNodeRuntime setting to false, which is what it was in 0.24 and earlier. I'm not certain this will make any difference to your crashes, but please try it.

If 0.25.1 still crashes please temporarily disable all of your SQLTools driver extensions and re-check.

xendren commented 2 years ago

Just confirmed that 0.25.1 has corrected the issues, and everything appears to be working fine in al of our environments.

gjsjohnmurray commented 2 years ago

@xendren thanks for that good news. Closing the issue. Sorry for the inconvenience caused.

Mingun commented 1 year ago

It is still crashing in v0.26.0. SQLTools output from VS Code:

[1670914064877] INFO  (ext): SQLTools is starting
[1670914064978] INFO  (ext): initializing language client...
[1670914064978] INFO  (ext): Detecting node path (if this stalls check Terminal view for the stuck session and kill it)...
    ns: "lc"
[1670914074507] INFO  (ext): Registering client for languages [{"scheme":"sqltools"},{"language":"sql","scheme":"untitled"},{"language":"sql","scheme":"file"},{"language":"sql","scheme":"sqltools"}]
    ns: "lc"
[1670914074515] INFO  (ext): loading plugins...
[1670914074515] INFO  (ext): registering Formatter Plugin.
    plugin: {
      "name": "Formatter Plugin"
    }
[1670914074516] INFO  (ext): registering Connection Manager Plugin.
    plugin: {
      "name": "Connection Manager Plugin"
    }
[1670914074516] INFO  (ext): registering CodeLens Plugin.
    plugin: {
      "name": "CodeLens Plugin",
      "registeredLanguages": []
    }
[1670914074523] INFO  (ext): registering Dependency Manager Plugin.
    plugin: {
      "name": "Dependency Manager Plugin",
      "installingDrivers": []
    }
[1670914074525] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1670914074526] INFO  (ext): registering History Manager Plugin.
    plugin: {
      "name": "History Manager Plugin"
    }
[1670914074526] INFO  (ext): registering Bookmarks Manager Plugin.
    plugin: {
      "name": "Bookmarks Manager Plugin"
    }
[1670914074598] INFO  (ext): SQLTools activation completed. 9720.419162 ms
[1670914074598] INFO  (ext): Formatter Plugin registered!
[1670914074598] INFO  (ext): CodeLens Plugin registered!
[1670914074599] INFO  (ext): Dependency Manager Plugin registered!
[1670914074599] INFO  (ext): Connection Manager Plugin registered!
[1670914074599] INFO  (ext): History Manager Plugin registered!
[1670914074599] INFO  (ext): Bookmarks Manager Plugin registered!
[1670914075716] INFO  (ext): EXECUTING COMMAND => sqltools.refreshTree
[1670914075716] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
/home/mingun/.vscode/extensions/mtxr.sqltools-0.26.0/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

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)
[Info  - 11:47:55] Connection to server got closed. Server will restart.
/home/mingun/.vscode/extensions/mtxr.sqltools-0.26.0/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

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)
[Info  - 11:47:56] Connection to server got closed. Server will restart.
[1670914076526] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
/home/mingun/.vscode/extensions/mtxr.sqltools-0.26.0/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

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)
[Info  - 11:47:56] Connection to server got closed. Server will restart.
/home/mingun/.vscode/extensions/mtxr.sqltools-0.26.0/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

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)
[Info  - 11:47:57] Connection to server got closed. Server will restart.
/home/mingun/.vscode/extensions/mtxr.sqltools-0.26.0/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

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 - 11:47:57] Connection to server got closed. Server will not be restarted.

As you can see from beginning of the log, formatter plugin should be installed, but when I try to perform formatting (Ctrl+Shift+I), VS Code tell me that no formatters are installed.

n3m4x commented 1 year ago

Hey, I still have this error in version 0.28.0. Is there a fix for this?

catsmanac commented 1 year ago

I had the issue too in 0.28.0, and the advise to change "sqltools.useNodeRuntime": false in settings.json, worked for me.

n3m4x commented 1 year ago

Unfortunately, the extension says that I need to set "sqltools.useNodeRuntime" to true to be able to connect to a sqlite database.

gjsjohnmurray commented 1 year ago

@n3m4x the doc at https://vscode-sqltools.mteixeira.dev/en/drivers/sq-lite gives an alternative to setting that to true, which is to provide the path to a local installation of NodeJS. It also makes a recommendation about which default shell to configure VS Code for if you are on Windows and want autodetect to work (which is what the true setting invokes).

If this doesn't help you resolve your issue please open a fresh one here and provide platform and version information as requested.