react-native-admob icon indicating copy to clipboard operation
react-native-admob copied to clipboard

The ad size can only be set once on AdView. com.sbugert.rnadmob.ReactAdView.setAdSize

Open sarceda opened this issue 4 years ago • 0 comments

I had this issue: https://github.com/sbugert/react-native-admob/issues/448

I added this line to react-native-admob/android/build.gradle

implementation 'com.google.android.gms:play-services-ads:19.8.0'

The build was successful, but now I am getting this crashes on 6% of Android users:

`RNAdMobBannerViewManager.java line 158 com.sbugert.rnadmob.ReactAdView.setAdSize``

Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'adSize' of a view managed by: RNGADBannerView at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:98) at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:131) at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51) at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:46) at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:139) at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute(UIViewOperationQueue.java:93) at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:844) at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:952) at com.facebook.react.uimanager.UIViewOperationQueue.access$2200(UIViewOperationQueue.java:44) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1012) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:603) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5421) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

sarceda avatar Apr 25 '21 12:04 sarceda