Closed Saraalr closed 4 years ago
@Saraalr
Make sure you are adding GoogleService-Info.plist
through XCode too. You cannot simply copy this into the ios/Runner
directory.
GoogleService-Info.plist
on ios/Runner
folder.Runner
and then Add Files...
).@liveplugin
I add it and new error occur Error massage :
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Running Xcode build... Xcode build done. 13.9s Failed to build iOS app Could not build the application for the simulator. Error launching application on iPhone SE (2nd generation). Error output from Xcode build: β³ BUILD FAILED
Xcode's output: β³ /Users/PC/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:764:16: warning: 'timestampsInSnapshotsEnabled' is deprecated [-Wdeprecated-declarations] settings.timestampsInSnapshotsEnabled = (bool)call.arguments[@"timestampsInSnapshotsEnabled"]; ^ In module 'FirebaseFirestore' imported from /Users/PC/Desktop/aproject/ios/Pods/Headers/Public/Firebase/Firebase.h:49: /Users/PC/Desktop/aproject/ios/Pods/FirebaseFirestore/Firestore/Source/Public/FIRFirestoreSettings.h:69:20: note: 'timestampsInSnapshotsEnabled' has been explicitly marked deprecated here attribute((deprecated)); ^ 1 warning generated. error: Build input file cannot be found: '/Users/saraalrabiah/Downloads/GoogleService-Info-4.plist' (in target 'Runner' from project 'Runner') gRPC-C++-dwownretmfyzotdyvoofqfkgmjun note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description
finally, I think the problem related to firebase because I test my project before it and it is work, but I don't know exactly what is it.
@Saraalr
error: Build input file cannot be found: '/Users/saraalrabiah/Downloads/GoogleService-Info-4.plist' (in target 'Runner' from project 'Runner')
You import the plist
file directly from Downloads folder...
Place the file on your ios/Runner
folder and import through XCode.
@liveplugin you mean i have to open ios in xcode then place it under runner?
@Saraalr
Yes.
ios
folder on XCode.Runner
and then Add Files...
@liveplugin I have done the following steps but in Xcode I face this :
and in android studio :
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Running pod install... Running Xcode build... Xcode build done. 11.7s Failed to build iOS app Could not build the application for the simulator. Error launching application on iPhone SE (2nd generation). Error output from Xcode build: β³ BUILD FAILED
Xcode's output: β³ /Users/PC/Desktop/aproject/build/ios/Debug-iphonesimulator/nanopb/nanopb.framework: resource fork, Finder information, or similar detritus not allowed Command CodeSign failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description also in android studio I can't see the plist file is it okay? I mean it doesn't appear under iOS/runner
@Saraalr
it is still not running with this error :
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Running pod install... Running Xcode build... Xcode build done. 12.5s Failed to build iOS app Could not build the application for the simulator. Error launching application on iPhone SE (2nd generation). Error output from Xcode build: β³ BUILD FAILED
Xcode's output: β³ /Users/PC/Desktop/aproject/build/ios/Debug-iphonesimulator/nanopb/nanopb.framework: resource fork, Finder information, or similar detritus not allowed Command CodeSign failed with a nonzero exit code /Users/PC/Desktop/aproject/build/ios/Debug-iphonesimulator/gRPC-C++/gRPCCertificates-Cpp.bundle: replacing existing signature /Users/PC/Desktop/aproject/build/ios/Debug-iphonesimulator/gRPC-C++/gRPCCertificates-Cpp.bundle: resource fork, Finder information, or similar detritus not allowed Command CodeSign failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description
@liveplugin
@Saraalr
Perhaps, now, the problem is the outdated simulator you are using (Phone SE)...
Try another more updated.
@liveplugin android studio error /Users/PC/Desktop/aproject/build/ios/Debug-iphonesimulator/nanopb/nanopb.framework: resource fork, Finder information, or similar detritus not allowed Command CodeSign failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description
and this is Xcode error :
2020-06-26 08:59:11.415553+0300 Runner[22597:159953] Configuring the default Firebase app...
2020-06-26 08:59:11.442836+0300 Runner[22597:160561] 6.27.0 - [Firebase/Core][I-COR000004] App with name FIRAPP_DEFAULT does not exist.
2020-06-26 08:59:11.443059+0300 Runner[22597:160561] 6.27.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
2020-06-26 08:59:11.451800+0300 Runner[22597:160625] flutter: Observatory listening on http://127.0.0.1:52548/7Q61n4uqGuE=/
2020-06-26 08:59:11.480883+0300 Runner[22597:159953] Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure];
(FirebaseApp.configure()
in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
First throw call stack:
(
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cd4c +[NSException raise:format:] + 188
3 Runner 0x00000001037898b2 +[FIRApp configure] + 130
4 Runner 0x0000000103cdff59 -[FLTCloudFirestorePlugin init] + 217
5 Runner 0x0000000103cdfd66 +[FLTCloudFirestorePlugin registerWithRegistrar:] + 262
6 Runner 0x0000000103724fc3 +[GeneratedPluginRegistrant registerWithRegistry:] + 115
7 Runner 0x0000000103725150 $s6Runner11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 176
8 Runner 0x0000000103725483 $s6Runner11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo + 211
9 UIKitCore 0x00007fff48c82698 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
10 UIKitCore 0x00007fff48c84037 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3985
11 UIKitCore 0x00007fff48c89bf9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1226
12 UIKitCore 0x00007fff4839225d -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
13 UIKitCore 0x00007fff4889dcc1 _UIScenePerformActionsWithLifecycleActionMask + 83
14 UIKitCore 0x00007fff48392d6f 101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
15 UIKitCore 0x00007fff4839277e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
16 UIKitCore 0x00007fff48392b9c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818
17 UIKitCore 0x00007fff48392431 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
18 UIKitCore 0x00007fff48396a22 186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178
19 UIKitCore 0x00007fff487b3dad +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 852
20 UIKitCore 0x00007fff488bc41e _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
21 UIKitCore 0x00007fff4839673d 186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
22 UIKitCore 0x00007fff488bc321 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
23 UIKitCore 0x00007fff483965ab -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
24 UIKitCore 0x00007fff481eafa8 64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
25 UIKitCore 0x00007fff481e9b67 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
26 UIKitCore 0x00007fff481eacd2 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
27 UIKitCore 0x00007fff48c88141 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 512
28 UIKitCore 0x00007fff487da8dc -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
29 FrontBoardServices 0x00007fff36cacd2e -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 419
30 FrontBoardServices 0x00007fff36cd2dc1 86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
31 FrontBoardServices 0x00007fff36cb7757 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
32 FrontBoardServices 0x00007fff36cd2a52 86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
33 libdispatch.dylib 0x00000001095ece8e _dispatch_client_callout + 8
34 libdispatch.dylib 0x00000001095efda2 _dispatch_block_invoke_direct + 300
35 FrontBoardServices 0x00007fff36cf86e9 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30
36 FrontBoardServices 0x00007fff36cf83d7 -[FBSSerialQueue _queue_performNextIfPossible] + 441
37 FrontBoardServices 0x00007fff36cf88e6 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
38 CoreFoundation 0x00007fff23da0d31 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
39 CoreFoundation 0x00007fff23da0c5c CFRunLoopDoSource0 + 76
40 CoreFoundation 0x00007fff23da0434 CFRunLoopDoSources0 + 180
41 CoreFoundation 0x00007fff23d9b02e CFRunLoopRun + 974
42 CoreFoundation 0x00007fff23d9a944 CFRunLoopRunSpecific + 404
43 GraphicsServices 0x00007fff38ba6c1a GSEventRunModal + 139
44 UIKitCore 0x00007fff48c8b9ec UIApplicationMain + 1605
45 Runner 0x000000010372562b main + 75
46 libdyld.dylib 0x00007fff51a231fd start + 1
47 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
it says that I didn't download plist but I did it following your steps
@Saraalr
Well, in this error I don't know how to help. I suggest you continue researching until you can get around this problem. Good luck!
@Saraalr
I can notice you don't have Firebase in your AppDelegate.swift
Please add this
import UIKit
import Flutter
import Firebase
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
If the problem persist after adding this, can you please provide your flutter doctor -v
your flutter run --verbose
and a complete reproducible minimal code sample
Thank you
@TahaTesser
this is occurs in Xcode :
2020-06-26 18:27:17.987427+0300 Runner[12496:114464] flutter: Observatory listening on http://127.0.0.1:52939/mxWUloO6HVI=/
2020-06-26 18:27:18.030714+0300 Runner[12496:114422] 6.27.0 - [Firebase/Analytics][I-ACS031025] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-06-26 18:27:18.030872+0300 Runner[12496:114422] 6.27.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60601000 started
2020-06-26 18:27:18.031027+0300 Runner[12496:114422] 6.27.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2020-06-26 18:27:18.235238+0300 Runner[12496:114425] 6.27.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-06-26 18:27:18.422243+0300 Runner[12496:114447] flutter: βββ‘ EXCEPTION CAUGHT BY WIDGETS LIBRARY ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2020-06-26 18:27:18.422422+0300 Runner[12496:114447] flutter: The following ProviderNotFoundError was thrown building Wapper(dirty):
2020-06-26 18:27:18.422568+0300 Runner[12496:114447] flutter: Error: Could not find the correct Providercontext
is being used.
2020-06-26 18:27:18.423860+0300 Runner[12496:114447] flutter:
2020-06-26 18:27:18.425281+0300 Runner[12496:114447] flutter: If none of these solutions work, please file a bug at:
2020-06-26 18:27:18.425458+0300 Runner[12496:114447] flutter: https://github.com/rrousselGit/provider/issues
2020-06-26 18:27:18.425618+0300 Runner[12496:114447] flutter:
2020-06-26 18:27:18.425743+0300 Runner[12496:114447] flutter: The relevant error-causing widget was:
2020-06-26 18:27:18.425877+0300 Runner[12496:114447] flutter: Wapper file:///Users/saraalrabiah/Desktop/aproject/lib/main.dart:17:12
2020-06-26 18:27:18.426010+0300 Runner[12496:114447] flutter:
2020-06-26 18:27:18.426141+0300 Runner[12496:114447] flutter: When the exception was thrown, this was the stack:
2020-06-26 18:27:18.426261+0300 Runner[12496:114447] flutter: #0 Provider.of (package:provider/src/provider.dart:264:7)
2020-06-26 18:27:18.426404+0300 Runner[12496:114447] flutter: #1 Wapper.build (package:aproject/general/home.dart:13:27)
2020-06-26 18:27:18.426524+0300 Runner[12496:114447] flutter: #2 StatelessElement.build (package:flutter/src/widgets/framework.dart:4620:28)
2020-06-26 18:27:18.426669+0300 Runner[12496:114447] flutter: #3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4546:15)
2020-06-26 18:27:18.426778+0300 Runner[12496:114447] flutter: #4 Element.rebuild (package:flutter/src/widgets/framework.dart:4262:5)
2020-06-26 18:27:18.426915+0300 Runner[12496:114447] flutter: #5 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4525:5)
2020-06-26 18:27:18.427039+0300 Runner[12496:114447] flutter: #6 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4520:5)
2020-06-26 18:27:18.427189+0300 Runner[12496:114447] flutter: ... Normal element mounting (7 frames)
2020-06-26 18:27:18.427336+0300 Runner[12496:114447] flutter: #13 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3490:14)
2020-06-26 18:27:18.427450+0300 Runner[12496:114447] flutter: #14 Element.updateChild (package:flutter/src/widgets/framework.dart:3258:18)
2020-06-26 18:27:18.427568+0300 Runner[12496:114447] flutter: #15 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1134:16)
2020-06-26 18:27:18.427687+0300 Runner[12496:114447] flutter: #16 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1105:5)
2020-06-26 18:27:18.427824+0300 Runner[12496:114447] flutter: #17 RenderObjectToWidgetAdapter.attachToRenderTree.
and in the simulator:
and in android studio it is remain the same error .
@Saraalr Error in the screenshot and logs are not related flutterfire, it's an issue with your code for provider
This platform is not meant for assistance on personal code. Please see https://flutter.dev/community for resources and asking questions like this, you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/ Closing, as this isn't an issue with flutterfire itself. If you disagree, please write in the comments and I will reopen it. Thank you
My project where work perfectly, but when I add the Firebase and start work on it the I could not open it agin in the simulator the output which I resive
Launching lib/main.dart on iPhone 11 Pro in debug mode... Running Xcode build... Xcode build done. 19.6s Configuring the default Firebase app... Connecting to the VM Service is taking longer than expected... Still attempting to connect to the VM Service... If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details. If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available. Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 60093 This was attempt #50. Will retry in 0:00:01.600000. Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 60230 This was attempt #100. Will retry in 0:00:01.600000.
my flutter doctor Doctor summary (to see all details, run flutter doctor -v): [β] Flutter (Channel master, 1.20.0-1.0.pre.157, on Mac OS X 10.15.5 19F101, locale en-SA)
[β] Android toolchain - develop for Android devices (Android SDK version 29.0.0) [β] Xcode - develop for iOS and macOS (Xcode 11.5) [β] Android Studio (version 3.6) [β] Connected device (1 available)
β’ No issues found! MBPalkhasbSara:~ saraalrabiah$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [β] Flutter (Channel master, 1.20.0-1.0.pre.157, on Mac OS X 10.15.5 19F101, locale en-SA)
[β] Android toolchain - develop for Android devices (Android SDK version 29.0.0) [β] Xcode - develop for iOS and macOS (Xcode 11.5) [β] Android Studio (version 3.6) [β] Connected device (1 available)
β’ No issues found!