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

🔥 Android 14 Emulator Auth Error - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED #7911

Open
1 of 5 tasks
robmcilroy opened this issue Jul 16, 2024 · 6 comments
Open
1 of 5 tasks

Comments

@robmcilroy
Copy link

robmcilroy commented Jul 16, 2024

Issue

Only for Android 14 (API 34) emulators I'm getting the error One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcast when verifying the users phone number. This occurs when firebase leaves the application to perform recaptcha/human verification, when it attempts to return to the application it crashes and I get the error through on firebase crashlytics.

  • I've tried @react-native/firebase versions 14.11.1 + 14.12.0 of the packages
  • Android API 33 and below work fine, as does email sign in on API 34, so it must be related to the new broadcast receiver security!
  • A Physical Android 14 Device works fine, it only happens via emulators

Any ideas?

Project Files

buildscript {
    ext {
        buildToolsVersion = "33.0.0"
        minSdkVersion = 21
        compileSdkVersion = 33
        targetSdkVersion = 34
   }
}

Javascript

import firebaseAuth from "@react-native-firebase/auth";

...

firebaseAuth().verifyPhoneNumber(..)

package.json:

    "@react-native-firebase/analytics": "14.11.1",
    "@react-native-firebase/app": "14.11.1",
    "@react-native-firebase/auth": "14.11.1",
    "@react-native-firebase/crashlytics": "14.11.1",
    "@react-native-firebase/dynamic-links": "14.11.1",
    "@react-native-firebase/firestore": "14.11.1",
    "@react-native-firebase/functions": "14.11.1",
    "@react-native-firebase/remote-config": "14.11.1",
    "@react-native-firebase/storage": "14.11.1",
    "react-native": "0.72.4",

Environment

Click To Expand

react-native info output:

System:
  OS: macOS 13.5.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 44.45 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.0
    path: ~/.nvm/versions/node/v20.11.0/bin/node
  Yarn: Not Found
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.0/bin/npm
  Watchman:
    version: 2023.10.23.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/robbiemcilroy/.rvm/gems/ruby-2.7.8/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.8
    path: /usr/bin/javac
  Ruby:
    version: 2.7.8
    path: /Users/robbiemcilroy/.rvm/rubies/ruby-2.7.8/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 14.11.1
  • Firebase module(s) you're using that has the issue:
    • @react-native-firebase/auth
  • Are you using TypeScript?
    • Y 4.8.4

Stacktrace from Firebase crashlytics below

Screenshot 2024-07-16 at 17 03 09
@robmcilroy robmcilroy changed the title (:fire:) Android 14 Auth Error - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED 🔥 Android 14 Auth Error - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED Jul 16, 2024
@robmcilroy robmcilroy changed the title 🔥 Android 14 Auth Error - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED 🔥 Android 14 Emulator Auth Error - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED Jul 17, 2024
@robmcilroy
Copy link
Author

Deleting and re-creating an Android 14 Emulator solved this issue! Hope this helps someone in the future!

@MartinN3
Copy link

I have upgraded react native to version 0.74.3 and it is sure an issue. Exactly the same description. Can i patch package somewhere to add this receiver policy? Does anybody know where?

    ext {
        kotlinVersion = "1.9.22"
        RNNKotlinVersion = kotlinVersion
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        playServicesVersion = "18.0.0"
        pdfViewerVersion = "3.2.0-beta.1"
        pdfViewerRepo = "com.github.mhiew"
    }

@robmcilroy robmcilroy reopened this Jul 29, 2024
@russellwheatley
Copy link
Member

@MartinN3 - just for emulator? have you tried the solution mentioned above?

@robmcilroy
Copy link
Author

@MartinN3 be sure to investigate where your 'One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED' error is coming from via stack trace. It may be other packages you depend on which are out of date, an example for us was @sentry/react-native which only was the updated receiver policy in newer versions

@SergiiNikolayev
Copy link

SergiiNikolayev commented Aug 25, 2024

@MartinN3 be sure to investigate where your 'One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED' error is coming from via stack trace. It may be other packages you depend on which are out of date, an example for us was @sentry/react-native which only was the updated receiver policy in newer versions

Thanks bro @robmcilroy, it helped me.

Updated my sentry from "@sentry/react-native": "^2.4.3 to "@sentry/react-native": "5.30.0"

and One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED error disapeared.

@MartinN3
Copy link

Thanks for suggestions. As you stated, it was solved by updating dependencies in repo. I can't remember what package it was for me.

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

No branches or pull requests

4 participants