Skip to content

🐛 [FirebaseCore] iOS App Initialization Crashing - Attempting an Android App? #7689

@bretmh

Description

@bretmh

Bug report

Describe the bug
When using the following API to initialize my DEFAULT app I get a runtime expectation for using an incorrect GOOGLE_APP_ID in my GoogleService-Info.plist. I've added some prints to the library code and it's attempting to initialize two firebase apps.

The first app is my ios Firebase App, which seems to be fine.

2021-12-23 10:58:01.337633-0800 Runner[62112:1719391] __FIRAPP_DEFAULT
2021-12-23 10:58:01.337787-0800 Runner[62112:1719391] stuff:stuff:ios:stuff
2021-12-23 10:58:01.353442-0800 Runner[62112:1719684] 8.9.0 - [Firebase/Core][I-COR000005] No app has been configured yet.

Right after, it's trying to initialize an android app as well which is where the error occurs.

2021-12-23 10:58:02.503859-0800 Runner[62112:1719391] 1:893399768541:android:8592f4f96e7e13d77d2a34
2021-12-23 10:58:02.504216-0800 Runner[62112:1719689] 8.9.0 - [Firebase/Core][I-COR000009] The GOOGLE_APP_ID either in the plist file 'GoogleService-Info.plist' or the one set in the customized options is invalid. If you are using the plist file, use the iOS version of bundle identifier to download the file, and do not manually edit the GOOGLE_APP_ID. You may change your app's bundle identifier to 'com.myapp.ios'. Or you can download a new configuration file that matches your bundle identifier from https://console.firebase.google.com/ and replace the current one.
2021-12-23 10:58:02.512000-0800 Runner[62112:1719391] *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in GoogleService-Info.plist or set in the customized options.'

This seemed to begin happening around the time of using the flutterfire cli to configure and initialize using a generated firebase options class. I've added and removed the plist file many times and

Steps to reproduce

Steps to reproduce the behavior:
I do not have reproducible steps. It might be related to the flutterfire cli and possibly choosing the wrong firebase app at one point.

Expected behavior

Initialization as usual

Sample project

No new app seems to be doing this


Additional context

There is a single GoogleService-Info.plist in my Runner folder. I'm really unsure of how it could be seeing any android configuration options.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.6 20G165 darwin-x64, locale
    en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.63.2)
[✓] Connected device (3 available)

• No issues found!


Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 2.15.1
Flutter SDK 2.8.1
myapp_entry 1.0.0+1

dependencies:
- authy 0.2.0 [flutter flutter_bloc firebase_core firebase_auth cloud_functions cloud_firestore equatable get_it esp_blufi mockito barcode_scan2]
- cloud_firestore 2.5.4 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 3.2.3 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- cupertino_icons 1.0.4
- esp_blufi 1.1.0 [equatable flutter_reactive_ble flutter]
- firebase_core 1.10.5 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_bloc 8.0.0 [flutter bloc provider]
- flutter_launcher_icons 0.9.2 [args image path yaml]
- flutter_reactive_ble 4.0.1 [collection flutter functional_data meta pedantic reactive_ble_mobile reactive_ble_platform_interface]
- permission_handler 8.3.0 [flutter meta permission_handler_platform_interface]
- syncfusion_flutter_sliders 19.4.38 [flutter intl syncfusion_flutter_core]

dev dependencies:
- flutter_lints 1.0.4 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- _fe_analyzer_shared 31.0.0 [meta]
- analyzer 2.8.0 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- archive 3.1.6 [crypto path]
- args 2.3.0
- async 2.8.2 [collection meta]
- barcode_scan2 4.2.0 [flutter protobuf]
- bloc 8.0.1 [meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 2.2.0 [analyzer async convert crypto glob logging meta path]
- built_collection 5.1.1
- built_value 8.1.3 [built_collection collection fixnum meta]
- characters 1.2.0
- charcode 1.3.1
- cli_util 0.3.5 [meta path]
- clock 1.1.0
- cloud_firestore_platform_interface 5.4.9 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.6.4 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- cloud_functions_platform_interface 5.0.18 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.2.4 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- code_builder 4.1.0 [built_collection built_value collection matcher meta]
- collection 1.15.0
- convert 3.0.1 [typed_data]
- crypto 3.0.1 [collection typed_data]
- dart_style 2.2.1 [analyzer args path pub_semver source_span]
- equatable 2.0.3 [collection meta]
- fake_async 1.2.0 [clock collection]
- file 6.1.2 [meta path]
- firebase_auth 3.3.4 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_auth_platform_interface 6.1.9 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.3.5 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.2.3 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.5.3 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- fixnum 1.0.0
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- functional_data 1.0.0 [meta collection]
- get_it 7.2.0 [async collection]
- glob 2.0.2 [async collection file path string_scanner]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- image 3.1.0 [archive meta xml]
- intl 0.17.0 [clock path]
- js 0.6.3
- lints 1.0.1
- logging 1.0.2
- matcher 0.12.11 [stack_trace]
- meta 1.7.0
- mockito 5.0.16 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api]
- nested 1.0.0 [flutter]
- package_config 2.0.2 [path]
- path 1.8.0
- pedantic 1.11.1
- permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface]
- petitparser 4.4.0 [meta]
- plugin_platform_interface 2.0.2 [meta]
- protobuf 2.0.1 [fixnum collection]
- provider 6.0.1 [collection flutter nested]
- pub_semver 2.1.0 [collection meta]
- reactive_ble_mobile 4.0.1 [flutter protobuf reactive_ble_platform_interface]
- reactive_ble_platform_interface 4.0.1 [collection flutter functional_data meta plugin_platform_interface]
- sky_engine 0.0.99
- source_gen 1.2.1 [analyzer async build dart_style glob meta path source_span yaml]
- source_span 1.8.1 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- syncfusion_flutter_core 19.4.38 [vector_math flutter]
- term_glyph 1.2.0
- test_api 0.4.3 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0 [collection]
- vector_math 2.1.1
- watcher 1.0.1 [async path]
- xml 5.3.1 [collection meta petitparser]
- yaml 3.1.0 [collection source_span string_scanner]

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: invalidThis doesn't seem right and might not belong here.type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions