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

Electron app opens but window is not visible #776

Closed
abuga-bd opened this issue May 6, 2023 · 1 comment
Closed

Electron app opens but window is not visible #776

abuga-bd opened this issue May 6, 2023 · 1 comment

Comments

@abuga-bd
Copy link

abuga-bd commented May 6, 2023

Hi, I tried to run the project found here https://github.com/ElectronNET/Electron.NET (src/ElectronNET.WebApp) using electronize start. The app opens in the task bar and I can see a splash screen but it remains stuck there.

OS: macOS Ventura - Version 13.3.1 (22E261)

dotnet --info:
.NET SDK (reflecting any global.json):
Version: 6.0.406
Commit: 2988897946

Runtime Environment:
OS Name: Mac OS X
OS Version: 13.3
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/6.0.406/

global.json file:
Not found

Host:
Version: 6.0.14
Architecture: arm64
Commit: 2a90daa2cc

.NET SDKs installed:
6.0.406 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

node --version
v18.14.1

electronize version
ElectronNET.CLI Version: 23.6.1.0

dotnet tool list -g

Package Id Version Commands
electronnet.cli 23.6.1 electronize
x 6.0.11 x

I have a colleague who runs the same configuration on Windows and for him it works, and another one who runs it on macOS (same as me) and his also works. I am the only one who can't use electronize on his machine.
Could somebody provide some guidance?

The command that I runned and its output:

electronize start
Start Electron Desktop Application...
Arguments:

dotnet publish -r osx-x64 -c "Debug" --output "/Users/abuga/Electron.NET/src/ElectronNET.WebApp/obj/Host/bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --no-self-contained
MSBuild version 17.3.2+561848881 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
ElectronNET.API -> /Users/abuga/Electron.NET/src/ElectronNET.API/bin/Debug/net6.0/ElectronNET.API.dll
/tmp/MSBuildTemproot/tmp8d562b9729744b348586e7da3e313089.exec.cmd: line 2: /Users/abuga/Electron.NET/src/ElectronNET.API/devCleanup.sh: Permission denied
ElectronNET.WebApp -> /Users/abuga/Electron.NET/src/ElectronNET.WebApp/bin/Debug/net6.0/osx-x64/ElectronNET.WebApp.dll
ElectronNET.WebApp -> /Users/abuga/Electron.NET/src/ElectronNET.WebApp/obj/Host/bin/

node_modules missing in: /Users/abuga/Electron.NET/src/ElectronNET.WebApp/obj/Host/node_modules
Start npm install...
npm install

up to date, audited 153 packages in 509ms

22 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

ElectronHostHook handling started...
Start npm install for typescript & hosthooks...
npm install

added 118 packages, and audited 119 packages in 757ms

6 packages are looking for funding
run npm fund for details

3 vulnerabilities (2 low, 1 high)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.

npx tsc -p ../../ElectronHostHook
../../ElectronHostHook/connector.ts(2,33): error TS2503: Cannot find namespace 'SocketIO'.
../../ElectronHostHook/excelCreator.ts(1,24): error TS2307: Cannot find module 'exceljs' or its corresponding type declarations.
../../ElectronHostHook/excelCreator.ts(2,37): error TS2307: Cannot find module 'exceljs' or its corresponding type declarations.
../../ElectronHostHook/index.ts(7,25): error TS2503: Cannot find namespace 'SocketIO'.

Invoke electron - in dir: /Users/abuga/Electron.NET/src/ElectronNET.WebApp/obj/Host/node_modules/.bin
./electron "../../main.js"
Electron Socket IO Port: 8000
Electron Socket started on port 8000 at 127.0.0.1
ASP.NET Core Port: 8001
---STUCK HERE
image

Originally posted by @bugadrianalexandru in #623 (comment)

@abuga-bd
Copy link
Author

abuga-bd commented May 6, 2023

Hi, it seems the issue was me using .net 6 sdk for macos arm64 for the "electronize start" command published on osx-x64. I switched to .net 6 sdk macos x64 and now it's working fine.

It seems that I can also use the .net arm version if I type electronize start /target custom "osx-arm64;osx"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant