mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Content After Splash Screen Is Blank Until Click #714
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sthomas-fcbh on GitHub (Oct 13, 2021).
Originally assigned to: @GregorBiswanger on GitHub.
ElectronNET.CLI 13.5.1
ElectronNET.API 13.5.1
NodeJs version 6.14.12 (not sure if used)
Blazor Application Using net5.0 Target Framework
When I run my Blazor app as a windows desktop application using Electron, the splash screen shows, and then a blank screen shows. If I do not interact with the screen from that point, the blank screen persists and the app hangs on the blank screen.
Clicking the screen or hovering the mouse over Electron window seems to trigger the content of the page loading. After clicking I can resume use of the app as normal.
Steps to Reproduce:
Note: this issue occurs sporadically, so it may take a few tries to reproduce.
After splash screen, before click:

After splash screen, after click:
@TiagoBrazSantos commented on GitHub (Oct 15, 2021):
Same problem here.
net5 and ReactJs
I tried some things like setting focus programmatically after the window opens, but with no success.
@pvenky commented on GitHub (Nov 13, 2021):
We are also seeing this problem sporadically. I've tried with a frameless window and a
TitleBarStyle.hiddenand the problem exists in both cases.Question to @TiagoBrazSantos and @sthomas-fcbh - are y'all using a frameless window or does the problem occur even in a regular window?
@jeffdod commented on GitHub (Nov 25, 2021):
I'm seeing the same issue. My splash screen displays properly, followed by my app. But...my app page is blank, until I grab the app window with the mouse and move it. Then it refreshes, and all is well.
Interestingly, the bug does not happen when I run in debug mode in Visual Studio 2022 (or VS2019). It's only with a Release build/install that this occurs.
These are the startup options I have in my Startup.cs file Configure method.
UPDATE: In fact, if you wait 10 seconds or so, the page will eventually show (at times), even without moving the main window. However, as mentioned above, if you do move the main window, the page immediately refreshes, and you can see the page context as expected.
@jeffdod commented on GitHub (Nov 27, 2021):
Hello,
Yes, I'm using a custom icon.
In the electron.manifest.json file, I'm using this to configure the custom
icon:
"win": {
"icon": "../../../GreekVocabBuilder.ico"
}
Similarly, for the splash screen, I'm using a custom image, and specifying
it in electron.manifest.json like so:
"splashscreen": {
"imageFile": "/wwwroot/assets/img/GreekVocabBuilder.png"
}
Sincerely,
Jeff Dodson
On Sat, Nov 27, 2021 at 9:43 AM Guillermo Orue Marighetti <
@.***> wrote:
@ggomarighetti commented on GitHub (Nov 27, 2021):
Thank you Jeff, sorry for delete the previous issue.
@jeffdod commented on GitHub (Nov 28, 2021):
One other thing I should probably mention: This "bug" only occurs with a Windows build. If I build and run on a Linux (i.e., Ubuntu) system, everything works...the splash screen splashes, then the app window shows up, and everything instantly displays as it should. So at least for me, this seems to be a Windows-only problem.
@f4n0 commented on GitHub (Jun 9, 2022):
Hi,
I have the same issue (win 10), is there any workaround?
@tonsnoei commented on GitHub (Aug 23, 2022):
It has something to do with the Chromium rendering engine. If I put a window over my blank screen it will also redraw and show content. The blank screen occurs in 50% of the cases on my computer. But...
There is a workaround!
What I do is a
browserWindow.Reload()as last step within theConfigure()method. MyConfiguremethod looks like this:@jeffdod commented on GitHub (Jan 7, 2023):
Thank you for the workaround!
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 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!