Is there an existing issue for this?
Which plugins are affected?
No response
Which platforms are affected?
iOS
Description
On iOS Release mode, i can reproduce 2 crashs.
On Android errors are well catched, app didn't crash.
Reproducing the issue
- Run app
- Click to the first button (crash on prod, not on debug)
- Run app
- Click to the second button (crash on prod and on debug)
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'firebase_options.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
FlutterError.onError = (FlutterErrorDetails errorDetails) {
FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
};
PlatformDispatcher.instance.onError = (Object error, StackTrace stack) {
FirebaseCrashlytics.instance.recordError(error, stack);
return true;
};
runApp(const App());
}
class App extends StatefulWidget {
const App({super.key});
@override
State<App> createState() => _AppState();
}
class _AppState extends State<App> {
@override
Widget build(BuildContext context) {
return const MaterialApp(home: Home());
}
}
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('I love crash')),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ElevatedButton(
onPressed: () async {
try {
await FirebaseFirestore.instance
.collection('teams')
.doc('')
.update(<Object, Object?>{'test': 'test'});
} catch (err, stack) {
debugPrintStack(label: err.toString(), stackTrace: stack);
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(SnackBar(content: Text(err.toString())));
}
},
child: const Text('Update an empty id'),
),
ElevatedButton(
onPressed: () async {
try {
await FirebaseFirestore.instance
.collection('teams')
.doc('test/test')
.update(<Object, Object?>{'test': 'test'});
} catch (err, stack) {
debugPrintStack(label: err.toString(), stackTrace: stack);
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(SnackBar(content: Text(err.toString())));
}
},
child: const Text('Update an id which contain a slash'),
),
],
),
),
);
}
}
Firebase Core version
3.11.0
Flutter Version
3.19.1
Relevant Log Output
Flutter dependencies
Expand Flutter dependencies snippet
Dart SDK 3.7.0
Flutter SDK 3.29.0
dependencies:
- cloud_firestore 5.6.3 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.11.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 4.3.2 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
dev dependencies:
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]
transitive dependencies:
- _flutterfire_internals 1.3.51 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.12.0 [collection meta]
- boolean_selector 2.1.2 [source_span string_scanner]
- characters 1.4.0
- clock 1.1.2
- cloud_firestore_platform_interface 6.6.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.4.3 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- collection 1.19.1
- fake_async 1.3.2 [clock collection]
- firebase_core_platform_interface 5.4.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.20.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_crashlytics_platform_interface 3.8.2 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- leak_tracker 10.0.8 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.9 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- matcher 0.12.17 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.16.0
- path 1.9.1
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.0
- source_span 1.10.1 [collection path term_glyph]
- stack_trace 1.12.1 [path]
- stream_channel 2.1.4 [async]
- string_scanner 1.4.1 [source_span]
- term_glyph 1.2.2
- test_api 0.7.4 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- vector_math 2.1.4
- vm_service 14.3.1
- web 1.1.0
Additional context and comments
Crashlytics logs :
Fatal Exception: FIRInvalidArgumentException
0 CoreFoundation 0x2d5fc __exceptionPreprocess
1 libobjc.A.dylib 0x31244 objc_exception_throw
2 FirebaseFirestoreInternal 0x47528 (Manquant UUID f2f2392429633c96ae6ae9d4aef0c5e5)
3 FirebaseFirestoreInternal 0x46fe8 (Manquant UUID f2f2392429633c96ae6ae9d4aef0c5e5)
4 FirebaseFirestoreInternal 0x27b8c (Manquant UUID f2f2392429633c96ae6ae9d4aef0c5e5)
5 FirebaseFirestoreInternal 0x38700 (Manquant UUID f2f2392429633c96ae6ae9d4aef0c5e5)
6 FirebaseFirestoreInternal 0x59cd4 (Manquant UUID f2f2392429633c96ae6ae9d4aef0c5e5)
7 FirebaseFirestoreInternal 0x79810 (Manquant UUID f2f2392429633c96ae6ae9d4aef0c5e5)
8 Runner 0xbe704 -[FLTFirebaseFirestorePlugin documentReferenceUpdateApp:request:completion:] + 410 (FLTFirebaseFirestorePlugin.m:410)
9 Runner 0xba214 __FirebaseFirestoreHostApiSetup_block_invoke_3.338 + 1132 (FirestoreMessages.g.m:1132)
10 Flutter 0x5e6cd0 (Manquant UUID 4c4c44be55553144a1f84df5f6252bed)
11 Flutter 0x6bb1c (Manquant UUID 4c4c44be55553144a1f84df5f6252bed)
12 libdispatch.dylib 0x2248 _dispatch_call_block_and_release
13 libdispatch.dylib 0x3fa8 _dispatch_client_callout
14 libdispatch.dylib 0x12a34 _dispatch_main_queue_drain
15 libdispatch.dylib 0x1264c _dispatch_main_queue_callback_4CF
16 CoreFoundation 0x79bcc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
17 CoreFoundation 0x761c0 __CFRunLoopRun
18 CoreFoundation 0xc8284 CFRunLoopRunSpecific
19 GraphicsServices 0x14c0 GSEventRunModal
20 UIKitCore 0x3ee674 -[UIApplication _run]
21 UIKitCore 0x14e88 UIApplicationMain
22 UIKitCore 0x75115c keypath_get_selector_hoverStyle
23 Runner 0x8568 main (AppDelegate.swift)
24 ??? 0x1c8811de8 (Manquant)
Is there an existing issue for this?
Which plugins are affected?
No response
Which platforms are affected?
iOS
Description
On iOS Release mode, i can reproduce 2 crashs.
On Android errors are well catched, app didn't crash.
Reproducing the issue
Firebase Core version
3.11.0
Flutter Version
3.19.1
Relevant Log Output
Flutter dependencies
Expand
Flutter dependenciessnippetAdditional context and comments
Crashlytics logs :