Open Closed

Error while opening Blazor server app after 7.2.2 upgrade #5157


User avatar
0
ccernat created

Hi, Support Team!

I upgraded the Blazor server solution to 7.2.2 and I get this error:

If I press reload, application loads OK. I log in, same error, then Reload, application loads OK.

The only difference from a standard template is that I have added the module Volo.Account.Pro, not as package.

Can you spot what could be wrong?

Also, when I published the app, folder profile, when I try to start it from the console I get:

Tks.


15 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We fixed in the next version

    Temp solution:

    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(MobileNavbar), typeof(MyMobileNavbar))]
    public class MyMobileNavbar : MobileNavbar
    {
        public MyMobileNavbar()
        {
            SelectedMenuItems = new List<MenuItemViewModel>();
        }
    }
    
  • User Avatar
    0
    ccernat created

    hi

    tks alot.

    is there any insight in the other error described when publishing the app and then running the exe?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the full error stack.

  • User Avatar
    0
    ccernat created

    hi

    [11:06:49 FTL] Host terminated unexpectedly!
    Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
     ---> System.ArgumentNullException: Value cannot be null. (Parameter 'uriString')
       at System.ArgumentNullException.Throw(String paramName)
       at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
       at System.Uri..ctor(String uriString)
       at KPImailerHella.Blazor.KPImailerHellaBlazorModule.<>c__DisplayClass0_0.<PreConfigureServices>b__3(OpenIddictServerBuilder builder) in C:\Users\catal\source\repos\Relevance-Management\KPImailerHella\src\KPImailerHella.Blazor\KPImailerHellaBlazorModule.cs:line 135
       at Volo.Abp.Options.PreConfigureActionList`1.Configure(TOptions options)
       at Microsoft.Extensions.DependencyInjection.ServiceCollectionPreConfigureExtensions.ExecutePreConfiguredActions[TOptions](IServiceCollection services, TOptions options)
       at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.&lt;&gt;c__DisplayClass1_0.&lt;AddOpenIddictServer&gt;b__0(OpenIddictServerBuilder builder)
       at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
       at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
       at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
       at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
       at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
       --- End of inner exception stack trace ---
       at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
       at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
       at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
       at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please also share the code of KPImailerHellaBlazorModule.cs and your appsettings.json.

    It seems there is a configuration problem.

  • User Avatar
    0
    ccernat created

    Hi,

    It seems that the template for Blazor Server doesn't put the Authority app setting in the AuthServer sections of the appsettings.json.

    I think you need to modify the generated code by ABP Suite.

    Tks.

    For me, problem solved, I added manually that setting.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    It seems that the template for Blazor Server doesn't put the Authority app setting in the AuthServer sections of the appsettings.json.

    Thanks for reporting, I will check it.

  • User Avatar
    0
    john@johnfuqua.com created

    Hi,

    It seems that the template for Blazor Server doesn't put the Authority app setting in the AuthServer sections of the appsettings.json.

    I think you need to modify the generated code by ABP Suite.

    Tks.

    For me, problem solved, I added manually that setting.

    "AuthServer": { "RequireHttpsMetadata": "true", "Authority": "https://localhost:44378" },

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks @john

  • User Avatar
    0
    alper created
    Support Team Director

    I reopened the ticket

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi, Support Team!

    I upgraded the Blazor server solution to 7.2.2 and I get this error:

    If I press reload, application loads OK. I log in, same error, then Reload, application loads OK.

    The only difference from a standard template is that I have added the module Volo.Account.Pro, not as package.

    Can you spot what could be wrong?

    Also, when I published the app, folder profile, when I try to start it from the console I get:

    Tks.

    Can you tell me the LeptonX version in .csproj file?

    It should be2.3.x. Currently, 2.3.0-rc.1 version is released.

  • User Avatar
    0
    byersjus created

    You're correct, LeptonX is still at 2.2.1, and I receive the message below during abp update:

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    You can use this wildcard pattern to receive any preview or stable future leptonx 2.3 updates: 2.3.*-*

  • User Avatar
    0
    byersjus created

    That fixed it. I'm on 2.3.0-rc.1 now and no need to reload. Thanks.

  • User Avatar
    0
    alper created
    Support Team Director

    closing the issue...

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11