Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Crash java.lang.VerifyError when using Newrelic with other ofuscated SDK

rfb

#1

Hello Newrelic team,

We currently encouter an issue at Contentsquare, if we integrate your sdk on Android, can you please help us ?

  • What agent version are you using? (click to see release notes)
    Tested on Android API level 28 with 3 versions of your agent:
    implementation “com.newrelic.agent.android:android-agent:5.24.0”
    implementation “com.newrelic.agent.android:android-agent:5.19.1”
    implementation “com.newrelic.agent.android:android-agent:5.19.0”

*Please share which platform you have questions about: iOS, Android or hybrid?
The question is about Android.

  • Are you seeing an error? Please paste the stack trace, or add a screenshot for us to review:
    From a sample app, with the latest release version of the Contentsquare SDK, the App will crash if we add the newrelic agent:
    2019-09-30 11:30:33.979 31231-31231/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.contentsquare.test, PID: 31231
    java.lang.VerifyError: Verifier rejected class com.contentsquare.android.sdk.x: void com.contentsquare.android.sdk.x.a(java.lang.String, com.contentsquare.android.sdk.z$b) failed to verify: void com.contentsquare.android.sdk.x.a(java.lang.String, com.contentsquare.android.sdk.z$b): [0x31] ‘this’ arg must be initialized (declaration of ‘com.contentsquare.android.sdk.x’ appears in /data/app/com.contentsquare.test-eEmREYE1Ix8Ikr8-rgB8eQ==/base.apk)
    at com.contentsquare.android.sdk.f0.a(Unknown Source:0)
    at com.contentsquare.android.sdk.k0.a(Unknown Source:0)
    at com.contentsquare.android.sdk.k0.get(Unknown Source:8)
    at com.contentsquare.android.sdk.k0.get(Unknown Source:0)

The Contentsquare SDK use minifyEnabled true with D8. No crash occurs if the Contentsquare SDK is not minify. According the mapping file the crash appears when the newrelic agent instruments our SDK, at each new instance JSONObject.

Please do not hesitate if you need other informations,

Regards,

Jérôme & Romain


#2

@romain.bouic

Thanks for posting! This looks similar to another case that is currently under investigation by our product engineering team. I’ve added your instance to the investigation, and I will update you in this thread when information is available.

Engineering may want additional information in the meantime, so please stay posted! Thanks :slight_smile:


#3

Thank you very much for the news @dmurray :slight_smile:

We tried to create a minimaliste sample app to provide you a source code, but sadly, we cannot reproduce this crash with this trivial example for now.

Regards,

Jérôme & Romain


#4

@romain.bouic

We’ve released a new version of the Android agent that should address this crash. Can you please update to the latest Android agent version and confirm if you are still seeing this error?

https://docs.newrelic.com/docs/release-notes/mobile-release-notes/android-release-notes


#5

Hi @dmurray, thank you for letting us now about the release. We tested the new 5.24.1 Android Agent Plugin but unfortunately we are still experiencing the runtime crash related with the stack trace “java.lang.VerifyError: Verifier rejected class…”. This happens whenever the New Relic SDK is trying to instrument the JSONObject.java class constructor complaining that it could not find the class in the ClassLoader from our understanding of the stack trace.
As a way to move forward, we could help you reproduce the issue by integrating our SDK in your environment? For that we would need to create a project with the package names that you might use. We can share these information in a private message.
What do you think?


#6

@romain.bouic

I think that sounds like a great plan! I’d like to share this with our product engineering team to investigate, so the more info you can provide, the better.

I will go ahead and open up a private support ticket where you can safely attach any files, and communicate directly as our engineers work on this.

Please keep an eye out for an email from New Relic Support :slight_smile:


#7

@dmurray Have you made any headway on this issue? We are seeing a similar issue.


#8

@denright

Can you share any information about what you’re seeing, what seems to be conflicting, and how you are implementing the Android agent?


#9

@dmurray: My understanding is that @denright has provided you a sample app that exhibits this fatal error upon app launch. Has your team made any progress in the investigation?


#10

Hey @tryim,

We have had few reports and sample apps provided for this error. Currently, the investigation by our product engineering team remains open, and updates are limited at this time. Once I have more information to provide, I will update this thread.


#11

Hello everyone,

@dmurray , It’s Jérôme here. Romain is currently off, but I prepared a sample app that reproduce the crash. If you think that can be useful for you, can you please tell me how I can share it with you? Thank you (I don’t have access to the private ticket you create for Romain),

Regards,

Jérôme


#12

Hey Jérôme,

DM me your email address and I will open another ticket for you to privately attach the sample app.


#13

Updating this thread for anyone else that may encounter this error: We have released a new Android agent version that has resolved this!

Please update to version 5.24.2 of the Android agent - Android Agent Release Notes