Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command 'extension.runQuery' not found, #1087

Closed
alex7egli opened this issue Apr 13, 2018 · 12 comments
Closed

command 'extension.runQuery' not found, #1087

alex7egli opened this issue Apr 13, 2018 · 12 comments

Comments

@alex7egli
Copy link

  • MSSQL Extension Version: 1.3.1
  • VSCode Version: 1.22.1
  • OS Version: Windows 10

VSCode About:
Version 1.22.1
Commit 950b8b0d37a9b7061b6f0d291837ccc4015f5ecd
Date 2018-04-06T02:26:57.615Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Installed Extensions:
ESLint 1.4.8
mssql 1.3.1

Steps to Reproduce:

  1. Open a .sql file
  2. Highlight a sql statement and press ctrl-shift-e
    EXPECTED
  • connect to SQL DB popup comes up, choose connection, enter password, and click OK, then query runs
    ACTUAL
  • "command 'extension.runQuery' not found" displays in popup at bottom right
  • If you try to just connect directly by pressing ctrl-shift-c it says "command 'extension.connect' not found"

NOTE: This was working just last week. I've updated VSCode since then, now it doesn't work. I tried uninstalling and re-installing the mssql extension and I tried uninstalling my ESLint extension, neither worked.

@kevcunnane
Copy link
Contributor

This usually indicates that the extension failed to initialize. The most common reason is the SQL server we download on first launch isn't getting installed. Do you have a "SQLToolsService Initialization" output channel with debug info?
image

Once this completes downloading everything should be responsive.

@alex7egli
Copy link
Author

alex7egli commented Apr 16, 2018

I don't have the dropdown option for SqlToolsService in my Output console. I waited 8 minutes after starting VSCode but it never came up. In Output under Log(Extension) option I see this though:
[2018-04-16 09:43:32.988] [exthost1] [info] eager extensions activated
[2018-04-16 09:43:32.995] [exthost1] [info] ExtensionService#_doActivateExtension ms-mssql.mssql {"startup":false,"activationEvent":"onLanguage:sql"}
[2018-04-16 09:43:32.995] [exthost1] [info] ExtensionService#loadCommonJSModule C:\Users\spu78.vscode\extensions\ms-mssql.mssql-1.3.1\out\src\extension

Does that mean the extension won't start properly?

@joargp
Copy link

joargp commented Apr 17, 2018

I'm having the same issue

@nnsun
Copy link

nnsun commented Apr 17, 2018

I have the same problem. None of the MS SQL commands are working. Tried reinstalling both the extension and VS Code to no avail.
Windows 10, VS Code 1.22.2, MS SQL 1.3.1.

@alex7egli
Copy link
Author

I just upgraded to 1.22.2 and have the same issue with the same Output text.

@MattIrv
Copy link
Contributor

MattIrv commented Apr 19, 2018

We've seen this reported before but haven't been able to track it down yet.

In the meantime for those of you who aren't having success reinstalling, can you try the workaround a user posted in a previous discussion about this issue:

I ended up solving this problem by going into %USERPROFILE%.vscode\extensions and deleting the ms-mssql folder and reinstalling. I tried uninstalling and reinstalling, but after uninstalling, I would go into the extensions folder and it would still be there.

@alex7egli
Copy link
Author

@MattIrv That fixed it!

@MarkMoretto
Copy link

HI, I know this is a closed discussion, but the other solutions didn't work for me.

What did work was opening up the VSCode Keyboard shortcuts JSON file (should be a button on the upper-right side of the keyboard bindings window. There's a screenshot below for reference.) and then I updated the runQuery command from "extension.runQuery" to "mssql.runQuery."

Version and OS: VSCode 1.42.1; Windows 10 10.0.16299

Screenshot from Microsoft site:

VSCode Screenshot

@schwassj
Copy link

schwassj commented May 6, 2020

Along the same lines as @MarkMoretto's solution - I experienced this issue and resolved it by removing duplicated key bindings for "ctrl+shift+e", which was mapped both to extension.runQuery and MS SQL: Execute Query (the former was removed and the latter retained).

@jbshirk
Copy link

jbshirk commented Jun 20, 2022

This problem has re-emerged since restarting after latest update.

Version: 1.68.1 (user setup)
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630
Date: 2022-06-14T12:48:58.283Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.19044

In my Keyboard shortcuts: Ctrl+Shift+E : MS SQL: Execute Query [mssql.runQuery]
when: editorTextFocus && editorLangId == 'sql'

@ghost
Copy link

ghost commented Aug 3, 2023

This issue appeared again in latest version of

Name: SQL Server (mssql)
Id: ms-mssql.mssql
Description: Develop Microsoft SQL Server, Azure SQL Database and SQL Data Warehouse everywhere
Version: 1.20.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql

[ERROR] TypeError: Cannot read properties of undefined (reading 'getProxyAgentOptions')

Going back to previous version (V1.19.1) fixed the problem

@Charles-Gagnon
Copy link
Contributor

@A154858 That's a separate issue, see #17755 for details. We will be releasing a version with a fix here shortly so keep an eye out for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants