Blank Page with Blazor (ASP.NET Core hosted) Preview 6 #348

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

Originally created by @MaherJendoubi on GitHub (Jun 16, 2019).

  • Version: 5.22.12

dotnet --version
3.0.100-preview6-012264

  • Target: win-x64

Steps to Reproduce:

  1. Created a vanilla Blazor (ASP.NET Core hosted)
  2. Added ElectronNET.API to the Server project
  3. Setup Electron.NET stuff as described here https://maherjendoubi.io/blazor-electron/
  4. electonize init
  5. electronize start

The result is the following:

image

Originally created by @MaherJendoubi on GitHub (Jun 16, 2019). <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: 5.22.12 dotnet --version 3.0.100-preview6-012264 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> <!-- What target are you building for? --> * **Target**: win-x64 <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. Created a vanilla Blazor (ASP.NET Core hosted) 2. Added ElectronNET.API to the Server project 3. Setup Electron.NET stuff as described here https://maherjendoubi.io/blazor-electron/ 4. electonize init 5. electronize start The result is the following: ![image](https://user-images.githubusercontent.com/1798510/59561991-f714c000-9026-11e9-8200-c5849be60d75.png)
claunia added the bug label 2026-01-29 16:37:04 +00:00
Author
Owner

@MaherJendoubi commented on GitHub (Jun 17, 2019):

electronize start
Start Electron Desktop Application...
Microsoft Windows [version 10.0.18362.175]
(c) 2019 Microsoft Corporation. Tous droits réservés.
C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server>dotnet publish -r win-x64 --output "C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\bin"
Microsoft (R) Build Engine version 16.2.0-preview-19278-01+d635043bd pour .NET Core
Copyright (C) Microsoft Corporation. Tous droits réservés.
Restauration effectuée dans 19,34 ms pour C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Client\WebApplication20.Client.csproj.
Restauration effectuée dans 19,21 ms pour C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Shared\WebApplication20.Shared.csproj.
Restauration effectuée dans 23,89 ms pour C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\WebApplication20.Server.csproj.
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(158,5): message : NETSDK1057 : Vous utilisez une préversion de .NET Core. Voir : https://aka.ms/dotnet-core-preview [C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\WebApplication20.Server.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(158,5): message : NETSDK1057 : Vous utilisez une préversion de .NET Core. Voir : https://aka.ms/dotnet-core-preview [C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Shared\WebApplication20.Shared.csproj]
WebApplication20.Shared -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Shared\bin\Debug\netstandard2.0\WebApplication20.Shared.dll
WebApplication20.Client -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Client\bin\Debug\netstandard2.0\WebApplication20.Client.dll
Blazor Build result -> 33 files in C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Client\bin\Debug\netstandard2.0\dist
WebApplication20.Server -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\bin\Debug\netcoreapp3.0\win-x64\WebApplication20.Server.dll
WebApplication20.Server -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\bin
C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server>
Skip npm install, because node_modules directory exists in: C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules
Invoke electron.cmd - in dir: C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules.bin
Microsoft Windows [version 10.0.18362.175]
(c) 2019 Microsoft Corporation. Tous droits réservés.
C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules.bin>electron.cmd "....\main.js"
stdout: Use Electron Port: 8000
stdout: info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\Maher\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
ASP.NET Core Application connected... global.electronsocket GLstc8UetcSP0PiFAAAA 2019-06-17T22:08:12.520Z
stdout: Hosting environment: Production
Content root path: C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\bin
Now listening on: http://localhost:8001
Application started. Press Ctrl+C to shut down.
stdout: BridgeConnector connected!
stdout: info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://localhost:8001/
stdout: info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'Fallback {*path:nonfile}'
stdout: info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'Fallback {*path:nonfile}'
stdout: info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 29.200300000000002ms 404
C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules.bin>

@MaherJendoubi commented on GitHub (Jun 17, 2019): **electronize start** Start Electron Desktop Application... Microsoft Windows [version 10.0.18362.175] (c) 2019 Microsoft Corporation. Tous droits réservés. C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server>dotnet publish -r win-x64 --output "C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\bin" Microsoft (R) Build Engine version 16.2.0-preview-19278-01+d635043bd pour .NET Core Copyright (C) Microsoft Corporation. Tous droits réservés. Restauration effectuée dans 19,34 ms pour C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Client\WebApplication20.Client.csproj. Restauration effectuée dans 19,21 ms pour C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Shared\WebApplication20.Shared.csproj. Restauration effectuée dans 23,89 ms pour C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\WebApplication20.Server.csproj. C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(158,5): message : NETSDK1057 : Vous utilisez une préversion de .NET Core. Voir : https://aka.ms/dotnet-core-preview [C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\WebApplication20.Server.csproj] C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(158,5): message : NETSDK1057 : Vous utilisez une préversion de .NET Core. Voir : https://aka.ms/dotnet-core-preview [C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Shared\WebApplication20.Shared.csproj] WebApplication20.Shared -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Shared\bin\Debug\netstandard2.0\WebApplication20.Shared.dll WebApplication20.Client -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Client\bin\Debug\netstandard2.0\WebApplication20.Client.dll Blazor Build result -> 33 files in C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Client\bin\Debug\netstandard2.0\dist WebApplication20.Server -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\bin\Debug\netcoreapp3.0\win-x64\WebApplication20.Server.dll WebApplication20.Server -> C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\bin\ C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server> Skip npm install, because node_modules directory exists in: C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules Invoke electron.cmd - in dir: C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules\.bin Microsoft Windows [version 10.0.18362.175] (c) 2019 Microsoft Corporation. Tous droits réservés. C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules\.bin>electron.cmd "..\..\main.js" stdout: Use Electron Port: 8000 stdout: info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] User profile is available. Using 'C:\Users\Maher\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. ASP.NET Core Application connected... global.electronsocket GLstc8UetcSP0PiFAAAA 2019-06-17T22:08:12.520Z stdout: Hosting environment: Production Content root path: C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\bin\ Now listening on: http://localhost:8001 Application started. Press Ctrl+C to shut down. stdout: BridgeConnector connected! stdout: info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:8001/ stdout: info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0] Executing endpoint 'Fallback {*path:nonfile}' stdout: info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1] Executed endpoint 'Fallback {*path:nonfile}' stdout: info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished in 29.200300000000002ms 404 C:\Users\Maher\source\repos\WebApplication20\WebApplication20.Server\obj\Host\node_modules\.bin>
Author
Owner

@robertmclaws commented on GitHub (Jul 6, 2019):

Any luck with this yet?

@robertmclaws commented on GitHub (Jul 6, 2019): Any luck with this yet?
Author
Owner

@robertmclaws commented on GitHub (Jul 7, 2019):

I spent a few hours yesterday digging into this issue, and I figured it out. It really has nothing to do with Electron.NET, and everything to do with the changes they made to the Endpoint Routing. With the Preview 6 changes, not all of the files were exposed to the Host, and the ones that were weren't in the right spot.

After a few hours of testing, I was able to get everything working and into a NuGet package that could handle the changes. I didn't make a PR here yet because it requires VS2019, and I didn't want to force that upgrade on the project without asking. So for now, it's in my own repo.

If you get a chance, please test it out (instructions are on the repo home page) and let me know if it works for you. Then we can discuss if it needs to move.

Thanks!

@robertmclaws commented on GitHub (Jul 7, 2019): I spent a few hours yesterday digging into this issue, and I figured it out. It really has nothing to do with Electron.NET, and everything to do with the changes they made to the Endpoint Routing. With the Preview 6 changes, not all of the files were exposed to the Host, and the ones that were weren't in the right spot. After a few hours of testing, I was able to get everything working and into [a NuGet package](https://github.com/CloudNimble/ElectronNET.Blazor) that could handle the changes. I didn't make a PR here yet because it requires VS2019, and I didn't want to force that upgrade on the project without asking. So for now, [it's in my own repo](https://github.com/CloudNimble/ElectronNET.Blazor). If you get a chance, please test it out (instructions are on the repo home page) and let me know if it works for you. Then we can discuss if it needs to move. Thanks!
Author
Owner

@MaherJendoubi commented on GitHub (Jul 7, 2019):

@robertmclaws I really appreciate your great effort digging into this issue.
It works like a charm !

image

Thanks !

@MaherJendoubi commented on GitHub (Jul 7, 2019): @robertmclaws I really appreciate your great effort digging into this issue. It works like a charm ! ![image](https://user-images.githubusercontent.com/1798510/60771398-ee744e80-a0e7-11e9-99ce-9ccf9c13f76d.png) Thanks !
Author
Owner

@robertmclaws commented on GitHub (Jul 7, 2019):

Since this was not an Electron.NE issue, but an ASP.NET Core routing issue, you can feel free to close this bug.

@robertmclaws commented on GitHub (Jul 7, 2019): Since this was not an Electron.NE issue, but an ASP.NET Core routing issue, you can feel free to close this bug.
Author
Owner

@GregorBiswanger commented on GitHub (Jul 8, 2019):

@robertmclaws Thank you very much for your support!

The native Blazor support in Electron.NET is important to us. Can you please submit your PR.

@GregorBiswanger commented on GitHub (Jul 8, 2019): @robertmclaws Thank you very much for your support! The native Blazor support in Electron.NET is important to us. Can you please submit your PR.
Author
Owner

@ThuCommix commented on GitHub (Jul 8, 2019):

Nice work @robertmclaws, it would be cool if this would be in the standard extensions provided by electron.net.

@ThuCommix commented on GitHub (Jul 8, 2019): Nice work @robertmclaws, it would be cool if this would be in the standard extensions provided by electron.net.
Author
Owner

@MaherJendoubi commented on GitHub (Jul 29, 2019):

Excuse my ignorance but I cannot see the pull request fixing this issue.

@MaherJendoubi commented on GitHub (Jul 29, 2019): Excuse my ignorance but I cannot see the pull request fixing this issue.
Author
Owner

@robertmclaws commented on GitHub (Jul 29, 2019):

That's because one is no longer required. Either Microsoft or this team fixed the issue, and the package is no longer necessary. I've updated ElectronNET.Blazor for Preview 7 to restore the original behavior without breaking anyone who already installed it. I'm not recommending anyone remove it yet, in case something breaks between now and Blazor RTM, but I'll put a note in the readme.txt file when it's safe to uninstall the package.

@robertmclaws commented on GitHub (Jul 29, 2019): That's because one is no longer required. Either Microsoft or this team fixed the issue, and the package is no longer necessary. I've updated ElectronNET.Blazor for Preview 7 to restore the original behavior without breaking anyone who already installed it. I'm not recommending anyone remove it yet, in case something breaks between now and Blazor RTM, but I'll put a note in the readme.txt file when it's safe to uninstall the package.
Author
Owner

@MaherJendoubi commented on GitHub (Jul 29, 2019):

@robertmclaws Thank you for the answer.

@MaherJendoubi commented on GitHub (Jul 29, 2019): @robertmclaws Thank you for the answer.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#348