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

App crashes when navigate back from a screen shown INTERSTITIAL/REWARDED_VIDEO to a screen has BannerAds #105

Closed
kyunkakata opened this issue May 10, 2023 · 1 comment

Comments

@kyunkakata
Copy link

kyunkakata commented May 10, 2023

Step to reproduce:
Using a BannerAds using AppodealBanner component in screen A.
Navigate to screen B and show a INTERSTITIAL/REWARDED_VIDEO in screen B.
Then click close the ads then a crash will appear.
Here is the stacktrace:

FATAL EXCEPTION: main
Process: com.package, PID: 31182
java.lang.RuntimeException: Unable to resume activity {com.package/com.package.MainActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4917)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4950)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
	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:2291)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:210)
	at android.os.Looper.loop(Looper.java:299)
	at android.app.ActivityThread.main(ActivityThread.java:8309)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1038)
Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
	at android.view.ViewGroup.addViewInner(ViewGroup.java:5264)
	at android.view.ViewGroup.addView(ViewGroup.java:5093)
	at android.view.ViewGroup.addView(ViewGroup.java:5062)
	at com.appodeal.ads.x5.a(SourceFile:34)
	at com.appodeal.ads.s5.run(Unknown Source:15)
	at android.app.Activity.runOnUiThread(Activity.java:7220)
	at com.appodeal.ads.x5.a(SourceFile:136)
	at com.appodeal.ads.x5.a(Unknown Source:2)
	at com.appodeal.ads.p.b(Unknown Source:62)
	at com.appodeal.ads.x5.a(SourceFile:170)
	at com.appodeal.ads.a6.a(SourceFile:7)
	at com.appodeal.ads.u$a.a(Unknown Source:2)
	at com.appodeal.ads.utils.c0.onActivityResumed(Unknown Source:2)
	at com.appodeal.ads.utils.app.b.onActivityResumed(Unknown Source:32)
	at android.app.Application.dispatchActivityResumed(Application.java:418)
	at android.app.Activity.dispatchActivityResumed(Activity.java:1439)
	at android.app.Activity.onResume(Activity.java:2009)
	at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:434)
	at com.facebook.react.ReactActivity.onResume(ReactActivity.java:57)
	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1477)
	at android.app.Activity.performResume(Activity.java:8336)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4907)
@kyunkakata
Copy link
Author

I cannot reproduce this issue with a basic example when integrate with Appodeal. It may be our code problems instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant