Electron.NET
Electron.NET copied to clipboard
Stuck on splashscreen on non-english Windows (Italian)
- Version: 13.5.1
- CORE: v5
- NodeJs: 14.5.*
- Target: Windows
Splashscreen fails to clear and continue on to main window
Steps to Reproduce:
- Setup an Italian based language windows machine
- Do the standard setup for default Electron.NET repo
- Run the application.
./start.sh - Observe that the splashscreen is never cleared and the application hangs in that state.
After adding some more logging inside main.js I received this message.
Could not resolve CoreCLR path. For more details, enable tracing by setting COREHOST_TRACE environment variable to 1
added this on ln 286 of main.js
apiProcess.stderr.on('data', (data) => console.error(`stderr: ${data}`));
apiProcess.on('close', (code) => console.log(`ASP.NET Core Application: exited with code ${code}`));
https://github.com/dotnet/core/issues/4825
and the source of the issue....
oh god

Working solution
When publishing or running the applicaiton add the /PublishReadyToRun true argument to the command line.
i.e.
electronize start /target win /PublishReadyToRun true
electronize build /target win /PublishReadyToRun true
@danatcofo How were you able to hack the main.js without it being overwritten. I fine the the main.js that is created in my obj/ folder but don't know where the source of that is found.
It's inside electronnet.host/main.js
There is a pr open that does basically what I did which was add logging of the process error output. #592
Where can find this on my development PC? Or do I need to pull down the repo and do things that way?
Yah pull the repo and reference a local nugget package.
@danatcofo I downloaded your PR for .net 6 > https://github.com/ElectronNET/Electron.NET/pull/636 but I'm stuck on the splashscreen, do you know how I can fix this?
I tried to add the code snippet from you into the main.js but the log is not saying anything about a error.
stdout: info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:8003
stdout: ASP.NET Core host has fully started.
stdout: info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
stdout: info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
My .net 6 PR doesn't include the logging that is mentioned prior. Are you trying to build in Italian? if so did you see the note about the workaround...
electronize start /target win /PublishReadyToRun true
electronize build /target win /PublishReadyToRun true
My .net 6 PR doesn't include the logging that is mentioned prior. Are you trying to build in Italian? if so did you see the note about the workaround...
electronize start /target win /PublishReadyToRun true electronize build /target win /PublishReadyToRun true
hey, I'm trying to run Electron.NET in .NET 6 but somehow I'm stuck at the SpashScreen, I cant find any workaround. I implemented the logging into your pr, but there is still no issues or errors .
let binFilePath = path.join(currentBinPath, binaryFile);
var options = { cwd: currentBinPath };
apiProcess = cProcess(binFilePath, parameters, options);
apiProcess.stderr.on('data', (data) => console.error(`stderr: ${data}`));
apiProcess.on('close', (code) => console.log(`ASP.NET Core Application: exited with code ${code}`));
apiProcess.stdout.on('data', (data) => {
console.log(`stdout: ${data.toString()}`);
});
the application starts but the connection event is not being triggered
// @ts-ignore
io.on('connection', (socket) => {
I installed the h5 https://www.nuget.org/packages/h5.ElectronNET.API/16.0.4.23941 version which supports .NET 6
somehow only this version works for me all other version dont want to connect to Electron Socket this message dont displays in your .NET 6 PR. maybe you know why it's the problem?
.NET Application connected... global.electronsocket -3vHwKDZjFt0QRJOAAAA 2022-03-03T16:03:44.868Z
stdout: ElectronNET socket connected on port 8000!
should someone has problems with that too, here is a working .net 6 for electron
Install-Package h5.ElectronNET.API -version 16.0.4.23941
dotnet tool install -g h5.ElectronNET.CLI -version 16.0.4.23941
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!