I'm trying to run the electron example on my machine, but even from a clean clone and build it just gets stuck at a loading screen forever with no apparent errors anywhere:

From Developing.md:
git clone https://github.com/eclipse-theia/theia \
&& cd theia \
&& yarn \
&& yarn run rebuild:electron \
&& cd examples/electron \
&& yarn run start
While the electron example gets stuck, the browser example works fine. I tried the same steps but first checked out v1.1.0, and the issue still happens.
Here's the logs from start to finish: https://pastebin.com/xU44UViN
@Foltik thank you for reporting the issue! I attempted to verify the bug and it works well for me.
I did a fresh clone (new directory) and attempted to build, and run the electron app and it works fine.
Are you perhaps missing some pre-requisite dependency listed here?
@vince-fugnitto They seem to all be satisfied. I have yarn v1.22.4, libx11, libxkbfile, git v2.26.2, and a working GCC toolchain v10.1.0 (native modules built fine). I tried downgrading directly to yarn v1.7.0 but the issue remains.
Do you know of any way I could try to debug why the interface isn't loading on my end?
Do you know if there's any way I could debug why the interface isn't loading?
You could follow the debugging guide on the 'developping' doc:
Note that I am trying on my macOS machine, I can try on Linux but I use Ubuntu.
@vince-fugnitto Tried to debug both frontend and backend to no avail. Messing about with the developer tools in the frontend, it seems I can get it to load intermittently by refreshing the UI.
I took a short video showcasing the weird behavior, where I keep refreshing the UI, and it seemingly randomly either loads fine or doesn't load at all. Interestingly, it loads 100% of the time if I click "Start profiling and reload page" in the performance tab.
In the network tab, it always seems to get as far as loading loader.js, so maybe the issue I'm having is related to that file?
I'm wondering you're in a weird state, before today were you able to successfully run the electron example previously (before opening the issue)? I often like cleaning the electron cache and local-storage and I'm worried if it might be interfering with your startup. When the app is started, you can try running the command Reset Workbench Layout which should perform some cleanup.
Out of curiosity, what brought you to the project? :)
Do you have plans to use the framework yourself, and ideas for contributions?
@vince-fugnitto I was only ever able to run it on the browser. I tried removing the electron, yarn, and npm cache, deleting all app storage in dev tools, resetting workbench layout, updating my system, rebooting, but nothing. Tried it on my laptop and I'm able to successfully get it to run every time, so it has to be some weird state my system is in. Still no idea what would cause it to manifest in this way, or why it's failing silently.
As for the project, I ran into it when I was looking for a fully open and extensible editor running web tech I could hack on and build my own customizations for easily. This project is super exciting to me in that regard, and I do hope I can get it working, write some extensions/plugins, and make contributions once I'm more familiar with its inner workings!
Not sure it's related...but with current master, when I run the browser example, I have to hit "return" in the console where I start the back end for the UI to finish loading. This is on Windows, if it's relevant.
@vince-fugnitto I was only ever able to run it on the browser. I tried removing the electron, yarn, and npm cache, deleting all app storage in dev tools, resetting workbench layout, updating my system, rebooting, but nothing. Tried it on my laptop and I'm able to successfully get it to run every time, so it has to be some weird state my system is in. Still no idea what would cause it to manifest in this way, or why it's failing silently.
I'm not sure either, it is working for me on my end and I'm unable to successfully reproduce the issue.
As for the project, I ran into it when I was looking for a fully open and extensible editor running web tech I could hack on and build my own customizations for easily. This project is super exciting to me in that regard, and I do hope I can get it working, write some extensions/plugins, and make contributions once I'm more familiar with its inner workings!
That sounds great! We look forward to any contributions you'll have in the future 馃槃
I experienced a very similar (same?) issue with the browser example on Windows yesterday. I had to refresh the browser multiple times.
I have to hit "return" in the console
Nice, let me try this.
Update:
Nice, let me try this.
I could not reproduce.
I've gotten this on Manjaro Linux as well.
I've gotten this on Manjaro Linux as well.
@nklayman do you happen to have additional information which would be useful to troubleshoot the issue?
@Foltik @nklayman are you still experiencing issues?
Sorry for not providing more details, I kinda broke the OS install where I got the bug, so wasn't able to go back to try it again. On a fresh install of ubuntu it worked fine, so unless @Foltik is still having issues I'd say you're good to close the issue.
Sorry for not providing more details, I kinda broke the OS install where I got the bug, so wasn't able to go back to try it again. On a fresh install of ubuntu it worked fine, so unless @Foltik is still having issues I'd say you're good to close the issue.
Thank you for the response, I'll close the issue for the moment and re-open it if the problem returns.
Can be reproduced after slightly modifying the code, and opening a recent workspace:
diff --git a/packages/workspace/src/browser/quick-open-workspace.ts b/packages/workspace/src/browser/quick-open-workspace.ts
index 2fc690acf..3c5a00716 100644
--- a/packages/workspace/src/browser/quick-open-workspace.ts
+++ b/packages/workspace/src/browser/quick-open-workspace.ts
@@ -79,7 +79,7 @@ export class QuickOpenWorkspace implements QuickOpenModel {
const current = this.workspaceService.workspace;
const uriToOpen = new URI(workspace);
if ((current && current.resource.toString() !== workspace) || !current) {
- this.workspaceService.open(uriToOpen);
+ this.workspaceService.open(uriToOpen, { preserveWindow: true });
}
return true;
},
I could not reproduce this on macOS but seems to be an issue on Windows. I cannot reset the workbench layout. It hangs at the spinner.
I preserved the log from the browser window, and I can see quite a lot of errors:
VM69 bundle.js:136354 root ERROR The ws channel does not exist 2
VM194 44.bundle.js:1100 Uncaught (in promise) Error: connection is closed
at Object.create (VM194 44.bundle.js:1100)
at Object.<anonymous> (VM194 44.bundle.js:1126)
at Object.disposable.dispose (VM69 bundle.js:134957)
at DisposableCollection.../../packages/core/lib/common/disposable.js.DisposableCollection.dispose (VM69 bundle.js:134934)
at RPCProtocolImpl.push.../../packages/plugin-ext/lib/common/rpc-protocol.js.RPCProtocolImpl.dispose (VM194 44.bundle.js:1147)
at RPCProtocolImpl.disposable.dispose (VM69 bundle.js:134957)
at DisposableCollection.../../packages/core/lib/common/disposable.js.DisposableCollection.dispose (VM69 bundle.js:134934)
at VM195 53.bundle.js:997
at VM69 bundle.js:135676
at CallbackList.../../packages/core/lib/common/event.js.CallbackList.invoke (VM69 bundle.js:135691)
Uncaught (in promise) Error: Connection got disposed.
at Object.dispose (VM69 bundle.js:99783)
at VM69 bundle.js:104097
at CallbackList.invoke (VM69 bundle.js:98153)
at Emitter.fire (VM69 bundle.js:98199)
at closeHandler (VM69 bundle.js:99033)
at CallbackList.invoke (VM69 bundle.js:98153)
at Emitter.fire (VM69 bundle.js:98199)
at WebSocketMessageReader.fireClose (VM69 bundle.js:100020)
at WebSocketMessageReader.fireClose (VM69 bundle.js:104258)
at VM69 bundle.js:104203
Uncaught (in promise) Error: connection is closed
at Object.create (VM194 44.bundle.js:1100)
at Object.<anonymous> (VM194 44.bundle.js:1126)
at Object.disposable.dispose (VM69 bundle.js:134957)
at DisposableCollection.../../packages/core/lib/common/disposable.js.DisposableCollection.dispose (VM69 bundle.js:134934)
at RPCProtocolImpl.push.../../packages/plugin-ext/lib/common/rpc-protocol.js.RPCProtocolImpl.dispose (VM194 44.bundle.js:1147)
at RPCProtocolImpl.disposable.dispose (VM69 bundle.js:134957)
at DisposableCollection.../../packages/core/lib/common/disposable.js.DisposableCollection.dispose (VM69 bundle.js:134934)
at VM195 53.bundle.js:997
at VM69 bundle.js:135676
at CallbackList.../../packages/core/lib/common/event.js.CallbackList.invoke (VM69 bundle.js:135691)
And from the backend:
root INFO >>> Resetting layout...
root INFO <<< The layout has been successfully reset.
root ERROR Uncaught Exception: Error: Connection got disposed.
root ERROR Error: Connection got disposed.
at Object.dispose (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\main.js:904:25)
at C:\Users\kittaakos\dev\git\theia\node_modules\vscode-ws-jsonrpc\lib\socket\connection.js:14:41
at CallbackList.invoke (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:62:39)
at Emitter.fire (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:121:36)
at closeHandler (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\main.js:240:26)
at CallbackList.invoke (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:62:39)
at Emitter.fire (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:121:36)
at WebSocketMessageReader.fireClose (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\messageReader.js:111:27)
at WebSocketMessageReader.fireClose (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-ws-jsonrpc\lib\socket\reader.js:67:19)
at C:\Users\kittaakos\dev\git\theia\node_modules\vscode-ws-jsonrpc\lib\socket\reader.js:24:18
root ERROR Uncaught Exception: Error: Connection got disposed.
root ERROR Error: Connection got disposed.
at Object.dispose (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\main.js:904:25)
at C:\Users\kittaakos\dev\git\theia\node_modules\vscode-ws-jsonrpc\lib\socket\connection.js:14:41
at CallbackList.invoke (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:62:39)
at Emitter.fire (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:121:36)
at closeHandler (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\main.js:240:26)
at CallbackList.invoke (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:62:39)
at Emitter.fire (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\events.js:121:36)
at WebSocketMessageReader.fireClose (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-jsonrpc\lib\messageReader.js:111:27)
at WebSocketMessageReader.fireClose (C:\Users\kittaakos\dev\git\theia\node_modules\vscode-ws-jsonrpc\lib\socket\reader.js:67:19)
at C:\Users\kittaakos\dev\git\theia\node_modules\vscode-ws-jsonrpc\lib\socket\reader.js:24:18
Can someone else please check the same on a Windows machine, preferably from a real HW and not from a VM.