Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any change in settings causes the command plate to come up with "null password (Press 'Enter' to confirm or 'Escape' to cancel)"

Every time I change any of the settings in VSCode, the command plate to come up with "null password (Press 'Enter' to confirm or 'Escape' to cancel)". Hitting enter is enough to make things work fine, however, it is still annoying. I am not sure of the reason behind this and was wondering if anybody came across something similar.

Attached is a picture of the command plate (just in case...).enter image description here

like image 552
XMasterrrr Avatar asked Jan 28 '23 11:01

XMasterrrr


2 Answers

I just ran into the same issue. It looks like the culprit is SQLTools.

Here's the line of code that produces the dialog:
https://github.com/mtxr/vscode-sqltools/blob/0865cf0/src/sqltools.ts#L419-L424
This was super hard to track down, since it took me a while to figure out that the "Press 'Enter' to confirm" part is built-in to all VSCode prompt dialogs, and that string is not provided by the extension.

Putting this in my settings.json made the extension stop prompting me:

"sqltools.autoConnectTo": "blah",

(The default value is null. Putting a string somehow causes it to generate an error in the console but whatever, it solves the problem.)

I hope this works for you! You can also:

  • Disable or uninstall the extension if you don't need it at all
  • File an issue to let the author know: https://github.com/mtxr/vscode-sqltools/issues
like image 136
interestinglythere Avatar answered Feb 05 '23 15:02

interestinglythere


Like interestinglythere said, this is likely caused by the SQLTools extension.

To fix, do this:

  1. Press Ctrl+, to open settings.json
  2. Add line "sqltools.autoConnectTo": "Prevent Dialog Box", SQLTools prevent dialog box
  3. Save and open the command palette (Ctrl+Shift+P) to reload with the command :

    >Reload Window
    

Done!

like image 38
catadeluxe Avatar answered Feb 05 '23 16:02

catadeluxe