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

[BUG] Automatically Reconnect after 'Error: Socket closed' #287

Open
ghost opened this issue Jun 26, 2020 · 3 comments
Open

[BUG] Automatically Reconnect after 'Error: Socket closed' #287

ghost opened this issue Jun 26, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jun 26, 2020

Describe the bug
After some time, the connection to Qlik is closed.
It is no longer possible to access the Qlik files until the connection is re-established.
Running VSQlik: Connect to Qlik Server doesn't reconnect, because 'The workspace already exists'.
The only way to recover the connection is to quit and relaunch VS Code, then run VSQlik: Connect to Qlik Server.
Looking at the developer console, the error is ERR Unable to read file 'qix://localhost.qlikaddress.example/Test/script/main.qvs' (Error: Socket closed).

To Reproduce

  1. Connect to Qlik
  2. Load file from Qlik
  3. Wait for some time
  4. Close the file and open it again. If the connection is closed, there will be an error.

Expected behavior
VS Code Qlik would automatically re-connect if the connection is closed.

Desktop (please complete the following information):

  • OS: Windows 10 build 1909
  • VS Code Version: 1.46.1
  • vscode-qlik version: 0.4.0

Additional context
Add any other context about the problem here.

Error Log

LOG

ERR Unable to read file 'qix://localhost.qlikaddress.example/Test/script/main.qvs' (Error: Socket closed): Error: Unable to read file 'qix://localhost.qlikaddress.example/Test/script/main.qvs' (Error: Socket closed)
    at e.doReadAsFileStream (file:///C:/Users/dwales/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1694:417)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
notificationsAlerts.ts:40 Unable to open 'main.qvs': Unable to read file 'qix://localhost.qlikaddress.example/Test/script/main.qvs' (Error: Socket closed).
onDidChangeNotification @ notificationsAlerts.ts:40
(anonymous) @ notificationsAlerts.ts:26
fire @ event.ts:587
addNotification @ notifications.ts:207
notify @ notificationService.ts:106
doHandleOpenEditorError @ editorGroupView.ts:1056
(anonymous) @ editorGroupView.ts:984
processTicksAndRejections @ internal/process/task_queues.js:85
async function (async)
(anonymous) @ editorGroupView.ts:973
doShowEditor @ editorGroupView.ts:971
doOpenEditor @ editorGroupView.ts:954
openEditor @ editorGroupView.ts:882
(anonymous) @ editorService.ts:1299
(anonymous) @ explorerViewlet.ts:218
openEditor @ editorService.ts:1298
(anonymous) @ explorerView.ts:428
fire @ event.ts:587
open @ listService.ts:542
onSelection @ listService.ts:537
(anonymous) @ listService.ts:498
fire @ event.ts:587
(anonymous) @ event.ts:56
(anonymous) @ event.ts:810
fire @ event.ts:587
_set @ abstractTree.ts:1020
set @ abstractTree.ts:1010
setSelection @ abstractTree.ts:1219
onPointer @ listWidget.ts:634
onPointer @ abstractTree.ts:1138
fire @ event.ts:589
(anonymous) @ event.ts:56
fire @ event.ts:587
o @ event.ts:16

@r-hannuschka r-hannuschka self-assigned this Jun 26, 2020
@r-hannuschka r-hannuschka added the bug Something isn't working label Jun 26, 2020
@konne konne changed the title [Bug] Automatically Reconnect after 'Error: Socket closed' [BUG] Automatically Reconnect after 'Error: Socket closed' Jun 26, 2020
@konne
Copy link
Collaborator

konne commented Jun 26, 2020

This issue has two sides:

  1. if the connection between the server drops, the vscode should automatically to reconnect with the existing authentification tokens. If this token is invalid because of a very long not use, it should reauthenticate.
  2. extend the settings panel and add a connection ping setting with an standard time of 5000msec. Add an interval that just call global.getengineversion to transport at least any 5 sec. anything through the websocket connection, so that the network boxes (NAT, Firewallls & Co) don't kill that session.

@konne konne closed this as completed Aug 26, 2020
@ghost
Copy link
Author

ghost commented Nov 18, 2020

@konne @r-hannuschka This was working for awhile, but seems to have stopped working since I updated to 1.7. (I was previously on 1.5.)

@r-hannuschka
Copy link
Contributor

I will take a look onto this one, i got the same after some time (30 minutes maybe longer) my session is gone.

@r-hannuschka r-hannuschka reopened this Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants