Activities of "aziz.bouhejba"

Thanks a lot

Hi, thanks I tried it, gave me this error System.PlatformNotSupportedException: Algorithm 'Aes' is not supported on this platform.

I guess I'll just have to put it in the clear? :/

So we need to expose the Blazorise product token there's no other way?

Hi thanks, we ended up waiting for internet connection to come back, it's definitely killed by some Samsung devices when battery is optimized so the ABP apps crashes for them because of the network dependency. This was our solution

using Microsoft.Extensions.Configuration;
using Volo.Abp;

namespace SampleProject.MauiBlazor;

public partial class App : Application
{
    private readonly IServiceProvider serviceProvider;
    private Page? rootPage;

    public App(IServiceProvider serviceProvider)
    {
        InitializeComponent();
        this.serviceProvider = serviceProvider;
        UserAppTheme = AppTheme.Light;
    }

    protected override Window CreateWindow(IActivationState? activationState)
    {
        rootPage = new MainPage();

        var window = new Window(rootPage);

        // Initialize asynchronously without blocking
        _ = Task.Run(async () =>
        {
            try
            {
                await WaitForNetworkConnectivityAsync();
                serviceProvider.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().Initialize(serviceProvider);

                // Switch to main page on UI thread
                MainThread.BeginInvokeOnMainThread(() =>
                {
                    window.Page = new MainPage();
                });
            }
            catch (Exception ex)
            {
                rootPage = new MainPage();
            }
        });

        return window;
    }

    private static async Task WaitForNetworkConnectivityAsync()
    {
        var connectivity = Connectivity.Current;
        var maxRetries = 30; // 30 seconds max wait
        var retryCount = 0;

        while (retryCount < maxRetries)
        {
            if (connectivity.NetworkAccess == NetworkAccess.Internet)
            {
                if (await CanReachApiAsync())
                {
                    return;
                }
            }

            await Task.Delay(1000); // Wait 1 second
            retryCount++;
        }

        // Log warning or show user message about connectivity issues
        System.Diagnostics.Debug.WriteLine("Network connectivity timeout");
    }

    private static async Task<bool> CanReachApiAsync()
    {
        try
        {
            using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
            var response = await client.GetAsync("https://google.com");
            return response.IsSuccessStatusCode;
        }
        catch
        {
            return false;
        }
    }
}

I would recommend having something like this in the template because all Samsung devices will fail with an ABP template. we struggled with this issue for months because not everyone was able to reproduce it. 😬

Thanks again have a good day

Tried all of these solutions, the only one we didn't try is // Show offline message or use cached data

Thank you for the quick answer, very appreciated. so it could still be possible to inject tenant style through other things than layout hooks. Like javascript injection. Have a good day

Hello! sorry I'm reopening this only because I have the exact same issue with the mobile app Maui Blazor hybrid.

We use Leptonx theme side menu

using Volo.Abp.AspNetCore.Components.MauiBlazor.LeptonXTheme;

and exact same

Configure<AbpLayoutHookOptions>(options =>
        {
            options.Add(
                LayoutHooks.Head.Last,
                typeof(StyleHook)
            );
        });

I tried adding this in App.razor

<LayoutHook Name="@LayoutHooks.Head.Last" Layout="@StandardLayouts.Application" />

Thank you!

Thanks it works! we thought it would work out of the box with leptonx theme side menu

hey do you want me to send you the template again?

or the repro steps are

Add this component

And register it like this in both Server and Wasm projects

Thank you!

I emailed you the whole project source code at liming.ma@volosoft.com 3 days ago

it's also very easy to reproduce.. 2 files to change

Showing 1 to 10 of 25 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33