Content After Splash Screen Is Blank Until Click #714

Closed
opened 2026-01-29 16:46:34 +00:00 by claunia · 10 comments
Owner

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:

  1. Create Blazor (may not have to be Blazor) application with electron.
  2. Add splash screen to electron.manifest.json
  3. Run the electron app. Do not interact with the computer (i.e. mouse, keyboard) while the app is starting.
  4. Verify the splash screen shows.
  5. Verify a blank screen shows after the splash screen is hidden.
  6. Click around inside and outside of the electron window. Verify the blank screen goes away.

Note: this issue occurs sporadically, so it may take a few tries to reproduce.

After splash screen, before click:
image

After splash screen, after click:

image

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) <!-- What target are you building for? --> Blazor Application Using net5.0 Target Framework <!-- Enter your issue details below this comment. --> 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. <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. Create Blazor (may not have to be Blazor) application with electron. 2. Add splash screen to electron.manifest.json 3. Run the electron app. Do not interact with the computer (i.e. mouse, keyboard) while the app is starting. 4. Verify the splash screen shows. 5. Verify a blank screen shows after the splash screen is hidden. 6. Click around inside and outside of the electron window. Verify the blank screen goes away. Note: this issue occurs sporadically, so it may take a few tries to reproduce. After splash screen, before click: ![image](https://user-images.githubusercontent.com/92471433/137197927-963f1cd5-6b03-400b-b549-a3abfb0e433c.png) After splash screen, after click: ![image](https://user-images.githubusercontent.com/92471433/137197956-4522bc4d-2cd9-4840-a671-bdd4e963d76e.png)
claunia added the bug label 2026-01-29 16:46:34 +00:00
Author
Owner

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

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

@pvenky commented on GitHub (Nov 13, 2021):

We are also seeing this problem sporadically. I've tried with a frameless window and a TitleBarStyle.hidden and 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?

@pvenky commented on GitHub (Nov 13, 2021): We are also seeing this problem sporadically. I've tried with a frameless window and a `TitleBarStyle.hidden` and 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?
Author
Owner

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

        public async void Electronize()
        {
            var electronOptions = new BrowserWindowOptions { AutoHideMenuBar = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024, Icon = "GreekVocabBuilder.ico" };
            var mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { AutoHideMenuBar = true, EnableLargerThanScreen = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024 });
            mainWindow.OnReadyToShow += () => mainWindow.Show();
        }


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 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. ``` public async void Electronize() { var electronOptions = new BrowserWindowOptions { AutoHideMenuBar = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024, Icon = "GreekVocabBuilder.ico" }; var mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { AutoHideMenuBar = true, EnableLargerThanScreen = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024 }); mainWindow.OnReadyToShow += () => mainWindow.Show(); } ``` 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.
Author
Owner

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

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.

    public async void Electronize()
    {
        var electronOptions = new BrowserWindowOptions { AutoHideMenuBar = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024, Icon = "GreekVocabBuilder.ico" };
        var mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { AutoHideMenuBar = true, EnableLargerThanScreen = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024 });
        mainWindow.OnReadyToShow += () => mainWindow.Show();
    }

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.

How have you configured to place a custom .ico? What path does this icon
configuration point to?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ElectronNET/Electron.NET/issues/615#issuecomment-980645442,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA6APALVEOCR7QI3B5LKONDUOD4C5ANCNFSM5F55O5YA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@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: > 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. > > public async void Electronize() > { > var electronOptions = new BrowserWindowOptions { AutoHideMenuBar = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024, Icon = "GreekVocabBuilder.ico" }; > var mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { AutoHideMenuBar = true, EnableLargerThanScreen = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024 }); > mainWindow.OnReadyToShow += () => mainWindow.Show(); > } > > 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. > > How have you configured to place a custom .ico? What path does this icon > configuration point to? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/ElectronNET/Electron.NET/issues/615#issuecomment-980645442>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AA6APALVEOCR7QI3B5LKONDUOD4C5ANCNFSM5F55O5YA> > . > Triage notifications on the go with GitHub Mobile for iOS > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > >
Author
Owner

@ggomarighetti 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: 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. public async void Electronize() { var electronOptions = new BrowserWindowOptions { AutoHideMenuBar = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024, Icon = "GreekVocabBuilder.ico" }; var mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { AutoHideMenuBar = true, EnableLargerThanScreen = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024 }); mainWindow.OnReadyToShow += () => mainWindow.Show(); } 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. How have you configured to place a custom .ico? What path does this icon configuration point to? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#615 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6APALVEOCR7QI3B5LKONDUOD4C5ANCNFSM5F55O5YA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Thank you Jeff, sorry for delete the previous issue.

@ggomarighetti 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: 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. public async void Electronize() { var electronOptions = new BrowserWindowOptions { AutoHideMenuBar = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024, Icon = "GreekVocabBuilder.ico" }; var mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { AutoHideMenuBar = true, EnableLargerThanScreen = true, Width = 1024, Height = 1024, MinWidth = 1024, MinHeight = 1024 }); mainWindow.OnReadyToShow += () => mainWindow.Show(); } 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. How have you configured to place a custom .ico? What path does this icon configuration point to? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <[#615 (comment)](https://github.com/ElectronNET/Electron.NET/issues/615#issuecomment-980645442)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA6APALVEOCR7QI3B5LKONDUOD4C5ANCNFSM5F55O5YA> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. Thank you Jeff, sorry for delete the previous issue.
Author
Owner

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

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

@f4n0 commented on GitHub (Jun 9, 2022):

Hi,
I have the same issue (win 10), is there any workaround?

@f4n0 commented on GitHub (Jun 9, 2022): Hi, I have the same issue (win 10), is there any workaround?
Author
Owner

@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 the Configure() method. My Configure method looks like this:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 
{
    ...
  Task.Run(async () =>
  {
      Electron.Menu.SetApplicationMenu(GetElectronNetMenu());
      var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions() { Show = false });
      browserWindow.Show();
      browserWindow.Maximize();
      browserWindow.Reload(); // Prevents showing a white screen (sometimes)
  });
@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 the `Configure()` method. My `Configure` method looks like this: ```csharp public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { ... Task.Run(async () => { Electron.Menu.SetApplicationMenu(GetElectronNetMenu()); var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions() { Show = false }); browserWindow.Show(); browserWindow.Maximize(); browserWindow.Reload(); // Prevents showing a white screen (sometimes) }); ```
Author
Owner

@jeffdod commented on GitHub (Jan 7, 2023):

Thank you for the workaround!

@jeffdod commented on GitHub (Jan 7, 2023): Thank you for the workaround!
Author
Owner

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

@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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#714