Closed MFazio23 closed 5 days ago
We upgraded the NR agent to the latest version when we upgraded RN to 0.74.5 in our React Native app a couple of days ago. Since then, we have experienced numerous crashes. Fortunately, this was only in the internal beta.
This is not the first time we’ve had issues with this SDK. Considering how common these use cases are, I can’t believe how the team releases the SDK. They probably don’t test it properly. If they did, they wouldn’t miss these bugs. To be honest, I have lost confidence in this SDK and have decided to disable it for now. I’m sorry to say that the quality of this SDK is very low, and I didn’t expect such a poor-quality product from New Relic. Either the team needs to step up their game or hand it over to a more capable team within the company. We are paying top dollar to New Relic.
Fatal Exception: java.lang.NoSuchMethodError: No virtual method stop()Z in class Lcom/newrelic/agent/android/ndk/AgentNDK; or its super classes (declaration of 'com.newrelic.agent.android.ndk.AgentNDK' appears in /data/app/~~UXfp2ZvKcxmNz4l0MYNIOg==/com.originmobileapp-et4-xbWwrBKQebcKoc_EfQ==/base.apk!classes5.dex) at com.newrelic.agent.android.ndk.NativeReporting.stop(NativeReporting.java:108) at com.newrelic.agent.android.ndk.NativeReporting.shutdown(NativeReporting.java:53) at com.newrelic.agent.android.AndroidAgentImpl.stop(AndroidAgentImpl.java:589) at com.newrelic.agent.android.AndroidAgentImpl.stop(AndroidAgentImpl.java:521) at com.newrelic.agent.android.AndroidAgentImpl.applicationBackgrounded(AndroidAgentImpl.java:681) at com.newrelic.agent.android.background.ApplicationStateMonitor.notifyApplicationInBackground(ApplicationStateMonitor.java:102) at com.newrelic.agent.android.background.ApplicationStateMonitor.lambda$uiHidden$0$com-newrelic-agent-android-background-ApplicationStateMonitor(ApplicationStateMonitor.java:63) at com.newrelic.agent.android.background.ApplicationStateMonitor$$ExternalSyntheticLambda0.run(:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)
@ladp333 - yep, that's a different issue we've seen as well. The discussion for that crash is happening here: https://github.com/newrelic/newrelic-react-native-agent/issues/183
@MFazio23 Yeh I know. Apols, I was so frustrated with this sdk so I didn'i care about putting my comment in the right thread . I just dumped my frustration -:)
when trasition my application the foreground to background very fast many times the crash happens
https://github.com/user-attachments/assets/4f3e9d75-5c79-4c0d-b829-9e6050603fd5
@ladp333 @MFazio23 @YuriLima23 the issue is fixed in 1.4.4.
We sincerely apologize for the inconvenience caused by the recent application crashes when transitioning to the background. We understand your frustration, and we'd like to provide a detailed explanation of what occurred and the steps we're taking to prevent similar issues in the future.
The issue arose due to a complex interaction between our Android and NDK agent releases:
This led to a method not found error, initially misdiagnosed as an NDK-side issue. Our attempt to resolve it by reverting NDK changes in an NDK agent release did not address the core problem: a version mismatch between the Android and NDK agents.
To prevent similar issues in the future, we are implementing the following measures:
We value your trust and are committed to delivering a stable and reliable React Native agent. We will conduct more thorough testing for future releases to prevent such issues from recurring.
If you need any additional information or clarification regarding this issue, please don't hesitate to reach out. We're here to address any concerns you may have.
Thank you for your patience and understanding as we work to improve our product and processes.
@ndesai-newrelic will this require us to to anything than bumping the version to 1.4.4?
@ndesai-newrelic - appreciate the update here and the improved process on your end.
The updated NR agent version fixed https://github.com/newrelic/newrelic-react-native-agent/issues/183 but does not resolve the current issue. I ran another build yesterday with the new library version and I'm seeing the same issue as before. To be clear, this issue is a SIGSEGV that occurs occasionally (primarily on Motorola devices), not a consistent crash every time the app is backgrounded.
What other info can I get for you to help troubleshoot what's going on here? Also, could you please re-open this issue as it is not resolved?
@MFazio23 can you disable nativeCrashReportingEnabled for android?
@MFazio23 is your issue fixed?
@MFazio23 is your issue fixed?
I'm thinking so (it was in local testing), but I'm waiting on a production release to completely confirm. Will update after that's done.
Issue is still occurring for us even with latest version 1.4.5
@ndesai-newrelic
can you disable nativeCrashReportingEnabled for android?
@ndesai-newrelic We gonna lose crash reporting data for android this way?
@vlimag nope, it will disable functionality of newrelic NDK agent which records C++ crash.
fyi setting nativeCrashReportingEnabled
as false
fixed for us @ndesai-newrelic
thanks
@MFazio23 is your issue fixed?
I can finally confirm that setting nativeCrashReportingEnabled
did indeed fix the issue here. Thank you again!
Description
We are experiencing a massive amount of crashes in our production application and we finally determined that it's happening due to the inclusion of the NewRelic RN agent library. The crash is showing up in a few different forms, but all look to be tied back to the same issue.
These crashes happen primarily on Motorola devices (almost 90%) though not exclusively.
We temporarily removed NR from our latest production release and the crashes completely went away.
Steps to Reproduce
We've been able to reproduce this on a few Motorola devices by a combination of backgrounding our app and opening another high-memory app like the camera. It doesn't happen every time you background the app (like this issue) but we can have it happen pretty consistently.
I'm working on getting a reproducible example I can share.
Expected Behavior
The app should not crash with NewRelic turned on.
Relevant Logs / Console output
Many of the stack traces look something like this:
Your Environment
Additional context
We've been working with the Hermes team for a while on this issue as well to no avail before finding that removing NR resolved the issue.
We also attempted to turn off instrumentation of some packages using
excludePackageInstrumentation(...)
but that only fixed the issue if we excluded thecom.newrelic.agent.android
package which obviously didn't allow us to continue using NR.