eclipse-theia / theia-ide

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
346 stars 129 forks source link

Electron app shows empty window when exe installer is double clicked - For Theia version 1.20.0 #222

Open praveen69sk opened 2 years ago

praveen69sk commented 2 years ago

I'm trying to build a simple Hello-World electron application,

Environment:

package structure- Hello-World-App |-browser-app |-electron-app |-package.json

Steps to reproduce: using yo theia-extension create Hello-World App and change the package.json content respectively as i mentioned for theia 1.20.0 version and try to create the exe or debian package out of it.

For me

Note: I am referring theia-blueprint as an example Plz have a look at the screenshot: Error image

root package.json content

{ "private": true, "scripts": { "prepare": "lerna run prepare", "rebuild:browser": "theia rebuild:browser", "rebuild:electron": "set THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1 && theia rebuild:electron", "start:browser": "yarn rebuild:browser && yarn --cwd browser-app start", "start:electron": "yarn --cwd electron-app start", "electron": "yarn --cwd electron-app", "watch": "lerna run --parallel watch" }, "devDependencies": { "lerna": "2.4.0" }, "resolutions": { "/@theia/application-manager": "1.20.0", "/@theia/application-package": "1.20.0", "/@theia/callhierarchy": "1.20.0", "/@theia/cli": "1.20.0", "/@theia/console": "1.20.0", "/@theia/core": "1.20.0", "/@theia/debug": "1.20.0", "/@theia/editor": "1.20.0", "/@theia/electron": "1.20.0", "/@theia/file-search": "1.20.0", "/@theia/filesystem": "1.20.0", "/@theia/git": "1.20.0", "/@theia/keymaps": "1.20.0", "/@theia/markers": "1.20.0", "/@theia/messages": "1.20.0", "/@theia/mini-browser": "1.20.0", "/@theia/monaco": "1.20.0", "/@theia/navigator": "1.20.0", "/@theia/outline-view": "1.20.0", "/@theia/output": "1.20.0", "/@theia/plugin-dev": "1.20.0", "/@theia/plugin-ext": "1.20.0", "/@theia/plugin-ext-vscode": "1.20.0", "/@theia/plugin-metrics": "1.20.0", "/@theia/preferences": "1.20.0", "/@theia/process": "1.20.0", "/@theia/scm": "1.20.0", "/@theia/scm-extra": "1.20.0", "/@theia/search-in-workspace": "1.20.0", "/@theia/task": "1.20.0", "/@theia/terminal": "1.20.0", "/@theia/typehierarchy": "1.20.0", "/@theia/userstorage": "1.20.0", "/@theia/variable-resolver": "1.20.0", "/@theia/vsx-registry": "1.20.0", "/@theia/workspace": "1.20.0" }, "workspaces": [ "hello-world", "browser-app", "electron-app" ] }

electron-app package.json content

{ "private": true, "name": "electron-app", "main":"src-gen/frontend/electron-main.js", "author": "Praveen S Kalawad", "homepage": "https://github.com/eclipse-theia/theia-blueprint#readme", "version": "0.0.0", "repository": { "type": "git", "url": "git+https://github.com/eclipse-theia/theia-blueprint.git" }, "engines": { "yarn": ">=1.7.0 <2", "node": ">=12.14.1" }, "dependencies": { "@theia/core": "^1.0.0", "@theia/editor": "^1.0.0", "@theia/electron": "^1.0.0", "@theia/filesystem": "^1.0.0", "@theia/markers": "^1.0.0", "@theia/messages": "^1.0.0", "@theia/monaco": "^1.0.0", "@theia/navigator": "^1.0.0", "@theia/preferences": "^1.0.0", "@theia/process": "^1.0.0", "@theia/terminal": "^1.0.0", "@theia/workspace": "^1.0.0", "hello-world": "0.0.0" }, "devDependencies": { "@theia/cli": "^1.0.0", "electron": "15.3.5", "electron-builder": "22.10.5", "app-builder-lib": "22.10.5" }, "scripts": { "prepare": "yarn build", "clean": "theia clean && rimraf node_modules", "clean:dist": "rimraf dist", "build": "yarn bundle", "bundle": "theia build --mode development", "watch": "concurrently -n compile,bundle "theiaext watch --preserveWatchOutput" "theia build --watch --mode development"", "start": "theia start", "start:debug": "yarn start --log-level=debug", "package": "yarn clean:dist && electron-builder -c.mac.identity=null --publish never", "deploy": "yarn clean:dist && electron-builder -c.mac.identity=null --publish always", "package:preview": "yarn clean:dist && yarn rebuild && yarn build && electron-builder -c.mac.identity=null --dir", "update:checksum": "ts-node scripts/update-checksum.ts", "update:next": "ts-node ../../scripts/update-theia-to-next.ts", "download:plugins": "theia download:plugins", "test": "mocha --timeout 60000 "./test/*.spec.js"", "rebuild": "theia rebuild:electron" }, "theia": { "target": "electron", "frontend": { "config": { "applicationName": "Hello World App", "preferences": { "toolbar.showToolbar": true } } } } }

I would be grateful for any help.

jfaltermeier commented 2 years ago

Hi, without a reproducible project it is hard to help. But I think @theia/electron@1.20.0 depends on electron ^9.0.2 while your electron-app package.json has "electron": "15.3.5" as a dependency. This could be a mismatch. So maybe you could try using 9.4.4 in the electron-app package.json and in the electron-builder.yml