Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.NetCore 3.x] [.Net 5 RTM] Single File for OpenMU target 3.1 app, launch failed #42570

Closed
jiangzeng01 opened this issue Sep 22, 2020 · 6 comments
Assignees
Milestone

Comments

@jiangzeng01
Copy link
Contributor

jiangzeng01 commented Sep 22, 2020

Application Name: OpenMU
OS: Windows 10 RS5
CPU: X64
.NET Build Number: 5.0.100-rc.2.20471.7
App Location: \appcompatsrv\Appcompat\DotNetCore\AppSource\SingleFileP0AppsTarget5\Apps\OpenMU-3.1
App Source: \appcompatsrv\Appcompat\DotNetCore\AppSource\SingleFileP0AppsTarget5\AppSources\OpenMU-3.1
DevDiv bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1217878

Repro steps:
Build with default 3.x
Single File exe was created by
dotnet publish MUnique.OpenMU.Startup.csproj -r win-x64 -p:PublishSingleFile=true --self-contained true
using 5.0.100-rc.2.20471.7 SDK

Copy '\appcompatsrv\Appcompat\DotNetCore\AppSource\SingleFileP0AppsTarget5\Apps\OpenMU-3.1' to local machine.
Double-click on MUnique.OpenMU.Startup.exe
Access "localhost:1234/admin"

Expected Result:
Open OpenMU app, "localhost:1234/admin" page will be open successful.

Actual Result:
The "localhost:1234/admin" page unable to be opened and get exception.

Findings:
The Framework-Dependency and Self-contained app can be launched. But the Single file unable to launch.
Checked Event view, there is no errors in Event View.

Exception from command window:

21797 [1] DEBUG Microsoft.AspNetCore.Hosting.Diagnostics (null) - Hosting starting
22132 [1] DEBUG Microsoft.AspNetCore.SignalR.Internal.DefaultHubProtocolResolver (null) - Registered SignalR Protocol: json, implemented by Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.
22594 [1] INFO Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager (null) - User profile is available. Using 'C:\Users\appcompat\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
22605 [1] DEBUG Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository (null) - Reading data from file 'C:\Users\appcompat\AppData\Local\ASP.NET\DataProtection-Keys\key-030abbaa-d964-428b-a8bb-c3d2dfad120f.xml'.
22635 [1] DEBUG Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository (null) - Reading data from file 'C:\Users\appcompat\AppData\Local\ASP.NET\DataProtection-Keys\key-3e574b2f-9f85-42d5-8f7e-c8146cbf85c9.xml'.
22655 [1] DEBUG Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository (null) - Reading data from file 'C:\Users\appcompat\AppData\Local\ASP.NET\DataProtection-Keys\key-58d9fd3c-a653-4837-9fa8-0bcedbe6e183.xml'.
22677 [1] DEBUG Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager (null) - Found key {030abbaa-d964-428b-a8bb-c3d2dfad120f}.
22679 [1] DEBUG Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager (null) - Found key {3e574b2f-9f85-42d5-8f7e-c8146cbf85c9}.
22680 [1] DEBUG Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager (null) - Found key {58d9fd3c-a653-4837-9fa8-0bcedbe6e183}.
22697 [1] DEBUG Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver (null) - Considering key {3e574b2f-9f85-42d5-8f7e-c8146cbf85c9} with expiration date 2020-12-15 09:25:13Z as default key.
22712 [1] DEBUG Microsoft.AspNetCore.DataProtection.TypeForwardingActivator (null) - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=3.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60
22719 [1] DEBUG Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor (null) - Decrypting secret element using Windows DPAPI.
22720 [1] DEBUG Microsoft.AspNetCore.DataProtection.TypeForwardingActivator (null) - Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=3.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60
22728 [1] DEBUG Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.CngCbcAuthenticatedEncryptorFactory (null) - Opening CNG algorithm 'AES' from provider '(null)' with chaining mode CBC.
22742 [1] DEBUG Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.CngCbcAuthenticatedEncryptorFactory (null) - Opening CNG algorithm 'SHA256' from provider '(null)' with HMAC.
22751 [1] DEBUG Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider (null) - Using key {3e574b2f-9f85-42d5-8f7e-c8146cbf85c9} as the default key.
22752 [1] DEBUG Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService (null) - Key ring with default key {3e574b2f-9f85-42d5-8f7e-c8146cbf85c9} was loaded during application startup.
22758 [1] DEBUG Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer (null) - Failed to locate the development https certificate at '(null)'.
22786 [1] DEBUG Microsoft.AspNetCore.Hosting.Diagnostics (null) - Hosting started
22787 [1] DEBUG Microsoft.AspNetCore.Hosting.Diagnostics (null) - Loaded hosting startup assembly MUnique.OpenMU.AdminPanel

   at MultiRPC.App.Main()

Exception from accessing webpage:

49486 [4] ERROR Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor (null) - The view 'Index' was not found. Searched locations: /Views/Home/Index.cshtml, /Views/Shared/Index.cshtml, /Pages/Shared/Index.cshtml
49498 [4] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker (null) - Executed action MUnique.OpenMU.AdminPanel.Controllers.HomeController.Index (MUnique.OpenMU.AdminPanel) in 20.7192ms
49498 [4] INFO Microsoft.AspNetCore.Routing.EndpointMiddleware (null) - Executed endpoint 'MUnique.OpenMU.AdminPanel.Controllers.HomeController.Index (MUnique.OpenMU.AdminPanel)'
49499 [4] ERROR Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware (null) - An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The view 'Index' was not found. The following locations were searched:
/Views/Home/Index.cshtml
/Views/Shared/Index.cshtml
/Pages/Shared/Index.cshtml
   at Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult.EnsureSuccessful(IEnumerable`1 originalLocations)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultEx
ecutor.ExecuteAsync(ActionContext context, ViewResult result)
   at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Unknown command

cc @dotnet-actwx-bot

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 22, 2020
@ghost
Copy link

ghost commented Sep 22, 2020

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@agocke agocke removed the untriaged New issue has not been triaged by the area owner label Sep 28, 2020
@agocke agocke added this to the 5.0.0 milestone Sep 28, 2020
@agocke
Copy link
Member

agocke commented Sep 28, 2020

Should be fixed by #42352

@agocke
Copy link
Member

agocke commented Oct 5, 2020

Fixed in #42352

@agocke agocke closed this as completed Oct 5, 2020
@jiangzeng01
Copy link
Contributor Author

@agocke This is a .NetCore 3.x issue, the target is default 3.x, but we publish with .NET 5 RC2.
Will the issue be fixed by #42352?
We verified with both RC2 build: 5.0.100-rc.2.20480.7 and RTM build:5.0.100-rtm.20508.1, the issue is still happening with the same error log.

@jiangzeng01
Copy link
Contributor Author

@agocke We verified the app with RTM build:5.0.100-rtm.20508.12, the issue is still happening even if we publish singlefile with -p:IncludeAllContentForSelfExtract=true.

As #42665 has been fixed, after retarget 5.0, the app is also failing with the same error with target 3.1. So this bug is for both .NetCore 3.1 & .Net 5 RTM.

@jiangzeng01 jiangzeng01 reopened this Oct 10, 2020
@jiangzeng01 jiangzeng01 changed the title [.NetCore 3.x] Single File for OpenMU target 3.1 app, launch failed [.NetCore 3.x] [.Net 5 RTM] Single File for OpenMU target 3.1 app, launch failed Oct 10, 2020
@agocke agocke modified the milestones: 5.0.0, 6.0.0 Oct 10, 2020
@Junjun-zhao
Copy link
Member

Verified with dotnet-sdk-5.0.204-win-x64, this issue has been fixed, hence closing it.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants