invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
651 stars 131 forks source link

[🐛] Bug Report Title - 'eventsNotifyReady' of null #450

Closed SalmanFaris53 closed 11 months ago

SalmanFaris53 commented 11 months ago

What happened?

Cannot read property 'eventsNotifyReady' of null

Platforms

Android, but have not tested behavior on iOS

React Native Info

System:
    OS: macOS 13.5.2
    CPU: (8) arm64 Apple M1
    Memory: 78.36 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.19 - ~/Fariz/Tanbish/node_modules/.bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
    Watchman: 2023.02.06.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /Users/tomsherrobinson/.rvm/gems/ruby-2.7.6/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.3 AI-223.8836.35.2231.10671973
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.18 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.8 => 0.71.8 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
info React Native v0.72.4 is now available (your project is running on v0.71.8).

Are your using Typescript?

package.json

{
  "name": "tanbish",
  "version": "1.4.4",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/config-plugins": "^6.0.0",
    "@expo/prebuild-config": "~6.0.0",
    "@expo/vector-icons": "^13.0.0",
    "@openspacelabs/react-native-zoomable-view": "^2.0.4",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-community/slider": "4.4.2",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.0",
    "@react-navigation/stack": "^6.3.2",
    "@stripe/stripe-react-native": "0.23.3",
    "apisauce": "^2.1.6",
    "expo": "~48.0.18",
    "expo-app-loading": "~2.1.0",
    "expo-apple-authentication": "~6.0.1",
    "expo-build-properties": "~0.6.0",
    "expo-constants": "~14.2.1",
    "expo-dev-client": "~2.2.1",
    "expo-firebase-recaptcha": "^2.3.0",
    "expo-font": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-linking": "~4.0.1",
    "expo-localization": "~14.1.1",
    "expo-location": "~15.1.1",
    "expo-notifications": "~0.18.1",
    "expo-screen-orientation": "~5.1.1",
    "expo-secure-store": "~12.1.1",
    "expo-splash-screen": "~0.18.2",
    "expo-status-bar": "^1.4.0",
    "firebase": "9.9.2",
    "formik": "^2.2.9",
    "html-entities": "^2.3.3",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.1.4",
    "lru-cache": "^7.17.0",
    "mime": "^3.0.0",
    "moment": "^2.29.4",
    "qs": "^6.11.0",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-geocoding": "^0.5.0",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-google-mobile-ads": "10.0.0",
    "react-native-maps": "1.3.2",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-progress": "^5.0.0",
    "react-native-razorpay": "^2.3.0",
    "react-native-read-more-text": "^1.1.2",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-svg": "13.4.0",
    "react-native-webview": "11.26.0",
    "react-native-youtube-iframe": "^2.2.2",
    "yarn": "^1.22.19",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

app.json

{
  "expo": {
    "name": "Tanbish",
    "slug": "tanbish",
    "version": "1.4.4",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "plugins": [
      [
        "expo-notifications",
        {
          "icon": "./assets/icon96x96.png",
          "color": "#ffffff",
          "mode": "production"
        }
      ],
      "./plugins/react-native-maps-plugin",
      "./plugins/with-no-bitcode",
      [
        "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "13.0",
            "useFrameworks": "static"
          }
        }
      ],
      "expo-localization"
    ],
    "splash": {
      "image": "./assets/splash.png",
      "backgroundColor": "#ffffff",
      "resizeMode": "cover"
    },
    "notification": {
      "icon": "./assets/icon96x96.png",
      "color": "#ffffff",
      "iosDisplayInForeground": true,
      "androidMode": "default"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "bitcode": "Debug",
      "usesAppleSignIn": true,
      "supportsTablet": true,
      "bundleIdentifier": "com.tanbish",
      "buildNumber": "14",
      "infoPlist": {
        "NSCameraUsageDescription": "Tanbish uses the camera to capture and upload user profile image and Listing Image to the server.",
        "NSPhotoLibraryUsageDescription": "Tanbish needs access to the photo library to select and upload user profile image and Listing Image to the server.",
        "NSPhotoLibraryAddUsageDescription": "Tanbish needs access to the photo library to select and upload user profile image and Listing Image to the server.",
        "NSLocationWhenInUseUsageDescription": "Tanbish usages device location on listing information, Listing search Data and User information.",
        "NSLocationAlwaysAndWhenInUseUsageDescription": "Tanbish usages device location on listing information, Listing search Data and User information.",
        "NSLocationAlwaysUsageDescription": "Tanbish uses device location on listing information, Listing search Data and User information.",
        "NSMicrophoneUsageDescription": "Tanbish uses your microphone while taking video of your product for uploading in listing information.",
        "CFBundleAllowMixedLocalizations": true,
        "UIBackgroundModes": [
          "remote-notification"
        ],
        "SKAdNetworkItems": [
          {
            "SKAdNetworkIdentifier": "v9wttpbfk9.skadnetwork"
          },
          {
            "SKAdNetworkIdentifier": "n38lu8286q.skadnetwork"
          }
        ]
      },
      "config": {
        "googleMapsApiKey": "AIzaSyCwx5yTQPJwVf04tUtMKPI1JGr4U6Bp9Yc"
      }
    },
    "android": {
      "package": "com.tanbish",
      "config": {
        "googleMaps": {
          "apiKey": "AIzaSyCwx5yTQPJwVf04tUtMKPI1JGr4U6Bp9Yc"
        }
      },
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "permissions": [
        "CAMERA",
        "CAMERA_ROLL",
        "MEDIA_LIBRARY",
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE",
        "RECORD_AUDIO",
        "READ_PHONE_STATE",
        "READ_CONTACTS",
        "LOCATION",
        "ACCESS_COARSE_LOCATION",
        "ACCESS_FINE_LOCATION",
        "RECEIVE_BOOT_COMPLETED",
        "android.permission.INTERNET",
        "POST_NOTIFICATIONS"
      ],
      "versionCode": 13
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "scheme": "tanbish",
    "extra": {
      "eas": {
        "projectId": "6b210f5b-435d-4f29-9f53-82dfd7abc16c"
      }
    }
  },
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-************************",
    "ios_app_id": "ca-app-pub-************************"
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

DoctorJohn commented 11 months ago

Hello, how does the relevant code look like?

SalmanFaris53 commented 11 months ago

@DoctorJohn sorry?

DoctorJohn commented 11 months ago

Could you show us the part of your code where this exception occurred? This library is decently complex and knowing which of this libraries functions your project called helps a lot to track down the issue.

Or are you getting this exception only by installing react-native-google-mobile-ads but not importing it at all?

In either case a stack trace of the exception would be helpful too. This way it's obvious where the error came from and no one has to spend their free time tracking down the exception.

dylancom commented 11 months ago

Please also upgrade to the latest version. Bugs in 10.0.0 could already be fixed...

SalmanFaris53 commented 11 months ago

ok