Search code examples
xamarin.formsmobile-centervisual-studio-app-center

Xamarin, MobileCenter and an app doesn't start for no reason (apparently)


I'm writing this post because I don't know what I can do.

I'm developing an big app for iOS with a lot of users for my company; to log error and crashes I'm using Microsoft MobileCenter (Analytics and Crashed ver. 0.6), Xamarin.Forms ver. 2.3.3.168 and a lot of components such as Xam.Plugins, SQLite, PCLStorage, SharpZipLib.

As MobileCenter request the minimum target version for the app is 8.

Apart from minor bugs, the big problem is difficult to explain. I'm trying to ask you an advice.

The app is working fine. If I test it, I can't have any problems. At same point the app crashed for any apparently reason. No logs, no crashed, no nothing in MobileCenter. From this moment it's impossible to start the app and I can't have any logs about it: I can see the splash screen but after than the app is crashed again. It seems the problem raises after taking photo with camera.

When the app starts, it deletes images (if there are any in the folder), send a file to my server, and check with CrossDeviceInfo what the OS version is. Then the first page is called.

I tried to understand the problem to read the log in Xcode after connecting my device to my iMac but it's incomprehensible.

XCode devices

If I try to read the View Device Logs I can find one crash for my app but the log is still incomprehensible for me.

View Device Log

Then from Xcode I tried to open Organizer and under Crashes...

Organizer

If I connect the device with this issue to my iMac and I deploy the app on it, the app is working fine. How can I understand where the problem is to fix it?

Update

In my App.xaml.cs I initialise MobileCenter like the following code:

public partial class App : Application
{
    public App() {
        // my code
    }

    protected override void OnStart()
    {
        MobileCenter.LogLevel = LogLevel.Verbose;
        MobileCenter.Start(typeof(Analytics), typeof(Crashes));
    }
}

Solution

  • It's Benjamin. I've already replied to you issues in our intercom but I wanted to reply to your issue here.

    This scenario is not an actual crash but a kill of the app process by the operation system. The SDK runs as part of the app process and therefor can’t ever figure out that this kill even happened because the process is fully removed right away. Technically this is not a crash from an SDK perspective that it can detect and provide details for. Every single 3rd party SDK has this limitation and there is no way around it as Apple doesn’t provide the technical possibilities to do so.

    In addition, none of your provided crash reports contain any reference to Mobile Center thus I can rule out our SDK is the cause of the kill.

    I hope you find the cause for the issue.🖖