Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry Plugin is causing the application to crash #315

Closed
dorukkangal opened this issue May 6, 2022 · 4 comments · Fixed by #316
Closed

Sentry Plugin is causing the application to crash #315

dorukkangal opened this issue May 6, 2022 · 4 comments · Fixed by #316
Assignees
Labels
bug Something isn't working Platform: Android

Comments

@dorukkangal
Copy link

dorukkangal commented May 6, 2022

Gradle Version

7.4.2

AGP Version

7.1.2

Code Minifier/Optimizer

Proguard

Version

3.0.0

Sentry SDK Version

5.7.1

Description

We are using Braze library in our application and it works fine.
If we apply Sentry plugin, the application crashes when opening.

Steps to Reproduce

You can reproduce the error with the repository given below:
https://github.com/dorukkangal/braze-sample

The error doesn't occur again when I disable tracingInstrumentation.
I think the bytecode manipulation is causing VerifyError.

Log

java.lang.VerifyError: Verifier rejected class com.braze.support.BrazeImageUtils: android.graphics.Bitmap com.braze.support.BrazeImageUtils.getLocalBitmap(android.net.Uri, int, int) failed to verify: android.graphics.Bitmap com.braze.support.BrazeImageUtils.getLocalBitmap(android.net.Uri, int, int): [0x75] register v6 has type Precise Reference: java.lang.String but expected Reference: java.io.FileInputStream (declaration of 'com.braze.support.BrazeImageUtils' appears in /data/app/~~mudJ3b4VR55TXuQMIoS8ew==/com.hepsiburada.merchant.qa-oFX-w_fRWgtmWrKbDRq6yg==/base.apk)
        at com.braze.support.BrazeImageUtils.getImageLoaderCacheSize(SourceFile:1)
        at com.braze.images.DefaultBrazeImageLoader.<init>(SourceFile:4)
        at com.appboy.Appboy.<init>(SourceFile:59)
        at com.braze.Braze.<init>(SourceFile:1)
        at com.appboy.Appboy.getInstance(SourceFile:7)
        at com.hepsiburada.merchant.di.AppModule.provideBraze(AppModule.kt:46)
        at com.hepsiburada.merchant.di.AppModule_ProvideBrazeFactory.provideBraze(AppModule_ProvideBrazeFactory.java:41)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$SwitchingProvider.get0(DaggerApp_HiltComponents_SingletonC.java:2011)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$SwitchingProvider.get(DaggerApp_HiltComponents_SingletonC.java:2354)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$SwitchingProvider.get0(DaggerApp_HiltComponents_SingletonC.java:2008)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$SwitchingProvider.get(DaggerApp_HiltComponents_SingletonC.java:2354)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$SwitchingProvider.get0(DaggerApp_HiltComponents_SingletonC.java:1993)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$SwitchingProvider.get(DaggerApp_HiltComponents_SingletonC.java:2354)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$ActivityCImpl.injectMainActivity2(DaggerApp_HiltComponents_SingletonC.java:1506)
        at com.hepsiburada.merchant.core.DaggerApp_HiltComponents_SingletonC$ActivityCImpl.injectMainActivity(DaggerApp_HiltComponents_SingletonC.java:1474)
        at com.hepsiburada.merchant.ui.Hilt_MainActivity.inject(Hilt_MainActivity.java:66)
        at com.hepsiburada.merchant.ui.Hilt_MainActivity$1.onContextAvailable(Hilt_MainActivity.java:37)
        at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99)
        at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:313)
        at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:249)
        at com.hepsiburada.merchant.utils.base.BaseActivity.onCreate(BaseActivity.kt:30)
        at com.hepsiburada.merchant.ui.MainActivity.onCreate(MainActivity.kt:69)
        at android.app.Activity.performCreate(Activity.java:8054)
        at android.app.Activity.performCreate(Activity.java:8034)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3666)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3842)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7842)
        at java.lang.reflect.Method.invoke(Native Method)
@dorukkangal dorukkangal added bug Something isn't working Platform: Android labels May 6, 2022
@romtsn
Copy link
Member

romtsn commented May 7, 2022

Hey, thanks for the report and sorry for the troubles caused by the plugin. This indeed looks like an issue in our instrumentation. I will try to look into this next week.

Out of curiosity, do you actually use performance product (i.e. are you interested in the auto-instrumentation of file i/o or db queries at all)?

@dorukkangal
Copy link
Author

Hi @romtsn,

Thanks for your response.
We are currently using New Relic for performance monitoring. But we are considering switching to sentry.

@romtsn
Copy link
Member

romtsn commented May 17, 2022

@dorukkangal could you please try the version 3.1.0-beta.2? I've tested with the braze library, but just to make sure it works :)

@dorukkangal
Copy link
Author

Hi @romtsn, I have just tried it and it works. Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Platform: Android
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants