Closed davide-sergi closed 3 years ago
@davide-sergi can you confirm if you saw anything suspicious in either the browser console or backend console log?
I think we've relatively recently added configurable support to prevent opening huge files. I am thinking this may be getting in the way. IIRC there's a preference for it - maybe try to see what it's set at for the app that fails.
@marcdumais-work: I checked .theia/settings.json
file, and there are not particular "critical" settings.
Anyway I don't think that this issue could be related to a configuration aspect. Because same scenario happens by using vs-code/python
extension, installed as plugin in this instance of Theia.
In fact, when I try to open a jupyter notebook:
.ipynb
file icon in the project explorervscode-python
plugin starts rendering process for jupyter notebook (to get its tipical nice UI)index_bundle.js
file (around 25MB in size) from Theia BE
GET /<path-to-file>/index_bundle.js
to the service_worker.js
service_worker
starts download on the websocket as described abovevscode-python
plugin has the logic to reopen a new tab in the editor if somethings go wrong, so restarting the download on the new websocket Note: Only sometimes (very rarely) the download gone successfully, but when it happens the content of file (index_bundle.js
) seems truncated (11-15 MB instead of 25MB)
@marcdumais-work
As assumed what we faced was an issue related to a timeout set on the Theia backend server (and not front-end). In particular, over websocket, server implements a kind of Keep Alive protocol (see image below). Every 30sec server sends a ping to the client and check if previous ping (sent 30 sec ago) has been confirmed with a "pong" ( 😊 ) by the client. If not websocket is disposed. Im my opinion, during downloading process client receives late this ping message because sent over same websocket channel used for download (at that time full for downloading). So client is not able to sends pong in time.
@theia/core/src/node/messaging/messaging-contribution.ts
We have a Theia web application instance deployed in a remote server of our intranet. When we try to open a big file (25MB):
By trying to run theia locally (on localhost) all work fine. Could be an issue related to slow downlaod speed? There are some timeout in frontend and/or backend part that trigger a websocket closing and reopening ?