react-native-admob-native-ads
react-native-admob-native-ads copied to clipboard
App is crashing frequently
Hi Ammar, I see that the app is crashing frequently because of this error- java.lang.IllegalStateException com.ammarahmed.rnadmob.nativeads.RNAdmobNativeView.setNativeAd
Error logs:
exception.class.missing._Unknown_: java.lang.IllegalStateException **The specified child already has a parent. You must call removeView() on the child's parent first.**
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp (ViewManagersPropertyCache.java:120)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty (ViewManagerPropertyUpdater.java:10)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps (ViewManagerPropertyUpdater.java:36)
at com.facebook.react.uimanager.ViewManager.updateProperties (Unknown Source:10)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties (NativeViewHierarchyManager.java:14)
at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute (UIViewOperationQueue.java:10)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:135)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:53)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2600 (UIViewOperationQueue.java)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:31)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:46)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:2)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1029)
at android.view.Choreographer.doCallbacks (Choreographer.java:849)
at android.view.Choreographer.doFrame (Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1016)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:257)
at android.app.ActivityThread.main (ActivityThread.java:8155)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1015)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp (ViewManagersPropertyCache.java:54)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty (ViewManagerPropertyUpdater.java:10)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps (ViewManagerPropertyUpdater.java:36)
at com.facebook.react.uimanager.ViewManager.updateProperties (Unknown Source:10)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties (NativeViewHierarchyManager.java:14)
at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute (UIViewOperationQueue.java:10)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:135)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:53)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2600 (UIViewOperationQueue.java)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:31)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:46)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:2)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1029)
at android.view.Choreographer.doCallbacks (Choreographer.java:849)
at android.view.Choreographer.doFrame (Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1016)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:257)
at android.app.ActivityThread.main (ActivityThread.java:8155)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1015)
Caused by: java.lang.IllegalStateException: at android.view.ViewGroup.addViewInner(ViewGroup.java:5292)
at android.view.ViewGroup.addView(ViewGroup.java:5121)
at android.view.ViewGroup.addView(ViewGroup.java:5061)
at android.view.ViewGroup.addView(ViewGroup.java:5033)
at com.google.android.gms.ads.nonagon.ad.nativead.bm.run(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:14)
at com.google.android.gms.ads.internal.util.future.c.execute(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
at com.google.android.gms.ads.internal.util.future.d.execute(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
at com.google.android.gms.ads.nonagon.ad.nativead.ak.v(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
at com.google.android.gms.ads.nonagon.ad.nativead.ak.u(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
at com.google.android.gms.ads.nonagon.ad.nativead.bk.bI(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:6)
at com.google.android.gms.ads.internal.formats.client.k.bO(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:26)
at adu.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:4)
at android.os.Binder.transact (Binder.java:1043)
at com.google.android.gms.internal.ads.zzaqv.zzbl (zzaqv.java:7)
at com.google.android.gms.internal.ads.zzblc.zzbA (zzblc.java:8)
at com.google.android.gms.ads.nativead.NativeAdView.setNativeAd (NativeAdView.java:8)
at com.ammarahmed.rnadmob.nativeads.RNAdmobNativeView.setNativeAd (RNAdmobNativeView.java:8)
at com.ammarahmed.rnadmob.nativeads.RNAdmobNativeViewManager.setPropIconView (Unknown Source:11)
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp (ViewManagersPropertyCache.java:54)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty (ViewManagerPropertyUpdater.java:10)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps (ViewManagerPropertyUpdater.java:36)
at com.facebook.react.uimanager.ViewManager.updateProperties (Unknown Source:10)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties (NativeViewHierarchyManager.java:14)
at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute (UIViewOperationQueue.java:10)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:135)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:53)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2600 (UIViewOperationQueue.java)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:31)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:46)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:2)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1029)
at android.view.Choreographer.doCallbacks (Choreographer.java:849)
at android.view.Choreographer.doFrame (Choreographer.java:775)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1016)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:257)
at android.app.ActivityThread.main (ActivityThread.java:8155)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1015)
Please look into this error. This is the error code from Playstore Console. Thanks :)
Hi @ammarahm-ed any update on this?
Hey @rakeshp947, did you ever get it resolved?