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

🔥 auth/unknown an internal error has occurred on android #2785

Closed
1 of 9 tasks
eambutu opened this issue Oct 25, 2019 · 30 comments
Closed
1 of 9 tasks

🔥 auth/unknown an internal error has occurred on android #2785

eambutu opened this issue Oct 25, 2019 · 30 comments
Labels
platform: android plugin: authentication Firebase Authentication Type: Stale Issue has become stale - automatically added by Stale bot

Comments

@eambutu
Copy link

eambutu commented Oct 25, 2019

Issue

When trying to login with email/password, I get an error on my Android Version 9.0 phone (Pixel 2):

WARN  Possible Unhandled Promise Rejection (id: 0):
Error: [auth/unknown] An internal error has occurred. [ 7: ]
NativeFirebaseError: [auth/unknown] An internal error has occurred. [ 7: ]

There is very little code here, it's merely:

import auth from '@react-native-firebase/auth';
...
auth().signInWithEmailAndPassword(email, password);

When I run this exact code on my Android Version 7.0 phone (Samsung Galaxy Note 5), it works just fine.


Project Files

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 223.98 MB / 8.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 12.1.0 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
    Android SDK:
      API Levels: 24, 27, 28
      Build Tools: 27.0.3, 28.0.2, 28.0.3
      System Images: android-27 | Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-28 | China version of Wear OS Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 11.0/11A420a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.2 => 0.61.2
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-fbsdk: 0.8.0
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • [x ] Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 6.0.1 for /app and /auth
  • Firebase module(s) you're using that has the issue:
    • auth
  • Are you using TypeScript?
    • N


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

@eambutu eambutu changed the title auth/unknown an internal error has occurred on android 🔥 🔥 auth/unknown an internal error has occurred on android Oct 25, 2019
@developerashish01
Copy link

any clue on this? I am stuck

@rafalzawadzki
Copy link

I'm having a similar issue with phone authentication, on firebase.auth().signInWithPhoneNumber(phoneNumber) call.

Affects users on:
Android 7, 9
Devices HTC U11 EYEs, Galaxy S8+

@Rushabhshroff
Copy link

Did anyone find the fix?

@tarunjuneja
Copy link

Guys i was getting this because i was on Airplane mode
Ensure you are on a valid n/w
the moment i enabled that it started working

@stale
Copy link

stale bot commented Jan 9, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Jan 9, 2020
@switch13
Copy link

Still having the same issue.

@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Jan 10, 2020
@tarunjuneja
Copy link

Still having the same issue.

Have you already tired adding a pre-validated mobile number on firebase portal

Moreover you will need to build your application with valid deployment key certificate in release mode (which you can generate it on your machine and add it to your app on firebase on firebase portal)

Until i built using release mode with valid certificate i was not able to test it.

@Afx31
Copy link

Afx31 commented Feb 8, 2020

My app which I started building last year worked fine with the auth, now coming back it it I'm getting the API key not valid message as well.. Was there any solution for this in the end?

Following error when using '.createUserWithEmailAndPassword' method

[Error: [auth/unknown] An internal error has occurred. [ API key not valid. Please pass a valid API key. ]]

@mikehardy
Copy link
Collaborator

@Afx31 install fresh google descriptors (GoogleService-Info.plist google-services.json)

@Afx31
Copy link

Afx31 commented Feb 10, 2020

@mikehardy I have already re-installed fresh google-services.json files which didn't do anything.

@stale
Copy link

stale bot commented Mar 9, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Mar 9, 2020
@theronic
Copy link

theronic commented Mar 9, 2020

Make sure to enable the sign-in method you are using via the Firebase console. It's a non-descriptive error.

@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Mar 9, 2020
@stale
Copy link

stale bot commented Apr 7, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Apr 7, 2020
@bimix
Copy link

bimix commented Apr 23, 2020

Still having this issue when calling a function in the cloud while authenticated with email and password

@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Apr 23, 2020
@stale
Copy link

stale bot commented May 21, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label May 21, 2020
@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label May 21, 2020
@stale
Copy link

stale bot commented Jun 20, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Jun 20, 2020
@mrlego
Copy link

mrlego commented Jun 21, 2020

i am having the same problem please help

@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label Jun 21, 2020
@tarunjuneja
Copy link

i am having the same problem please help

#1 add a pre-validated mobile number on firebase portal

#2 generate new deployment key certificate in release mode on your machine

#3 add this certificate it to your app on firebase on firebase portal

#4 build in release mode

#5 run your app.

that worked for me.

I was never able to test in debug mode with development certificate.

@stale
Copy link

stale bot commented Jul 20, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Jul 20, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 8, 2020
@lyseiha
Copy link

lyseiha commented Oct 14, 2020

any update on it?

@mikehardy
Copy link
Collaborator

@lyseiha why would there be an update on a closed issue? It's open source --> all updates are visible. And all comments generate notifications.

@Anadi9
Copy link

Anadi9 commented Nov 11, 2020

I'm having a similar issue with phone authentication, on firebase.auth().signInWithPhoneNumber(phoneNumber) call.

Affects users on:
Android 7, 9
Devices HTC U11 EYEs, Galaxy S8+

have you found any fix for it? i am facing same issue

@reaction reaction bot deleted a comment from hungdev Aug 13, 2021
@RajanRV
Copy link

RajanRV commented Apr 14, 2023

[Error: [auth/unknown] An internal error has occurred. [ Internal error encountered. ]]

Getting this error for few mobile numbers only.

@hamzakashifCL
Copy link

I am also getting this error "[Error: [auth/unknown] An internal error has occurred. [ Internal error encountered. ]]" when I want to fetch OTP for mobile signIn

@brandonsavagesoftware
Copy link

Started getting the same error when the code worked previously.

@Shyam-Khokhariya
Copy link

I am also getting same error only on release app in android device. Working fine in emulator.
Screenshot 2023-05-17 at 7 56 53 PM

@davidcort
Copy link

Same error just now:

Error: [auth/unknown] An internal error has occurred. [ Internal error encountered. ]

@davidcort
Copy link

Same error just now:

Error: [auth/unknown] An internal error has occurred. [ Internal error encountered. ]

This error only happens on Android. I will trying to generate another SHA. Again ...

@davidcort
Copy link

Ok, i resolved this with the SHA-1 Certificate Fingerprint, i take it from Expo console. (My app uses Expo).
I placed this on the firebase console for my Android Project and works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: android plugin: authentication Firebase Authentication Type: Stale Issue has become stale - automatically added by Stale bot
Projects
None yet
Development

No branches or pull requests