Error running flutter project using Firebase Database - firebase

I've been having this issue after adding firebase_database: ^7.0.0-dev.2 to my project. I've also looked at other issues on GitHub, here on S/O, and on the Flutter repo but to no success.
Some of the troubleshooting attempts I have tried include:
deleting the pod files, Podfile, Podfile.lock, etc.
running flutter clean and flutter pub get
running pod install
I've created a new flutter project and added firebase_core: ^1.1.0 and firebase_database: ^7.0.0-dev.2 to the pubspec.yaml. Therefore, I know the issue is not because of dependency conflicts with other flutter packages in my project.
Here is the output from the debug log when I try to run it on a simulator:
Launching lib/main.dart on iPad Pro (12.9-inch) (2nd generation) in debug mode...
Running pod install... 1,832ms
Running Xcode build...
Xcode build done. 3.4s
Failed to build iOS app
Error output from Xcode build:
↳
objc[4399]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1f1f7c188) and ?? (0x117eb02b8). One of the two will be used. Which one is undefined.
objc[4399]: Class AMSupportURLSession is implemented in both ?? (0x1f1f7c1d8) and ?? (0x117eb0308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m:22:9: fatal error:
'FirebaseCore/Sources/Private/FirebaseCoreInternal.h' file not found
#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m:22:9: note: did not find header
'Sources/Private/FirebaseCoreInternal.h' in framework 'FirebaseCore' (loaded from '/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/build/ios/Debug-iphonesimulator/FirebaseCore')
1 error generated.
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Core/View/FView.m:18:
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Api/Private/FIRDatabaseQuery_Private.h:19:
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Core/FRepo.h:17:
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Core/FPersistentConnection.h:19:
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Realtime/FConnection.h:17:
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.h:17:
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Utilities/FUtilities.h:17:9: fatal error: 'FirebaseCore/Sources/Private/FirebaseCoreInternal.h'
file not found
#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Utilities/FUtilities.h:17:9: note: did not find header 'Sources/Private/FirebaseCoreInternal.h'
in framework 'FirebaseCore' (loaded from '/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/build/ios/Debug-iphonesimulator/FirebaseCore')
1 error generated.
In file included from /Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/FValueIndex.m:21:
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Utilities/FUtilities.h:17:9: fatal error: 'FirebaseCore/Sources/Private/FirebaseCoreInternal.h'
file not found
#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Utilities/FUtilities.h:17:9: note: did not find header 'Sources/Private/FirebaseCoreInternal.h'
in framework 'FirebaseCore' (loaded from '/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/build/ios/Debug-iphonesimulator/FirebaseCore')
1 error generated.
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Core/View/FValueEventRegistration.m:18:9: fatal error:
'FirebaseCore/Sources/Private/FirebaseCoreInternal.h' file not found
#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/FirebaseDatabase/FirebaseDatabase/Sources/Core/View/FValueEventRegistration.m:18:9: note: did not find header
'Sources/Private/FirebaseCoreInternal.h' in framework 'FirebaseCore' (loaded from '/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/build/ios/Debug-iphonesimulator/FirebaseCore')
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'leveldb-library' from project 'Pods')
/Users/hetpatel/Documents/MobileApps/FlutterProjects/flutter_application_1/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPad Pro (12.9-inch) (2nd generation).

Found a workaround for now:
dropped firebase_core to version "0.7.0" and firebase_database to ^6.0.0

Related

I can't configure MacOS project to work with Firebase

I have added the GoogleService-info-plist to the project.
I have checked and both the MacOs project and the Firebase's project have the same BundleID.
I also had donde several projects with iOS/SWiftUI and Firebase with no issues.
This is the first time I'm trying to connect Firebase to a MacOs project.
I have also deleted the GoogleService-info-plist file from the MacOs project, downloaded it again and added it via the XCode project/Add file process but I'm still getting this crash message...
2022-01-13 11:03:44.260253-0500 WebScraper[33494:19053189] 8.10.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
2022-01-13 11:03:44.268425-0500 WebScraper[33494:19052756] *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'FirebaseApp.configure() could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.
Any ideas?

Error Occurred in apple silicon chip while integrating firebase with flutter ,Some one can help me to clear this error

Xcode build done. 4.8s
Failed to build iOS app
Error output from Xcode build:
↳
objc[15838]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x207666c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x113fe82b8). One of the two will be used. Which one is undefined.
objc[15838]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x207666c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x113fe8308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
3
/Users/jp/flutterProjects/flutter_authen_mac/ios/Flutter/Debug.xcconfig:3:1: error: could not find included file 'Pods-Runner.debug.xcconfig' in search paths
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

Flutter Firebase Auth Library causes error in Apple M1 Silicon

I'm developing flutter application in Apple M1 Silicon.It was working correctly before I added firebase Auth Library. After I added the firebase_auth: ^0.18.2 dependency in pubspect.yaml file I'm getting errors like below , what went wrong here. Thank you
My logs
Prasaths-MacBook-Pro:qwe prasathsivanathan$ flutter run
Launching lib/main.dart on iPhone 8 in debug mode...
Running pod install... 2,826ms
Running Xcode build...
Xcode build done. 3.6s
Failed to build iOS app
Error output from Xcode build:
↳
objc[45832]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ba8188) and ??
(0x11b7042b8). One of the two will be used. Which one is undefined.
objc[45832]: Class AMSupportURLSession is implemented in both ?? (0x204ba81d8) and ?? (0x11b704308).
One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test3/qwe/ios/Pods/GoogleUtilities/GoogleUtilities/
Logger/GULLogger.m:130:20: warning: this old-style function definition is not preceded by a prototype
[-Wstrict-prototypes]
void GULResetLogger() {
^
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test3/qwe/ios/Pods/GoogleUtilities/GoogleUtilities/
Logger/GULLogger.m:135:29: warning: this old-style function definition is not preceded by a prototype
[-Wstrict-prototypes]
aslclient getGULLoggerClient() {
^
]
^
4 warnings generated.
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test3/qwe/ios/Pods/FirebaseCore/FirebaseCore/Source
s/FIRLogger.m:61:28: warning: this old-style function definition is not preceded by a prototype
[-Wstrict-prototypes]
void FIRLoggerInitializeASL() {
^
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test3/qwe/ios/Pods/FirebaseCore/FirebaseCore/Source
s/FIRLogger.m:104:20: warning: this old-style function definition is not preceded by a prototype
[-Wstrict-prototypes]
void FIRResetLogger() {
^
2 warnings generated.
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements
use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in
target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 8.
Error is I'm using Xcode beta 2 version. Still Xcode beta has some
issues with some library and Xcode Simulator not works.
or
Try to add Developer Certificate into your X-Code

Flutter trying to installing packages

No matter which package I tried to install when running on iOS simulator get an error the same no matter which package.
fatal error: module 'name of the module I'm trying' not found
Is a new MacBook Air, so I can't emulate Android to see if is the same.
Been days stuck here
This is the output:
Failed to build iOS app Error output from Xcode build: ↳
objc[94975]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1faf938f0) and ?? (0x11acac2b8). One of the two will be
used. Which one is undefined.
objc[94975]: Class AMSupportURLSession is implemented in both ?? (0x1faf93940) and ?? (0x11acac308). One of the two will be used. Which
one is undefined.
** BUILD FAILED **
Xcode's output: ↳
/Users/rafy/Desktop/Flutter_App_with_Android_Studio/cte_baberia/ios/Runner/GeneratedPluginRegistrant.m:10:9:
fatal error: module 'firebase_auth' not found
#import firebase_auth;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To
resolve this, select a development team in the Runner editor. (in
target 'Runner' from project 'Runner')
Could not build the application for the simulator. Error launching
application on iPhone 12 Pro Max.
Please run a flutter clean and then post the outputs when you run these commands:
pub get
and
flutter build ios

I can't build ios in flutter with google sign in package

I can't build ios with google sign in package in flutter.
How can I do for this?
Best Regards
Launching lib/main.dart on iPhone X in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 10.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/joeandrei/Documents/lastMyhaircut/myhaircut/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.m:19:
/Users/joeandrei/Documents/lastMyhaircut/myhaircut/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.h:38:1: error: expected ','
API_UNAVAILABLE(macCatalyst)
^
In module 'Foundation' imported from /Users/joeandrei/Documents/lastMyhaircut/myhaircut/ios/Pods/AppAuth/Source/iOS/OIDExternalUserAgentIOSCustomBrowser.h:19:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/os/availability.h:93:171: note: expanded from macro 'API_UNAVAILABLE'
#define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE6, __API_UNAVAILABLE5, __API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)
^
1 error generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone X.
Change it to google_sign_in: 4.0.6 without the '^' and run flutter clean and build again
I got the same error and did open an issue on github: https://github.com/FirebaseExtended/flutterfire/issues/1772

Resources