Flutterfire: [firebase_auth] ERROR_INTERNAL_ERROR on iOS when Email login

Created on 10 Sep 2019  Â·  10Comments  Â·  Source: FirebaseExtended/flutterfire

When trying to login and sign in with Email I get this Exception:
```
code:"ERROR_INTERNAL_ERROR"
details:null
message:"An internal error has occurred, print and inspect the error details for more information."
hashCode:374231514
runtimeType:Type (PlatformException)
`````

In Console: flutter: PlatformException(ERROR_INTERNAL_ERROR, An internal error has occurred, print and inspect the error details for more information., null)

This only happen with iOS, not with Android. Other firebase services work fine.

I tried it on version 0.13.0 and 0.14.0 and both have the issue

crowd auth duplicate bug

Most helpful comment

I resolved this by removing my API restrictions in Google Cloud Console for my iOS API key.

Not sure which API that should be enabled though and I don't recommend keeping it unrestricted.

All 10 comments

Ran into the same issue.
I was setting up the FirebaseApp and FirebaseDatabase as indicated by this example:
https://github.com/FirebaseExtended/flutterfire/blob/master/packages/firebase_database/example/lib/main.dart

Once I got rid of that code, and just used

final FirebaseApp _firebaseApp = FirebaseApp.instance;
final FirebaseDatabase _firebaseDatabase = FirebaseDatabase.instance;
final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;

It worked fine.
Still a bug though - the ERROR_INTERNAL_ERROR details are null, so very difficult to diagnose.

final FirebaseApp _firebaseApp = FirebaseApp.instance;

doesn't work for me :P , full callstack:

[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(ERROR_INTERNAL_ERROR, An internal error has occurred, print and inspect the error details for more information., null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
<asynchronous suspension>
#2      FirebaseAuth.sendSignInWithEmailLink (package:firebase_auth/src/firebase_auth.dart:160:19)
<asynchronous suspension>
#3      SessionRepository.sendSignInWithEmailLink (package:buki_flutter/repositories/session_repository.dart:31:32)
<asynchronous suspension>
#4      SessionBloc.sendSignInWithEmailLink (package:buki_flutter/blocs/session_bloc.dart:113:31)
#5      _EmailLoginPageState.build.<anonymous closure> (package:buki_flutter/pages/email_login_page.dart:25:59)
#6      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:654:14)
#7      _InkResponseState.build.<ano<…>

FlutterFire firebase_auth still doesn't work on iOS as of 0.14.0+5

Error
PlatformException (PlatformException(ERROR_INTERNAL_ERROR, An internal error has occurred, print and inspect the error details for more information., null))

Flutter Doctor output

[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G1012, locale en-NG)
    • Flutter version 1.9.1+hotfix.6 at /Users/ws4/development/flutter
    • Framework revision 68587a0916 (8 weeks ago), 2019-09-13 19:46:58 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/ws4/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /Users/ws4/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2, Build version 11B52
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.39.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.6.0

[✓] Connected device (1 available)
    • iPhone 11 Pro Max • 87669E03-C836-47C7-A588-F279BD456B66 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)

• No issues found!

FYI:
only happened with sendSignInWithEmailLink, not signInWithEmailAndPassword.

I've just fixed mine.
Don't know if this would solve yours but I removed my GoogleService-Info.plist, then downloaded it again and added it to my Runner Target again. Then, I ran pod install and it all worked.

I've just fixed mine.
Don't know if this would solve yours but I removed my GoogleService-Info.plist, then downloaded it again and added it to my Runner Target again. Then, I ran pod install and it all worked.

not work for me, do you use sendSignInWithEmailLink?

No, I'm using signInWithEmail in my app. I'll take a look at it and see if I can help out though.

Opened a issue #1514 for sendSignInWithEmailLink

I resolved this by removing my API restrictions in Google Cloud Console for my iOS API key.

Not sure which API that should be enabled though and I don't recommend keeping it unrestricted.

Consolidating under #1456 - we'll be looking at parsing native error messages & codes and bubbling these up to the Dart layer in a consistent cross-platform format.

Was this page helpful?
0 / 5 - 0 ratings