Starts in:
0 DAY
5 HRS
8 MIN
6 SEC
Starts in:
0 D
5 H
8 M
6 S
Open Closed

ABP MAUI iOS app crashes in release mode on SplashScreen #7773


User avatar
0
richard.harrison@brightserve.com created
  • ABP Framework version: v8.1.3 / 8.2.2
  • UI Type: MAUI
  • Database System: EF Core SQL Server
  • Exception message and full stack trace:n/a
  • Steps to reproduce the issue:Start release mode app on iOS

Our application crashes on the splash screen on iOS when running in release mode. The same code works fine in debug. We've tried to match the debug/release settings in the project and it still crashes. We haven't managed to get a stack trace or any indication of what the error is.

The app runs fine in DEBUG. We've tried using all of the code that is #if DEBUG

Starting with a clean ABP.IO MAUI application built with either 8.1.3 or 8.2.2 shows the same problem.

We've tried the solution in https://abp.io/support/questions/5019/72-and-71-Maui-Android-crashes-in-Release-mode-but-works-in-Debug and we still get a crash.

App also crashes when installed via testflight. We have to use dotnet command line to build the testflight app.

I've tried creating a clean MAUI app using Visual Studio (mac) and it works until I include the ABP projects and assemblies;

We've been trying to fix this since 22/8 and are in desperate need of guidance - or how to find out what the problem actually is.


8 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    maybe this is a problem with certificate.

    in debug mode, maui app will ignored certificate errors

  • User Avatar
    0
    richard.harrison@brightserve.com created

    we already tried that; in our LabMauiModule we #define DEBUG at the top

    • I checked the server logs and there isn't any evidence of a call to the API being made
    • we are using static proxies.
    • The crash is within a short period (probably less than a second of splash screen showing)

    So I don't think this is the fixed

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can run the Maui in release mode and debug it.

  • User Avatar
    0
    sean.corrigan created

    Hi,

    you can run the Maui in release mode and debug it.

    Are you able to assist with how this is possible as only able to see options within the project properties -> iOS -> Debug -> Enable Debugging, which doesn't seem to work.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can try this

    ...
    var handler = new NSUrlSessionHandler
    {
        UseCookies = false,
        TrustOverrideForUrl = (sender, url, trust) => true
    };
    ...
    

    and remove #if DEBUG

    if it's work, then it's a certificate issue

  • User Avatar
    0
    sean.corrigan created

    Hi,

    you can try this

    ... 
    var handler = new NSUrlSessionHandler 
    { 
        UseCookies = false, 
        TrustOverrideForUrl = (sender, url, trust) => true 
    }; 
    ... 
    

    and remove #if DEBUG

    if it's work, then it's a certificate issue

    Have tried this and it doesn't even hit the GetInsecureHandler().

    Error Message: Autofac.Core.DependencyResolutionException: An exception was thrown while activating Phenna.Infrastructure.Lab.Maui.Client.App. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(System.IServiceProvider)' on type 'App'. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating Phenna.Infrastructure.Lab.Maui.Client.AppShell. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Phenna.Infrastructure.Lab.Maui.Client.ViewModels.ShellViewModel)' on type 'AppShell'. ---> System.InvalidOperationException: RootViewController cannot be null

  • User Avatar
    0
    richard.harrison@brightserve.com created

    This issue still isn't resolved - can you provide guidance please.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I could not reproduce the problem.

    could you share a minimal reproducible project with me?

    shiwei.liang@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06