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

com.safedk.android.analytics.brandsafety.c.h ANR triggered by main thread being blocked #761

Open
JimRaid opened this issue Dec 14, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@JimRaid
Copy link

JimRaid commented Dec 14, 2024

MAX SDK Version

13.0.1

Device/Platform Info

All Android

Crashes/ANRs per Day

35

Percentage of Users Affected

0.1%

First Occurrence of Crash/ANR

It actually occured the first time after update Firebase to Version v12.4.1.

Exception and Stack Trace

          main (blocked):tid=1 systid=24776 | waiting to lock <0x083d2550> (com.safedk.android.analytics.brandsafety.InterstitialInfo) held by thread 88
       at com.safedk.android.analytics.brandsafety.c.h(SourceFile:261)
       at com.safedk.android.analytics.brandsafety.c.l(SourceFile:323)
       at com.safedk.android.analytics.brandsafety.InterstitialInfo.toString(SourceFile:118)
       at java.lang.String.valueOf(String.java:2924)
       at java.lang.StringBuilder.append(StringBuilder.java:132)
       at com.safedk.android.analytics.brandsafety.InterstitialFinder.d(SourceFile:1811)
       at com.safedk.android.analytics.brandsafety.InterstitialFinder.g(SourceFile:3028)
       at com.safedk.android.internal.b.b(SourceFile:326)
       at com.safedk.android.internal.b.onActivityStopped(SourceFile:280)
       at android.app.Application.dispatchActivityStopped(Application.java:493)
       at android.app.Activity.dispatchActivityStopped(Activity.java:1566)
       at android.app.Activity.onStop(Activity.java:2793)
       at com.mbridge.msdk.reward.player.MBRewardVideoActivity.onStop(MBRewardVideoActivity.java:36)
       at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1546)
       at android.app.Activity.performStop(Activity.java:8601)
       at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:5494)
       at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:5474)
       at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5543)
       at android.app.servertransaction.StopActivityItem.execute(StopActivityItem.java:43)
       at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2441)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:233)
       at android.os.Looper.loop(Looper.java:334)
       at android.app.ActivityThread.main(ActivityThread.java:8396)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
        

See Full Trace here:
com.iterationone.nightclubtycoon_issue_fc8f647302ae24b77046830a0f01dcea_ANR_session_675DD696019B000160C8262CEA811D7B_DNE_0_v2_stacktrace.txt

How to Reproduce

We are using latest Applovin SDK v8.01 Android v13.0.1.
This issue first started to appear with updating Firebase to v12.5.0.
There seems to be an issue between both SDKs mainly Safedk.

Reproducible in the demo app?

Not Tested

Additional Info

No response

@JimRaid JimRaid added the bug Something isn't working label Dec 14, 2024
@NanaAmoah
Copy link
Contributor

Hi @JimRaid, what Ad Review version are you using?

@JimRaid
Copy link
Author

JimRaid commented Dec 17, 2024

Hey @NanaAmoah, I'm using the Unity Package where can I find the version? There is no Ad Review in the integration manager displayed?

Edit: How do I update Ad Review SDK there is no Documentation of this?

@NanaAmoah
Copy link
Contributor

@JimRaid for Unity, by default, Ad Review gets automatically updated once you build your project. You can verify the version of Ad Review in the Mediation Debugger under MAX > Ad Review Version.

@JimRaid
Copy link
Author

JimRaid commented Dec 17, 2024

Ok we are still on v5.6.4 that explains it, but I have the issue that new builds don't have an updated version.
I did a "Force Resolve" with the External Dependency Manager. Any way to make it use the new version?

@NanaAmoah
Copy link
Contributor

NanaAmoah commented Dec 17, 2024

@JimRaid We included fixes for these ANRs in v5.6.5 and v5.6.6 of the Ad Review SDK. Did you see any errors in Unity when building the app?

@JimRaid
Copy link
Author

JimRaid commented Dec 17, 2024

@NanaAmoah I didn’t encounter any errors during the build. As a workaround, I manually edited the AppLovinProcessGradleBuildFile class and set the version number from "+" to "5.6.6". This forced the build to use the correct version, and everything worked as expected.

However, when I change the version string back to "+", it automatically reverts to v5.6.4 during the build process. I’m not sure why it fails to pull the latest version.

I’ve submitted a hotfix now for my app, so the issue is hopefully resolved for now. Still, I’d appreciate understanding how to make the Unity package consistently use the latest version.

@NanaAmoah
Copy link
Contributor

@JimRaid We haven't been able to reproduce the issue you reported. Could you try clearing the library and/or Gradle cache to see if that fixes the issue?
If it doesn't, could you try reproducing the issue in our demo app here and sharing the modified project with us so we can investigate further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants