Closed syedz closed 4 years ago
@syedz If you could provide any of the following it would help us track down this issue:
I'm getting this too with the latest update, only on iOS builds, Android is working fine. It seems to be an issue with firebase_auth as I can't get past my app's login screen but flutter does load.
My plugin versions:
firebase_core: ^0.4.3+1
firebase_auth: ^0.15.2
firebase_database: ^3.1.1
cloud_firestore: ^0.13.0+1
firebase_messaging: ^6.0.9
We also have this same issue, using phone authentication. Updated to the latest version of Flutter (1.12.13+ hotfix.5), along with latest versions of firebase_core (^0.4.3+1) and firebase_auth (^0.15.2).
@kroikie All I have setup is an iOS app that won't connect to Firebase, Android will work just fine. My pubspec.yaml
file is below, I've updated a few dependencies from the original post.
environment:
sdk: '>=2.2.2 <3.0.0'
dependencies:
flutter:
sdk: flutter
algolia: ^0.1.6+1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
carousel_pro: ^0.0.13
cloud_firestore: ^0.12.5
firebase_auth: ^0.15.2
firebase_core: ^0.4.3+1
firebase_messaging: ^6.0.9
firebase_storage: 3.0.6
flutter_facebook_login: 3.0.0
flutter_image_compress: 0.6.3
flutter_slidable: 0.5.4
font_awesome_flutter: 8.5.0
geoflutterfire: ^2.0.3+5
google_maps_flutter: 0.5.21+3
google_sign_in: ^4.0.7
image_cropper: ^1.0.2
image_picker: 0.6.1+4
cached_network_image: 2.0.0-rc.1
intl: ^0.15.8
keyboard_visibility: ^0.5.6
liquid_pull_to_refresh: ^1.1.1
flutter_cache_manager: ^1.1.3
location: 2.3.4
modal_progress_hud: ^0.1.3
package_info: 0.4.0+6
photo_view: ^0.4.2
provider: ^3.0.0+1
rxdart: ^0.22.2
shared_preferences: 0.4.3
simple_moment: ^1.0.3
url_launcher: 5.0.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: '^0.7.0'
Has anyone found a solution for this?
Same here. Has anyone found a solution for this(2)?
I get it the other way around, it works for iOS but not Android..?
@kroikie any updates here? This is a blocker for our team. We haven't been able to update our iOS app in over a month now.
Sorry for the delay here, let me see if I can clarify some things:
@syedz you mentioned that your app is unable to connect to Firebase, are you able to use other Firebase plugins or is this an issue specific to firebase_auth plugin?
@all At what point are you seeing this MissingPluginException
I would like to be able to reproduce it but I'm not seeing this when I run the example app. Eg: Is this happening when using a specific type of sign in?
@all Is this happening on a specific version of iOS?
I'm using phone auth if that helps.
On Mon, Jan 13, 2020, 5:16 PM Arthur Thompson notifications@github.com wrote:
Sorry for the delay here, let me see if I can clarify some things:
@syedz https://github.com/syedz you mentioned that your app is unable to connect to Firebase, are you able to use other Firebase plugins or is this an issue specific to firebase_auth plugin?
@ALL https://github.com/ALL At what point are you seeing this MissingPluginException I would like to be able to reproduce it but I'm not seeing this when I run the example app. Eg: Is this happening when using a specific type of sign in?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FirebaseExtended/flutterfire/issues/1489?email_source=notifications&email_token=AF6SYTDSRCKRA4IPXXATE5LQ5TR47A5CNFSM4JQ7RIJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI2QBGI#issuecomment-573898905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF6SYTE23WRQN5ZVLPYJOJTQ5TR47ANCNFSM4JQ7RIJA .
@altShiftDev would you mind sharing your error? The one seen in the original post Unhandled Exception: MissingPluginException(No implementation found for method startListeningAuthState on channel plugins.flutter.io/firebase_auth)
should no longer happen.
@kroikie I get this after waiting 5min+ for it to build in debug mode:
Exception has occurred.
MissingPluginException (MissingPluginException(No implementation found for method startListeningAuthState on channel plugins.flutter.io/firebase_auth))
Which breaks on line 26 of firebase_user_repository.dart. Then in the debug console I see the following after stepping through the initial crash:
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method startListeningAuthState on channel plugins.flutter.io/firebase_auth)
[38;5;244m#0 MethodChannel.invokeMethod[39;49m
<asynchronous suspension>
[38;5;248m#1 MethodChannelFirebaseAuth.onAuthStateChanged.<anonymous closure>[39;49m
[38;5;244m#2 _runGuarded (dart:async/stream_controller.dart:807:24)[39;49m
[38;5;244m#3 _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:215:7)[39;49m
[38;5;244m#4 _ControllerStream._createSubscription (dart:async/stream_controller.dart:820:19)[39;49m
[38;5;244m#5 _StreamImpl.listen (dart:async/stream_impl.dart:474:9)[39;49m
[38;5;244m#6 new _ForwardingStreamSubscription (dart:async/stream_pipe.dart:125:10)[39;49m
[38;5;244m#7 _ForwardingStream._createSubscription (dart:async/stream_pipe.dart:93:16)[39;49m
[38;5;244m#8 _ForwardingStream.listen (dart:async/stream_pipe.dart:88:12)[39;49m
#9 n<…>
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method startListeningAuthState on channel plugins.flutter.io/firebase_auth)
[38;5;244m#0 MethodChannel.invokeMethod[39;49m
<asynchronous suspension>
[38;5;248m#1 MethodChannelFirebaseAuth.onAuthStateChanged.<anonymous closure>[39;49m
[38;5;244m#2 _runGuarded (dart:async/stream_controller.dart:807:24)[39;49m
[38;5;244m#3 _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:215:7)[39;49m
[38;5;244m#4 _ControllerStream._createSubscription (dart:async/stream_controller.dart:820:19)[39;49m
[38;5;244m#5 _StreamImpl.listen (dart:async/stream_impl.dart:474:9)[39;49m
[38;5;244m#6 new _ForwardingStreamSubscription (dart:async/stream_pipe.dart:125:10)[39;49m
[38;5;244m#7 _ForwardingStream._createSubscription (dart:async/stream_pipe.dart:93:16)[39;49m
[38;5;244m#8 _ForwardingStream.listen (dart:async/stream_pipe.dart:88:12)[39;49m
#9 n<…>
@altShiftDev firebase_user_repository.dart
is not a file in the firebase_auth
plugin. I'm looking for the firebase_auth
call that is resulting in this exception.
@kroikie well, that's where it breaks...
FirebaseUserRepository({FirebaseAuth firebaseAuth})
: _firebaseAuth = firebaseAuth ?? FirebaseAuth.instance,
_fcm = FirebaseMessaging() {
_firebaseAuth.onAuthStateChanged.listen(_onAuthStateChanged); // this is where the exception is thrown.
}
That helps, I will take a look. Thanks.
@kroikie This issue seems to be specific to the firebase_auth
plugin.
So I got this working. I don't know if this is going to work for others, but here's what I did.
platform :ios, '9.3'
in ios/Podfile
flutter clean
Pods.lock
filecd ios
then pod install
flutter run
I'm actually surprised that this resolved my problem, and a bit concerned that this might resurface again. But maybe this will work for someone else so I figured I'd post it.
@syedz Thanks for posting that. The error itself is strange to me since MissingPluginException(No implementation found for method...
errors indicate there is some method on the Dart side of the channel that is not implemented on the native side. This is not the case for startListeningAuthState
as it is implemented on iOS.
I'll leave this open for anyone else that can provide repro steps but I will remove the regression label.
Any update on this issue? I don't think this problem is hard to reproduce..
@Ehesp @kroikie
If you need my system flutter doctor/run logs, you can find them in the above issue that @helenaford closed and consolidated in favor of this issue.
I see a blocked: customer response
label on this set in December. To reproduce the issue In my case, it is as simple as just calling the verifyPhoneNumber
method during the sign in process.
This issue is blocking my app from releasing on iOS. I would be more than happy to answer any follow up questions. Thanks!
Any update here?? We have been waiting for over a month for the release. Not able to test it on iphone !
I'm facing the same issue on Android Platform. I'm trying Phone Number Authentication. However, it shows the same thing. Is it possible that we didn't put something in the gradle.build files that is causing this issue?
I solved the issue by adding the following dependencies to my app level "build.gradle" file, I also changed the gradle version and changed it to 6.4. Also, adding crashlytics dependency to this file may cause issues if you haven't followed the proper process for using crashlytics on your Flutter app.
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.google.firebase:firebase-analytics:17.4.1"
implementation "com.google.firebase:firebase-database:19.3.0"
implementation "com.google.firebase:firebase-storage:19.1.1"
}
However, it is to be noted that Flutter should have something to display the crashes caused by crashlytics or due to incomplete dependencies.
I'm facing this issue on firebase_auth: ^0.16.0
too
To everyone still affected by this issue, this is what finally worked for me -
You need to register the plugin with the AppDelegate using
GeneratedPluginRegistrant.register(with: self)
If you are using the AppDelegate.swift file as instructed during firebase setup, you need to replace it with -
import UIKit
import Firebase
import Flutter
@UIApplicationMain
class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) // YES;
}
}
For Objective-C users, the AppDelegate.m should look like this ( thanks to https://github.com/flutter/flutter/issues/28874#issuecomment-486359780 ) -
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@import UIKit;
@import Firebase;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FIRApp configure];
[GeneratedPluginRegistrant registerWithRegistry:self];
return [super application:application didFinishLaunchingWithOptions:launchOptions]; // YES;
}
@end
Thanks @rohandalvi . Your solution worked for me!
To be clear. I updated my AppDelegate.swift with the following body & my IOS build succeeds per usual. .................................................................................................................... @UIApplicationMain class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil ) -> Bool { FirebaseApp.configure() GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) // YES; }
delete .flutter-plugins and .flutter-plugins-dependencies and finally pub get
Hey @syedz. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@syedz if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Whenever I run my iPhone app I get the following error. However, the same code on Android runs just fine. It looks like iPhone doesn't want to connect to Firebase, but not completely sure. The build is just fine and it loads in the iPhone simulator, but nothing is being returned from Firestore, instead I get the following:
Here is my pubspec.yaml:
Here is my
flutter doctor -v
Any help would be really appreciated. I can provide more details if needed.