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

Postgres: Run query results in blank window #624

Closed
Fmstrat opened this issue Jun 21, 2020 · 5 comments
Closed

Postgres: Run query results in blank window #624

Fmstrat opened this issue Jun 21, 2020 · 5 comments
Labels

Comments

@Fmstrat
Copy link
Contributor

Fmstrat commented Jun 21, 2020

Describe the bug
When running queries the new tab pops up, however the "loading" spinner never shows and the window remains blank. Postgres shows no signs that the query ran.

Sometimes running the query again 2 or 3 times brings things back. But most of the time VSCode must be restarted.

To Reproduce
Steps to reproduce the behavior:

  1. Connect to a postgres DB
  2. Type a SELECT query and run it
  3. Sometimes the tab is blank

Expected behavior
The query to run.

Screenshots
blank

Desktop (please complete the following information):

  • SQLTools Version [e.g. v0.17.x] v0.22.8
  • VSCode Version: [e.g 1.x.y] 1.46.1
  • Driver Used/Version: [e.g PostgreSQL 9, Oracle CE, SQLite, MySQL 6, Redshift..] Postgres 11.3
  • OS: [e.g. Windows, Linux, Mac] Linux
@Fmstrat Fmstrat added the triage label Jun 21, 2020
@mtxr
Copy link
Owner

mtxr commented Jun 23, 2020

Do you see any errors on the SQLTools output channel? Also, you can try to check the errors running the command Developer: Open webview developer tools. It's built-in on VSCode

@Fmstrat
Copy link
Contributor Author

Fmstrat commented Jun 23, 2020

I did not see any errors in the output channel, but i will try the webview the next time it occurs. I have noticed since reporting that if I wait for say, 15s, then run the query again, it works. So a pattern like this occurs:

  • Run query, blank tab opens
  • Wait 1s
  • Run query, another blank tab opens
  • Wait 1s
  • Do that over and get a bunch of blank tabs
  • Wait 15s
  • Run query, results appear

@Fmstrat
Copy link
Contributor Author

Fmstrat commented Jun 23, 2020

From the webview console:

Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
theme.css:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
vendor.js:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
commons.js:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
Results.js:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME

This happened by:

  • Connect to DB1
  • Run query
  • Connect to DB2 without disconnecting from DB1
  • Run query
  • Go back to DB1
  • Run query (error)

It does not always happen that way, though, in fact, after restarting VSCode it happened again right away on my first query to DB1. It actually seems stuck in that state now. Both DBs are in a constant blank screen result.

edit1
This appears to occur on VM64 main.js:12

edit2
If I "reload" in the network window, I get a little bit more detail:

Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
vscode-resource://file///home/fmstrat/.vscode/extensions/mtxr.sqltools-0.22.9/ui/theme.css:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
vendor.js:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
commons.js:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
Results.js:1 Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
data:text/html;char…:1 [Intervention] Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808
VM64 main.js:12 GET vscode-resource://file///home/fmstrat/.vscode/extensions/mtxr.sqltools-0.22.9/ui/commons.css net::ERR_UNKNOWN_URL_SCHEME
(anonymous) @ VM64 main.js:12
async function (async)
(anonymous) @ VM64 main.js:10
emit @ VM18 events.js:203
onMessage @ VM61 renderer_init.js:3659
VM64 main.js:12 GET vscode-resource://file///home/fmstrat/.vscode/extensions/mtxr.sqltools-0.22.9/ui/theme.css net::ERR_UNKNOWN_URL_SCHEME
(anonymous) @ VM64 main.js:12
async function (async)
(anonymous) @ VM64 main.js:10
emit @ VM18 events.js:203
onMessage @ VM61 renderer_init.js:3659
VM64 main.js:12 GET vscode-resource://file///home/fmstrat/.vscode/extensions/mtxr.sqltools-0.22.9/ui/vendor.js net::ERR_UNKNOWN_URL_SCHEME
(anonymous) @ VM64 main.js:12
async function (async)
(anonymous) @ VM64 main.js:10
emit @ VM18 events.js:203
onMessage @ VM61 renderer_init.js:3659
VM64 main.js:12 GET vscode-resource://file///home/fmstrat/.vscode/extensions/mtxr.sqltools-0.22.9/ui/commons.js net::ERR_UNKNOWN_URL_SCHEME
(anonymous) @ VM64 main.js:12
async function (async)
(anonymous) @ VM64 main.js:10
emit @ VM18 events.js:203
onMessage @ VM61 renderer_init.js:3659
VM64 main.js:12 GET vscode-resource://file///home/fmstrat/.vscode/extensions/mtxr.sqltools-0.22.9/ui/Results.js net::ERR_UNKNOWN_URL_SCHEME

edit3
I don't really know this code at all, but a little backtracking if it helps:

@mtxr
Copy link
Owner

mtxr commented Jun 25, 2020

Apparently we don't need .with({ scheme: 'vscode-resource' }) anymore.
I see some vscode issues microsoft/vscode#98231 microsoft/vscode#100918 as well also that is not part of the docs anymore https://code.visualstudio.com/api/extension-guides/webview

I will do this later tonight, doesn't seem to be a big change

@mtxr mtxr closed this as completed in 284f44e Jun 26, 2020
@Fmstrat
Copy link
Contributor Author

Fmstrat commented Aug 6, 2020

@mtxr Hey! Is this assigned to a version that's live yet? I'm still seeing this issue in 0.22.11.

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

2 participants