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

Extension 'mtxr.sqltools' FAILED to handle event: TypeError: Cannot read properties of undefined (reading 'document') #1376

Open
1 of 5 tasks
sjordan1975 opened this issue Sep 6, 2024 · 5 comments
Labels

Comments

@sjordan1975
Copy link

Describe the bug
Opened VSCode today and started seeing the following error in the Output tab of the terminal:

[ExtensionListenerError] Extension 'mtxr.sqltools' FAILED to handle event: TypeError: Cannot read properties of undefined (reading 'document'): Error: [ExtensionListenerError] Extension 'mtxr.sqltools' FAILED to handle event: TypeError: Cannot read properties of undefined (reading 'document') at i.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:171:28731) at r.B (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:732) at r.C (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:802) at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:1018) at c.$acceptEditorPropertiesChanged (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:163:34921) at y.S (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:5968) at y.Q (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:5734) at y.M (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:4767) at y.L (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:3602) at i.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:158:2297) at r.B (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:732) at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:949) at a.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:14463) at i.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:184:8635) at r.B (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:732) at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:949) at a.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:14463) at MessagePortMain.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:184:6761) at MessagePortMain.emit (node:events:519:28) at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2619)

To Reproduce
Steps to reproduce the behavior:

  1. Open VS Code
  2. Open Terminal
  3. Go to Output tab
  4. See error

Expected behavior
Not to see this error

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

Desktop (please complete the following information):

  • SQLTools Version [v0.28.3]
  • VS Code Version: [1.93.0]
  • OS: [Mac]
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • SQLite
    • Other? Which...
  • Database version: [not applicable as I was not attempting to connect to any database]

Additional context
Note, this was not any specific attempt to connect to a database. Simply opening VSCode throws this error

@gjsjohnmurray
Copy link
Collaborator

Which channel of the Output tab on Panel is selected when that error displays?

Does the SQLTools channel of Output show information about the extension initializing?

Does the problem also occur when you open a new VS Code window with no folder/file(s)/workspace opened?

@sjordan1975
Copy link
Author

Update: I disable both sqltools and sqltool sqllite driver. Closed VSCode overnight. Re-enabled the plugins and now I am not seeing the error. I don't know what else changed.

I'll report back if I re-encounter the error.

@gjsjohnmurray
Copy link
Collaborator

Thanks for the update. Closing for the moment.

@TonyGravagno
Copy link

Please re-open ticket.

Running SQLTools v0.28.3 from 2024-11-12. Still getting this error over latest VSCode 1.95.3/Windows.

I disabled primary extension and drivers. Completely restarted VSCode, no error. Enabled primary extension, no drivers, got same "reading 'document'" error in Extension Host output window. No driver enabled, no documents open.

I'm happy to help diagnose this if I can.

@gjsjohnmurray gjsjohnmurray reopened this Dec 2, 2024
@TonyGravagno
Copy link

TonyGravagno commented Dec 2, 2024

I'm doing extension cleanup and wanted to see if I could find anything more about this anomaly.
I disabled all extensions and I'm re-enabling them one by one. As I do this I have my Extension Host output window open in a separate window - easier to see - as exthost.log.
With this one .log window open I enabled SQLTools and it goes into what seems like an infinite loop on this error.
Note, this is simply when VSCode is opened and there is no folder or workspace open, no files in Explorer, etc.

I hope that helps.

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

No branches or pull requests

3 participants