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

Firebase app not yet configured. #13534

Closed
theankurkedia opened this issue Dec 13, 2017 · 9 comments
Closed

Firebase app not yet configured. #13534

theankurkedia opened this issue Dec 13, 2017 · 9 comments

Comments

@theankurkedia
Copy link
Contributor

theankurkedia commented Dec 13, 2017

Steps to Reproduce

I am using these packages

  • google_sign_in: "^0.3.1"
  • firebase_analytics: "^0.1.0"
  • firebase_auth: "^0.2.0"
  • firebase_database: "^0.1.0"
  • firebase_storage: "^0.0.5"

After I ran flutter upgrade, this happened. Before upgrade, it was running perfectly.

Logs

[Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. Read more: https://goo.gl/ctyzm8.
[Firebase/Messaging][I-IID001001] FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
[Firebase/Analytics][I-ACS023007] Firebase Analytics v.3900000 started
[Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
[Firebase/Analytics][I-ACS003007] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
Lost connection to device.
Syncing files to device iPhone 7...

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.6 16G1036, locale en-IN, channel alpha)
• Flutter at /Users/ankurkedia/flutter
• Framework revision 8f65fec (14 hours ago), 2017-12-12 09:50:14 -0800
• Engine revision edaecdc
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.1)
• Android SDK at /Users/ankurkedia/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-26, build-tools 26.0.1
• ANDROID_HOME = /Users/ankurkedia/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_112-release-b06)

[-] iOS toolchain - develop for iOS devices (Xcode 9.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.1, Build version 9B55
• ios-deploy 1.9.1
✗ ios-deploy out of date (1.9.2 is required). To upgrade:
brew upgrade ios-deploy
• CocoaPods version 1.3.1

[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.2.2)
• Flutter plugin version 16.0
• Dart plugin version 172.3757.55

[✓] Connected devices
• iPhone 7 • 9590E7DE-F209-4559-B3A6-86787C7D01AC • ios • iOS 11.1 (simulator)

@Arno-Z
Copy link

Arno-Z commented Dec 15, 2017

@procedurallygenerated
Copy link

@theankurkedia How did you solve this?

@theankurkedia
Copy link
Contributor Author

@varunvairavan I made a mistake of adding bundle id in the wrong place, So, I just followed the tutorial again and corrected the mistake.

@ColorFuzzy
Copy link

worked for me:
Put [FIRApp configure]; before [GeneratedPluginRegistrant registerWithRegistry:self]

@dark-chocolate
Copy link

@ColorFuzzy
import Firebase gives me a nice error
Expected ';' after top level declarator

And after adding semicolon at the end, it again nicely tells me
Unknown type name 'import'

How were you able to call [FIRApp configure];

@ColorFuzzy
Copy link

@ColorFuzzy
import Firebase gives me a nice error
Expected ';' after top level declarator

And after adding semicolon at the end, it again nicely tells me
Unknown type name 'import'

How were you able to call [FIRApp configure];

My file content bellow
ios/Runner/AppDelegate.h

#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>

@import Firebase;

@interface AppDelegate : FlutterAppDelegate

@end

ios/Runner/AppDelegate.m

#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [FIRApp configure];

  [GeneratedPluginRegistrant registerWithRegistry:self];
  // Override point for customization after application launch.
  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

@end

@dark-chocolate
Copy link

Thanks buddy, actually it was my silly mistake.

I was using import Firebase (syntax for Swift) instead of using @import Firebase; (syntax of Objective C)

@yasinarik
Copy link

**For swift version:

Change the AppDelegate.swift file:**

`import UIKit
import Flutter
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
FirebaseApp.configure()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}`

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants