Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

Stuck on splashscreen on non-english Windows (Italian)

Open danatcofo opened this issue 3 years ago • 11 comments
trafficstars

  • Version: 13.5.1
  • CORE: v5
  • NodeJs: 14.5.*
  • Target: Windows

Splashscreen fails to clear and continue on to main window

Steps to Reproduce:

  1. Setup an Italian based language windows machine
  2. Do the standard setup for default Electron.NET repo
  3. Run the application. ./start.sh
  4. Observe that the splashscreen is never cleared and the application hangs in that state.

danatcofo avatar Dec 03 '21 14:12 danatcofo

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

danatcofo avatar Dec 03 '21 15:12 danatcofo

and the source of the issue....

oh god

image

danatcofo avatar Dec 03 '21 17:12 danatcofo

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 avatar Dec 03 '21 17:12 danatcofo

@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.

schaveyt avatar Dec 27 '21 21:12 schaveyt

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

danatcofo avatar Dec 27 '21 21:12 danatcofo

Where can find this on my development PC? Or do I need to pull down the repo and do things that way?

schaveyt avatar Dec 28 '21 00:12 schaveyt

Yah pull the repo and reference a local nugget package.

danatcofo avatar Dec 28 '21 02:12 danatcofo

@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

wthks avatar Mar 03 '22 14:03 wthks

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

danatcofo avatar Mar 03 '22 15:03 danatcofo

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) => {

wthks avatar Mar 03 '22 15:03 wthks

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

wthks avatar Mar 03 '22 16:03 wthks

🎉🚀 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!

GregorBiswanger avatar Mar 28 '23 20:03 GregorBiswanger