flutterfire No app has been configured yet. Error retrieving thread information: (ipc/send) invalid destination port

Viewed 5432

I made a new app and did the steps in Decs but when I run the app, it is run correctly but still has errors on the console.

This error 6.26.0 - [Firebase/Core][I-COR000005] No app has been configured yet. show on the console just when i run the app on simulator for the first time then when i run it again it isn't shown on the console.

my console errors:

Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
Xcode build done.                                           21.1s
6.26.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
Waiting for iPhone 11 Pro to report its views...
Debug service listening on ws://127.0.0.1:57659/LoVj1aW15Pg=/ws
Syncing files to device iPhone 11 Pro...

I put FirebaseSDKVersion on my podfile like this

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'

# Override Firebase SDK Version
FirebaseSDKVersion = '21.1.0'

my pub file

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3
  firebase_core: ^0.5.0
  firebase_auth: "^0.18.0+1"

I used the same StatefulWidget examples of Docs in my testing code ...

import 'package:flutter/material.dart';

// Import the firebase_core plugin
import 'package:firebase_core/firebase_core.dart';

void main() {
  runApp(App());
}

class App extends StatefulWidget {
  _AppState createState() => _AppState();
}

class _AppState extends State<App> {
  // Set default `_initialized` and `_error` state to false
  bool _initialized = false;
  bool _error = false;

  // Define an async function to initialize FlutterFire
  void initializeFlutterFire() async {
    try {
      // Wait for Firebase to initialize and set `_initialized` state to true
      await Firebase.initializeApp();
      setState(() {
        _initialized = true;
      });
    } catch (e) {
      // Set `_error` state to true if Firebase initialization fails
      setState(() {
        _error = true;
      });
    }
  }

  @override
  void initState() {
    initializeFlutterFire();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    // Show error message if initialization failed
    if (_error) {
      return MaterialApp(
        home: Scaffold(
          body: Center(
            child: Text('Error 1'),
          ),
        ),
      );
    }

    // Show a loader until FlutterFire is initialized
    if (!_initialized) {
      return MaterialApp(
        home: Scaffold(
          body: Center(
            child: Text('loading'),
          ),
        ),
      );
    }

    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text(' my awesome app'),
        ),
      ),
    );
  }
}

1 Answers

I've tried following your instruction, then running the code for the first time:

This is my output in my console:

Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
Xcode build done.                                            9.5s
Debug service listening on ws://127.0.0.1:64016/mUYWhxsVDdk=/ws
Syncing files to device iPhone 11...

No error has been detected and been able to display the output in my simulator:

enter image description here

Here is my flutter doctor -v

[✓] Flutter (Channel stable, 2.0.6, on macOS 11.4 20F71 darwin-x64, locale en)
    • Flutter version 2.0.6 at /Users/user/Developer/flutter
    • Framework revision 1d9032c7e1 (8 weeks ago), 2021-04-29 17:37:58 -0700
    • Engine revision 05e680e202
    • Dart version 2.12.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/user/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (3 available)
    • sdk gphone x86 arm (mobile) • emulator-5554                        • android-x86    • Android 11 (API 30) (emulator)
    • iPhone 11 (mobile)          • 7D4A169F-C71D-4B28-8673-4504E28E8919 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 91.0.4472.114

• No issues found!

I used the latest version of Flutter.

Related