Repository navigation
Fatal Exception: parameter must be a descendant of this view - ReactScrollView.java line 218 #32649
Description
Activity
We are also experiencing this same issue. Have you made any more headway when investigating it?
We are currently investigating whether it might be related to UI issues where some of our components are rendered off the screen in a scrollable view. Or whether it could be due to some improper handling of the device safe area boundaries.
npmPackages: react: 17.0.1 => 17.0.1 react-native: 0.64.2 => 0.64.2@julianD77 I don't know how to reproduce it. The major concern is that I didn't made changes on my app and I didn't have anyone of these crashes before November 15th, but since nov 15 I've a lot of them
Hmm that's very interesting - our graph is very similar.
Do you use Google Ads? We do and Im wondering if that could be related to this due to it being something potentially outside of our control that could have resulted in changed behaviour/appearance.
We also haven't yet identified a change in our code or dependencies that could have triggered this.
Mmm yes, I'm using Google Ads too and your chart is sooo similar
What version of the Ads dependencies are you using? These are the relevant versions we have:
com.google.ads.mediation:facebook:6.5.1.0@aar com.google.android.gms:play-services-ads:20.2.0@aar com.google.android.gms:play-services-ads-lite:20.2.0@aar com.google.android.gms:play-services-base:17.5.0@aar com.google.android.gms:play-services-ads-base:20.2.0@aar com.google.android.gms:play-services-ads-identifier:17.0.0@aar com.google.android.gms:play-services-basement:17.6.0@aar androidx.appcompat:appcompat:1.3.1@aar com.facebook.react:react-native:0.64.2@aarWe are checking now if disabling Ads through Ad Manager does help affect this crash. Hopefully we will know within a couple of hours. Will also:
- try and push out a release with all the Ads related dependencies updated
- try updating the App to a newer RN version, likely 0.65.1 initially
Have you had any further insights/plans to address this/thoughts on where else we might get more information to help with this issue?
My dependencies are little older than yours:
com.google.android.gms:play-services-ads:19.8.0 com.google.android.gms:play-services-ads-base:19.8.0 com.google.android.gms:play-services-ads-identifier:17.0.0 com.google.android.gms:play-services-ads-lite:19.8.0 com.google.android.ads.consent:consent-library:1.0.6I can't upgrade to latest version of RN since I'm using expo, and the latest version supported is 0.64. So, I didn't do anything for now, I don't know what can I do :/
Id definitely suggest trying a release with updated
-adsdependencies. I'll update here if we determine that disabling Android Ads / updating the SDKs has affected the frequency of this crash for us.Reacted by RodolfoSame issue here. Cannot update Admob for now as I'm waiting for react native firebase to support the new version of Admob.
Hey @julianD77 , we are facing the same issue in our production app. Was updating Google Ads effective?
Reacted by RodolfoCuriosly, despite using RN in our app, the stacktraces have no mention to React Native classes and the logs are indicating the problem occurs in a fully native feature. The ocurrencies also started on November 15th and also seems to be unrelated to any of our releases. We have Google Ads in our app.
We are still trying to verify this and aiming to get a new release out with just an update to use v20.5.0 the Ads SDK today. Will update as soon as I can.
@mqueiroz1995 See
facebook.react.uimanager.NativeViewHierarchyManager.updateLayoutin the call stack above. This just ends up triggering method calls on theViewGroupclass which is as you say native Android code. The issue I think is how the view hierarchy is getting modified to lead to the case whereparameter must be a descendant of this viewis no longer true.Reacted by Matheus de Mello QueirozReported on the Google Ads SDK forum here: https://groups.google.com/g/google-admob-ads-sdk/c/EsLEaoRjyNM
Reacted by Rodolfo9 remaining items
Thank you so much @manuhook!
Here is the patch for@react-native-firebase/admob: 11.5.0. Note: I'm not tested yet!File:
patches/@react-native-firebase+admob+11.5.0.patchdiff --git a/node_modules/@react-native-firebase/admob/android/src/main/java/io/invertase/firebase/admob/ReactNativeFirebaseAdMobBannerAdViewManager.java b/node_modules/@react-native-firebase/admob/android/src/main/java/io/invertase/firebase/admob/ReactNativeFirebaseAdMobBannerAdViewManager.java index 5faee1b..58b61c0 100644 --- a/node_modules/@react-native-firebase/admob/android/src/main/java/io/invertase/firebase/admob/ReactNativeFirebaseAdMobBannerAdViewManager.java +++ b/node_modules/@react-native-firebase/admob/android/src/main/java/io/invertase/firebase/admob/ReactNativeFirebaseAdMobBannerAdViewManager.java @@ -32,6 +32,7 @@ import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdSize; import com.google.android.gms.ads.AdView; +import android.view.ViewGroup; import javax.annotation.Nonnull; import java.util.Map; @@ -121,7 +122,7 @@ public class ReactNativeFirebaseAdMobBannerAdViewManager extends SimpleViewManag private void setAdListener(ReactViewGroup reactViewGroup) { final AdView adView = getAdView(reactViewGroup); - + adView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); adView.setAdListener(new AdListener() { @Override public void onAdLoaded() {Reacted by Emmanuel Boutte and Julian DiggleYes @julianD77, no more crashes related to this error after applying the patch.
Reacted by Rodolfo and Julian DiggleThanks so much @manuhook and @RodolfoGS - using the patch described above has prevented this crash for us in our latest release.
There is an update too in the Google Ads SDK forum that might be useful to anyone who isn't easily able to update or patch their Ads SDK native Android code. It seems disabling the specific
autopromotioncampaign(s?) setup forbackfillmay also prevent the crash.Hello, I have found the cause of the bug. It turns out that the bug started to appear when I created an autopromotion campaign for backfill. It must be a bug.
Thanks for the help and it was hard to find the bug. I found it by chance. As soon as I deleted the campaign, it started showing ads again.
Reacted by Emmanuel BoutteReacted by Rodolfo- added a commit that references this issue
on Jan 22, 2022 - added a commit that references this issue
on Jan 24, 2022 - added a commit that references this issue
on Jan 24, 2022 - added 2 commits that reference this issue
on Feb 7, 2022 - added 2 commits that reference this issue
on Feb 7, 2022 This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Jun 16, 2022 This issue was closed because it has been stalled for 7 days with no activity.
- locked as resolved and limited conversation to collaborators
on Jun 23, 2022



Description
I'm having a lot of crashes on Crashlytics related to
ReactScrollView.java line 218on Android.The crashes appears first time on Nov 15, but I didn't changes on my app.
Happen on Android: 8, 9, 10, 11 and 12. Samsung, Motorola, Google, LGE, OnePlus, etc.
Version
0.63.4
Output of
react-native infoSteps to reproduce
I don't know, I'm seeing them on Crashlytics.
Snack, code example, screenshot, or link to a repository
No response