After updating to the latest Firebase iOS SDK 6.30.0 with PerformanceMonitoring 3.3.0 using Cocoapods, I have started experiencing the following crash consistently across all iOS versions (iOS 9.0 - iOS 14.0), simulators/devices. The crash does not occur in the previous Firebase SDK 6.29.0 and below.
Thread 3 Queue : com.google.perf.FPREventsQueue (serial)
#0 0x000000010bae3080 in GPBCreateMessageWithAutocreator at /Users/ccaba/Projects/iOSAdswizzSDK/AdswizzSDK/AdswizzSDK/protobuf/GPBMessage.m:626
#1 0x000000010baa2b09 in GPBGetObjectIvarWithField at /Users/ccaba/Projects/iOSAdswizzSDK/AdswizzSDK/AdswizzSDK/protobuf/GPBUtilities.m:605
#2 0x000000010b949962 in FPRGetApplicationInfoMessage ()
#3 0x000000010b9496f3 in FPRGetPerfMetricMessage ()
#4 0x000000010b939477 in __22-[FPRClient logTrace:]_block_invoke ()
#5 0x000000010c379f11 in _dispatch_call_block_and_release ()
...
Sorry if this has already been addressed.
Starting with the 6.23.0 release, FirebaseProtobufBinary must also be included.
ref: https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md
Starting with the 6.23.0 release, if you're using FirebaseMessaging, FirebasePerformance, FirebaserRemoteConfig, FirebaseABTesting, FirebaseInAppMessaging, or FirebaseML, FirebaseProtobufBinary must also be included.
Related
I have initialized Firebase in different ways.
1.
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
#override
void initState() {
super.initState();
Firebase.initializeApp().whenComplete(() {
print("completed");
setState(() {});
});
}
including using FirebaseOption and adding appId, apiKey, projectId, messgingSenderId(dummy id)
//Using a FutureBuilder
atm these libraries are present:
firebase_core: ^1.10.6
firebase_auth: ^3.3.7
cloud_firestore: ^3.1.8
firebase_database: ^9.0.6
firebase_core_platform_interface: ^4.2.4
GogleService-Info.plsit is under flutterProject>ios>Runner
added via Xcode
I'm using a mac
Podfile has platform: ios, '11.0'
printing snapshot.connectionState = waiting & done
I receive an error when trying to persist to the database
I'm using FireStore Database
when trying to persist to the database using the Andriod emulator, I do not receive an error. obj is persisted.
but when trying to persist the same obj using the ios simulator I receive this error:
[core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
When the exception was thrown, this was the stack:
#0 MethodChannelFirebase.app (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:159:5)
#1 Firebase.app (package:firebase_core/src/firebase.dart:55:41)
#2 FirebaseFirestore.instance (package:cloud_firestore/src/firestore.dart:27:21)
#3 _firestore (package:flutter_shopping_app_fraire/providers/products.dart:6:56)
#4 _firestore (package:flutter_shopping_app_fraire/providers/products.dart)
#5 Products.addProduct (package:flutter_shopping_app_fraire/providers/products.dart:71:5)
#6 _EditProductScreenState._saveForm (package:flutter_shopping_app_fraire/screens/edit_product_screen.dart:111:53)
#7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:989:21)
#8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24)
#9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:608:11)
#10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:296:5)
#11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:230:7)
#12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:563:9)
#13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:94:12)
#14 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:139:9)
#15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:539:8)
#16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:137:18)
#17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:123:7)
#18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:439:19)
#19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:419:22)
#20 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:322:11)
#21 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
#22 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
#23 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
#24 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
#28 _invoke1 (dart:ui/hooks.dart:170:10)
#29 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:331:7)
#30 _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)
(elided 3 frames from dart:async)
Handler: "onTap"
Recognizer: TapGestureRecognizer#32df4
debugOwner: GestureDetector
state: possible
won arena
finalPosition: Offset(372.7, 95.0)
finalLocalPosition: Offset(30.7, 48.0)
button: 1
sent tap down
If you have followed all necessary implementation from google docs. Just do the following. I've faced the same issue. Adding options fixed mine.
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
Not sure exactly where I went wrong when implementing firebase/firestore into my flutter project(I was doing everything manually), but I got the ios simulator to connect with firestore database by registering my ios app using FlutterFire CLI.
so instead of manually creating a new firebase project, and registering my ios and android apps through my firebase console, I installed Firebase CLI to my project, then installed FlutterFire CLI and ran flutterfire configure, You go through a couple prompts. That created my project and also registered my apps.
It was really that simple and now both of my ios and andriod can reach the database.
I have an issue with fetching some data from Cloud Firestore in my flutter project. Code is as follows:
void test () async {
var data = await Firestore.instance.collection("markers").getDocuments();
print("${data.documents.length}");
}
However, on the console I get the following:
[VERBOSE-2:shell.cc(178)] Dart Error: Unhandled exception:
NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling: []("documents")
#0 Object.noSuchMethod (dart:core/runtime/lib/object_patch.dart:50:5)
#1 new QuerySnapshot._ (file:///Users/jacobpyke/Development/flutter/v1/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.6/lib/src/query_snapshot.dart:10:57)
#2 Query.getDocuments (file:///Users/jacobpyke/Development/flutter/v1/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.6/lib/src/query.dart:100:26)
<asynchronous suspension>
#3 HomePage.test (package:KaffeeBar/screens/home/home_page.dart:39:63)
<asynchronous suspension>
#4 HomePage.build (package:KaffeeBar/screens/home/home_page.dart:45:5)
#5 StatelessElement.build (package:flutter/src/widgets/framework.dart:3788:28)
#6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3735:15)
#7 Element.rebuild (package:flutter/src/widgets/fra<…>
It just struck me as a bit of a strange error. A screenshot of my firestore structure can be seen here: https://imgur.com/a/SeYYlGY
And yes there is data inside the Document, so it shouldnt be returning Null because of no data.
Any help appreciated!
EDIT: Furthermore, all throughout my app the Firestore seems to have stopped working. In some areas its still functions fine, however in some ottthers it returns null values
EDIT2: Seems I tried to compile the app on Android and it flat out doesnt compile due to the Firebase Plugins.
Note: /Users/jacobpyke/Development/flutter/v1/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.3.1+1/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/jacobpyke/Development/flutter/v1/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-4.0.0+1/android/src/main/java/io/flutter/plugins/firebasemessaging/FlutterFirebaseInstanceIDService.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/jacobpyke/Development/flutter/v1/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_performance-0.1.0+4/android/src/main/java/io/flutter/plugins/firebaseperformance/FirebasePerformancePlugin.java:71: error: cannot access zzf
trace.start();
^
class file for com.google.android.gms.internal.firebase-perf.zzf not found
Note: /Users/jacobpyke/Development/flutter/v1/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_performance-0.1.0+4/android/src/main/java/io/flutter/plugins/firebaseperformance/FirebasePerformancePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
EDIT 3: After Getting the App to compile, it works perfectly fine on android. So perhaps something wrong with the firebase GoogleInfo-Service.plst
Turns out this issue was a part of a bug within the Cloud Firestore plugin for Flutter. As such, This issue has been resolved as of update 0.9.7. In order to fix the issue, update the cloud firestore plugin in your pubspec.yaml file to cloud_firestore: ^0.9.7 and run flutter packages get Source can be found here
I have developed a iOS keyboard and i am getting some wired error in my crash logs i have search in every where but i didn't find any solution. This is the error i am getting in my error console.
PlugInKit: -[PKService run] + 752
Here is screenshot of the error. can anyone tell me how can i solved this error. error log
#0 (null) in mach_msg_trap ()
#1 (null) in mach_msg ()
#2 (null) in __CFRunLoopServiceMachPort ()
#3 (null) in __CFRunLoopRun ()
#4 (null) in CFRunLoopRunSpecific ()
#5 (null) in GSEventRunModal ()
#6 (null) in UIApplicationMain ()
#7 (null) in _xpc_objc_main ()
#8 (null) in xpc_main ()
#9 (null) in -[NSXPCListener resume] ()
#10 (null) in -[PKService run] ()
#11 (null) in +[PKService main] ()
#12 (null) in +[PKService _defaultRun:arguments:] ()
#13 (null) in NSExtensionMain ()
#14 (null) in start ()
Looks like a problem with the memory.
From the documentation
Memory limits for running app extensions are significantly lower than
the memory limits imposed on a foreground app. On both platforms, the
system may aggressively terminate extensions because users want to
return to their main goal in the host app. Some extensions may have
lower memory limits than others: For example, widgets must be
especially efficient because users are likely to have several widgets
open at the same time.
Are you building an extension keyboard? Are you loading images there?
If you are loading images make sure to use lower resolution and check the color bitmap for each image (sometimes png uses 24bit). Try with jpeg images (you are gonna lose transparency but at least will work) so when you load them it won't take too much memory. For more info about PNG vs JPEG and memory concerns take a look at https://www.cocoanetics.com/2011/10/avoiding-image-decompression-sickness/
Open up the actual crash log file (right click / show in finder from Xcode) and post it here. It contains a lot more info such as exception type, notes and so on that will help you diagnose.
Read up a bit here to give you an idea of what you’ll find in the crash log and how to use it.
https://developer.apple.com/library/archive/technotes/tn2151/_index.html
(Just realized how old this post is, oh well :))
I'm getting a SIGNAL SIGABRT Thread 8 error when I build to my iphone 6, when I build to an emulator there's no problem what so ever, this happened after I updated to the newest version of XCode which was released last february.
The error is:
Assertion failed: (renderSize.x != 0), function - [SCNRenderContextMetal _setupDescription:forPass:isFinalTechnique:],
file /BuildRoot/Library/Caches/com.apple.xbs/Sources/SceneKit/SceneKit-332.6/sources/Core3DRuntime/NewRenderer/SCNRenderContextMetal.mm,
line 688. (lldb)
Why does it work in the emulator but not on an actual device and how can I fix this? Is it that the framework is out-dated?
When I remove everything.. the error only stops once I've removed the following code:
var sceneView = SCNView();
The iOS version is 9.2.1
My app runs fine in the ios 4.3 simulator, but not the ios 5 simulator. I have ios 5 on my iPhone, and my app DOES work on the iPhone.
The app compiles fine in all of these three environments.
In the ios5 simulator, I get the following cryptic thread crash reports.
mig_get_reply_port appears to be the method call with a
0x935d5ef3 <+0012> test %eax,%eax
"EXC_BAD_ACCESS"
Is this a configuration issue?
- #0 0x00000000 in <????> ()
#1 0x935d5ef3 in mig_get_reply_port ()
#2 0x935cf70c in mach_ports_lookup ()
#3 0x01d4b124 in _xpc_domain_init_local ()
#4 0x01d48eb1 in _libxpc_initializer ()
#5 0x8feaa203 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#6 0x8fea9d68 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
()
#7 0x8fea72c8 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#8 0x8fea725e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#9 0x8fea725e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#10 0x8fea725e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#11 0x8fea725e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#12 0x8fea725e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#13 0x8fea725e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#14 0x8fea8268 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
()
#15 0x8fe9c694 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#16 0x8fea0f99 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_ ()
#17 0x8fe9a2ef in __dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_ ()
#18 0x8fe9a063 in __dyld__dyld_start ()
Thanks!
I believe this is a duplicate of questions asked earlier. Check out:
iOS App crashing before entering main() with Xcode 4.2 & iOS 5
Application crashes on simulator 5.0 before reaching main.m
Also, this seems to indicate that this is ultimately a bug in the simulator:
http://www.openradar.me/10464051
Replacing libxml2 to libxml2.2.7.3 worked amongst the various solutions ! :)