eclipse-archived / codewind-vscode

Extension for developing cloud-native, containerized applications from VS Code
https://codewind.dev
Eclipse Public License 2.0
17 stars 30 forks source link

CW Extension loses connection to CW pod #82

Closed maysunfaisal closed 5 years ago

maysunfaisal commented 5 years ago

Environment:

Describe the bug:

I have noticed that the CW extension looses connectivity to the CW pod during a Lagom project build. Have not been able to reproduce on other kube clusters (will update this issue if I come across it on other kube clusters).

To Reproduce: Build a Lagom project on ICP (needs to be verified with an another cluster instance)

root INFO Stopped watching the git repository: file:///projects/goproj
root ERROR Uncaught Exception:  Error: Connection got disposed.
root ERROR Error: Connection got disposed.
    at Object.dispose (/home/theia/node_modules/vscode-jsonrpc/lib/main.js:825:25)
    at /home/theia/node_modules/vscode-ws-jsonrpc/lib/socket/connection.js:14:56
    at CallbackList.invoke (/home/theia/node_modules/vscode-jsonrpc/lib/events.js:71:39)
    at Emitter.fire (/home/theia/node_modules/vscode-jsonrpc/lib/events.js:135:36)
    at closeHandler (/home/theia/node_modules/vscode-jsonrpc/lib/main.js:221:26)
    at CallbackList.invoke (/home/theia/node_modules/vscode-jsonrpc/lib/events.js:71:39)
    at Emitter.fire (/home/theia/node_modules/vscode-jsonrpc/lib/events.js:135:36)
    at WebSocketMessageReader.AbstractMessageReader.fireClose (/home/theia/node_modules/vscode-jsonrpc/lib/messageReader.js:135:27)
    at WebSocketMessageReader.fireClose (/home/theia/node_modules/vscode-ws-jsonrpc/lib/socket/reader.js:83:40)
    at /home/theia/node_modules/vscode-ws-jsonrpc/lib/socket/reader.js:39:19
root INFO Using Git [2.20.1] from the PATH. (/usr/bin/git)
root WARN e.onStart is slow, took: 145 ms
root INFO [nsfw-watcher: 2099] Started watching: /home/theia/.theia
root WARN e.onStart is slow, took: 1855 ms
root INFO [nsfw-watcher: 2099] Started watching: /projects
root INFO [nsfw-watcher: 2099] Started watching: /projects
root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120) starting instance

root WARN Plugin contributes items to a menu with invalid identifier: view/title
root INFO Started watching the git repository: file:///projects/goproj
root INFO Config file tasks.json does not exist under file:///projects
root ERROR Could not start contribution { name: 'Error',
  message: 'Request failed with status code 401',
  config:
   { transformRequest: {},
     transformResponse: {},
     timeout: 0,
     xsrfCookieName: 'XSRF-TOKEN',
     xsrfHeaderName: 'X-XSRF-TOKEN',
     maxContentLength: -1,
     headers: { Accept: 'application/json, text/plain, */*' },
     method: 'get',
     baseURL: 'http://che-default.9.42.74.24.nip.io/api',
     url:
      'http://che-default.9.42.74.24.nip.io/api/workspace/workspacekbetyjrfoxyy8i5t' },
  request: {},
  response:
   { data: 'Authorization token is missed',
     status: 401,
     statusText: '',
     headers: {},
     config:
      { transformRequest: {},
        transformResponse: {},
        timeout: 0,
        xsrfCookieName: 'XSRF-TOKEN',
        xsrfHeaderName: 'X-XSRF-TOKEN',
        maxContentLength: -1,
        headers: [Object],
        method: 'get',
        baseURL: 'http://che-default.9.42.74.24.nip.io/api',
        url:
         'http://che-default.9.42.74.24.nip.io/api/workspace/workspacekbetyjrfoxyy8i5t' },
     request: {} } }
root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/init()

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): initializing(/home/theia/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_ports_plugin.theia/lib/ports-plugin.js)

root INFO [nsfw-watcher: 2099] Started watching: /projects/mylaggggg1/Dockerfile
root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_theia_containers_plugin.theia/lib/containers-plugin.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_theia_factory_plugin.theia/lib/factory-plugin.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_theia_ssh_plugin.theia/lib/ssh-plugin-backend.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_welcome_plugin.theia/lib/welcome-plugin.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/task_plugin.theia/lib/task-plugin-backend.js)

root INFO [hosted-plugin: 79] [DBUG: 18:30:35.783 Connection.js:98]: Destroy connection https://localhost:9090/ latest

root INFO [hosted-plugin: 79] [DBUG: 18:30:35.786 Connection.js:73]: https://localhost:9090/ latest onDisconnect

root INFO [hosted-plugin: 79] [DBUG: 18:30:35.786 Connection.js:81]: https://localhost:9090/ latest is now disconnected

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/theia_yeoman_plugin.theia/lib/theia-yeoman-plugin-backend-plugin.js)

root INFO [hosted-plugin: 2120] PLUGIN_HOST(2120): PluginManagerExtImpl/loadPlugin(/tmp/vscode-unpacked/IBM.codewind-plugin.0.0.1.ftovmwhbrh.codewind-0.2.0.vsix/extension/out/extension)

root INFO [hosted-plugin: 2120] Codewind Tools created logs dir /home/theia/.theia/logs/20190626T183033/host/IBM.codewind

root INFO [hosted-plugin: 2120] Codewind Tools log file is at /home/theia/.theia/logs/20190626T183033/host/IBM.codewind/codewind-tools.log

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.382 Logger.js.setLogFilePath():62]: Logger initialized at /home/theia/.theia/logs/20190626T183033/host/IBM.codewind/codewind-tools.log

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.386 extension.js:52]: Finished activating logger

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.431 translator.js.init():65]: i18next initialized

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.433 extension.js:64]: activeMsg: Codewind Tools for VSCode are active!

root INFO [hosted-plugin: 2120] [DBUG: 18:30:37.434 InitViews.js.default():16]: Initializing views

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.435 CodewindManager.js.CodewindManager():53]: Codewind is  running in Theia; URL is https://localhost:9090/

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.435 CodewindManager.js.addOnChangeListener():99]: Adding onChangeListener 
[DBUG: 18:30:37.436 ProjectTree.js.ProjectTreeDataProvider():36]: Finished constructing ProjectTree

root INFO [hosted-plugin: 2120] [INFO: 18:30:37.437 StartCodewindCmd.js:29]: Starting Codewind

root INFO [hosted-plugin: 2120] [DBUG: 18:30:37.444 extension.js:85]: Finished activating

root INFO [nsfw-watcher: 2099] Started watching: /projects/springproj/README.md
root ERROR t/<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:2274575
phsZ/c</e.prototype[Symbol.iterator]/</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3907648
phsZ/c</e.prototype.invoke@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3907866
phsZ/l</e.prototype.fire@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3909177
e/this.mousedownListener@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:4167808

root ERROR t/<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:2274710
phsZ/c</e.prototype[Symbol.iterator]/</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3907648
phsZ/c</e.prototype.invoke@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3907866
phsZ/l</e.prototype.fire@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3909177
e/this.mouseupListener@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:4167740

root ERROR [hosted-plugin: 2120] [ERRO: 18:30:38.143 extension.js.on():43]: Unhandled promise rejection: { [Tbzm/i</e.prototype.setRules@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:2044417
Tbzm/i</e.prototype.updateIconStyleElement@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:2045285
Tbzm/i</e.prototype.setIconPath@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:2044694
w5wB/g</e.prototype.$setIconPath@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:4360904
Ri1k/</c</e.prototype.doInvokeHandler@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1947100
Ri1k/</c</e.prototype.invokeHandler@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1946825
Ri1k/</c</e.prototype.receiveRequest@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1945957
Ri1k/</c</e.prototype.receiveOneMessage@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1945430
e/this.multiplexor<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1944195
t/<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1947451
phsZ/c</e.prototype[Symbol.iterator]/</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3907648
phsZ/c</e.prototype.invoke@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3907866
phsZ/l</e.prototype.fire@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:3909177
postMessage@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1789307
PKK+/p</e.prototype.onRequest/</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1813971
s/</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1811931
s/<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1811249
PKK+/r</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1810931
PKK+/r<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1810728
PKK+/p</e.prototype.onRequest@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1813843
n/<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/theia.72ae361caf6a3fbcd17b.js:1:1813440
Y/s</</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/vendors.fb5f164f023b9bd66922.js:120:206911
Y/s</<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/vendors.fb5f164f023b9bd66922.js:120:206084
Y/s<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/vendors.fb5f164f023b9bd66922.js:120:206010
u/<@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/vendors.fb5f164f023b9bd66922.js:71:96644
u@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/vendors.fb5f164f023b9bd66922.js:71:96582
n@http://serveratmwbyxd-jwtproxy-server-4400.9.42.74.24.nip.io/vendors.fb5f164f023b9bd66922.js:71:95705
] name: 'TypeError', message: 'n.rules is undefined' }

root INFO [nsfw-watcher: 2099] Started watching: /projects/springproj/README.md
root ERROR [hosted-plugin: 2120] [ERRO: 18:30:38.295 extension.js.on():43]: Unhandled promise rejection: Error: Failed to show text document [object Object]
    at Object.<anonymous> (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-context.js:242:43)
    at step (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-context.js:47:23)
    at Object.next (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-context.js:28:53)
    at fulfilled (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-context.js:19:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)

root INFO [hosted-plugin: 2120] [INFO: 18:31:35.698 CodewindManager.js:133]: Good response from healthcheck

root INFO [hosted-plugin: 2120] [INFO: 18:31:35.699 CodewindManager.js:111]: Codewind is already started

root INFO [hosted-plugin: 2120] [INFO: 18:31:35.701 ActivateConnectionCmd.js:35]: Activating connection to https://localhost:9090/

root ERROR [hosted-plugin: 2120] WebSocket: Reconnecting in 1000ms due to 

root INFO [hosted-plugin: 2120] [INFO: 18:31:38.216 MCEnvironment.js:38]: Connection ENV Request fail - RequestError: Error: ESOCKETTIMEDOUT

root ERROR [hosted-plugin: 2120] [ERRO: 18:31:38.217 ActivateConnectionCmd.js:45]: Failed to start/connect to codewind: Error: Connecting to Codewind at https://localhost:9090/ failed.
    at Object.<anonymous> (/tmp/vscode-unpacked/IBM.codewind-plugin.0.0.1.ftovmwhbrh.codewind-0.2.0.vsix/extension/out/microclimate/connection/MCEnvironment.js:41:27)
    at Generator.throw (<anonymous>)
    at rejected (/tmp/vscode-unpacked/IBM.codewind-plugin.0.0.1.ftovmwhbrh.codewind-0.2.0.vsix/extension/out/microclimate/connection/MCEnvironment.js:15:65)
    at process._tickCallback (internal/process/next_tick.js:68:7)

root ERROR [hosted-plugin: 2120] WebSocket: Reconnecting...
tetchel commented 5 years ago

looks like poor network conditions, how am I supposed to fix this?