newrelic / newrelic-xamarin-plugin

Xamarin plugin to implement New Relic Mobile agents for Android and iOS
Apache License 2.0
1 stars 2 forks source link

Crash when navigating to certain pages #26

Open follesoe opened 4 months ago

follesoe commented 4 months ago

Description

See this support ticket that has not been followed up since November 2023: https://forum.newrelic.com/s/hubtopic/aAX8W000000L5NQWA0/crash-in-xamarinforms-project-when-navigate-to-page-with-collectionview

Steps to Reproduce

Expected Behavior

Relevant Logs / Console output

Your Environment

Additional context

ndesai-newrelic commented 4 months ago

@follesoe is it happening on android or ios? can you please add more details?

follesoe commented 4 months ago

One guess could be that some of the instrumentation/hooks onto HTTP clients or other areas, in combination with the Google Maps SDK, is triggering the crash.

The configuration I am using looks like this:

/// <summary>
/// Starts the New Relic agent using the correct token and configuration for the platform in use.
/// </summary>
/// <param name="clientManager">The <see cref="CrossNewRelicClient.Current"/> client manager.</param>
public static void Start(this INewRelicClientManager clientManager)
{
    var config = new AgentStartConfiguration
    {
        crashReportingEnabled = true,
        offlineStorageEnabled = true,
        networkRequestEnabled = false,
        networkErrorRequestEnabled = false,
        webViewInstrumentation = false,
        loggingEnabled = true,
        logLevel = LogLevel.VERBOSE,
        interactionTracingEnabled = false
    };

    clientManager.NetworkRequestEnabled(false);
    clientManager.NetworkErrorRequestEnabled(false);
    clientManager.HttpResponseBodyCaptureEnabled(false);
    clientManager.HandleUncaughtException();
    clientManager.SetMaxOfflineStorageSize(MaxOfflineStorageInMb);
    clientManager.Start(applicationToken: GetToken(), config);
}
follesoe commented 4 months ago

The crash is logged in New Relic (if there is a way I could give you access): https://one.newrelic.com/nr1-core/crash-analysis/home/NDQyODYxMXxNT0JJTEV8QVBQTElDQVRJT058MTEyMDI5NTM5MA?account=4428611&duration=1800000&filters=%28domain%3D%27MOBILE%27%20AND%20type%3D%27APPLICATION%27%29&state=bcc740ef-1f4d-b801-0aae-280bb00572c9

ndesai-newrelic commented 4 months ago

@follesoe can you share permalink for crash?

follesoe commented 4 months ago

@ndesai-newrelic https://onenr.io/0PwJmKGykQ7

follesoe commented 4 months ago

@ndesai-newrelic Have you had a chance to look into this? It's a show stopper for our New Relic adoption.

ndesai-newrelic commented 4 months ago

@follesoe I am not getting any information from the stack-trace, can you share stack-trace where it shows relevant information regarding crash?

follesoe commented 4 months ago

There is no stack trace, as it happens on a separate thread than mine. The app just segfaults. But have you tried to look at the app with the reproduction example in the Forum thread?

follesoe commented 3 months ago

The error happens on a view using the Google Maps SDK. Don't know if it is relevant. Could also be due to HTTP instrumentation (as allot of requests will occur to download tiles), even though I have turned this off.

Also; the forum thread has a repro of a case where the New Relic Xamarin integration just crash the app.

For now, I am looking for alternatives to New Relic as this is a show-stopper (the crash reporting crashing the app).