Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firestore]: Native crash when launching production app in DocumentReference:DocumentReference() #17227

Closed
1 task done
olostan opened this issue Mar 23, 2025 · 5 comments
Closed
1 task done
Labels
platform: ios Issues / PRs which are specifically for iOS. plugin: cloud_firestore resolution: duplicate This issue or pull request already exists type: bug Something isn't working

Comments

@olostan
Copy link

olostan commented Mar 23, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Storage

Which platforms are affected?

iOS

Description

App running perfectly in Debug mode. However after building release and testing with TestFlight, the app crashes immediately after start:

Image

Can't find any way to debug what caused the issue.

Reproducing the issue

Flutter app with Firestore.

Firebase Core version

3.12

Flutter Version

3.29

Relevant Log Output

0 CoreFoundation                                              _exceptionPreprocess
1 libobjc.A.dylib                   objc_exception_throw
2 Runner  firebase::firestore::util::ObjcThrowHandler(firebase::firestore::util::ExceptionType, char const*, char const*, int, std::__1::basic_string<char, std::__1::char_traits<...   
3 Runner                                                      firebase::firestore::util::Throw(firebase::firestore::util::ExceptionType, char const*, char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::...
void firebase::firestore::util::ThrowInvalidArgument<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long>(char con...
4 Runner                                                      firebase::firestore::api::DocumentReference::DocumentReference(firebase::firestore::model::ResourcePath, std::__1::shared_ptr<firebase::firestore::api::Firestore...   
5 Runner
6 Runner                                                      firebase::firestore::api::Firestore::GetDocument(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
7 Runner  - [FIRFirestore documentWithPath:]   
8 Runner  - [FLTFirebaseFirestorePlugin documentReferenceSnapshotApp:parameters:includeMetadataChanges:source:completion:]
9 Runner                                                                 FirebaseFirestoreHostApiSetup_block_invoke_5.461
10 Flutter                                                               _48-[FlutterBasicMessageChannel setMessageHandler:]_block_invoke
11 Flutter                                                    invocation function for block in flutter::PlatformMessageHandlerLos::HandlePlatformMessage(std::__fl::unique_ptr<flutter::PlatformMessage, std::__fl::default_delet...
12 libdispatch.dylib_dispatch_call_block_and_release
13 libdispatch.dylib_dispatch_client_callout
21 UIKitCore                                                  UIApplicationMain
22 UIKitCore                                                  UIApplicationMain()
23 Runner                                                     specialized static UIApplicationDelegate.main()
24 Runner                                                     static AppDelegate.$main()
25 Runner                                                     main
26 dyld                                                       start
Thread 0
16 UIKitCore                                                  UIApplicationMain
17 UIKitCore                                                  UIApplicationMain()
18 Runner                                                     specialized static UIApplicationDelegate.main()
19 Runner                                                     static AppDelegate.$main()
20 Runner                                                     main
21 dyld                                                       start

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.7.2
Flutter SDK 3.29.2
friendy 0.0.11+11

dependencies:
- audioplayers 6.4.0 [audioplayers_android audioplayers_darwin audioplayers_linux audioplayers_platform_interface audioplayers_web audioplayers_windows file flutter http meta path_provider synchronized uuid]
- cached_network_image 3.4.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image]
- carousel_slider 5.0.0 [flutter]
- cloud_firestore 5.6.5 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 5.3.4 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- connectivity_plus 6.1.3 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- cupertino_icons 1.0.8
- firebase_analytics 11.4.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_app_check 0.3.2+4 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 5.5.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.12.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 4.3.4 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_storage 12.4.4 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_animate 4.5.2 [flutter flutter_shaders]
- flutter_custom_carousel 0.1.0+1 [flutter flutter_animate]
- flutter_hooks 0.21.2 [flutter]
- flutter_launcher_icons 0.14.3 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_markdown 0.7.6+2 [flutter markdown meta path]
- flutter_offline 4.0.0 [flutter connectivity_plus network_info_plus]
- flutter_riverpod 2.6.1 [collection flutter meta riverpod state_notifier]
- flutter_tts 4.2.2 [flutter flutter_web_plugins]
- freezed_annotation 3.0.0 [collection json_annotation meta]
- google_sign_in 6.3.0 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- googleapis 13.2.0 [_discoveryapis_commons http]
- googleapis_auth 1.6.0 [args crypto google_identity_services_web http http_parser]
- hooks_riverpod 2.6.1 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier]
- infinite_carousel 1.1.1 [flutter]
- json_annotation 4.9.0 [meta]
- loading_animation_widget 1.3.0 [flutter]
- overlapped_carousel 1.0.2 [flutter]
- path 1.9.1
- quickalert 1.1.0 [flutter vector_math]
- retry 3.1.2
- riverpod 2.6.1 [collection meta stack_trace state_notifier]
- riverpod_annotation 2.6.1 [meta riverpod]
- rxdart 0.28.0
- shared_preferences 2.5.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sign_in_with_apple 6.1.4 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- speech_to_text 7.0.0 [flutter speech_to_text_platform_interface json_annotation clock pedantic flutter_web_plugins meta web]
- stream_transform 2.1.1
- subscription_tracker 1.0.1

dev dependencies:
- analyzer 7.3.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- build 2.4.2 [analyzer async convert crypto glob logging meta package_config path]
- build_runner 2.4.15 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web web_socket_channel yaml]
- custom_lint 0.7.5 [analyzer analyzer_plugin args async ci cli_util collection custom_lint_core freezed_annotation json_annotation meta package_config path pub_semver pubspec_parse rxdart uuid yaml]
- flutter_lints 5.0.0 [lints]
- 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]
- freezed 3.0.3 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation]
- json_serializable 6.9.4 [analyzer async build build_config collection dart_style json_annotation meta path pub_semver pubspec_parse source_gen source_helper]
- logger 2.5.0
- riverpod_generator 2.6.5 [analyzer build build_config collection crypto meta path riverpod_analyzer_utils riverpod_annotation source_gen]
- riverpod_lint 2.6.5 [analyzer analyzer_plugin collection custom_lint_builder meta path riverpod riverpod_analyzer_utils source_span yaml]
- source_gen 2.0.0 [analyzer async build dart_style glob path pub_semver source_span yaml]
- yaml 3.1.3 [collection source_span string_scanner]

transitive dependencies:
- _discoveryapis_commons 1.0.7 [http http_parser meta]
- _fe_analyzer_shared 80.0.0 [meta]
- _flutterfire_internals 1.3.53 [collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer_plugin 0.13.0 [analyzer collection dart_style pub_semver yaml path]
- archive 4.0.4 [crypto path posix]
- args 2.7.0
- async 2.12.0 [collection meta]
- audioplayers_android 5.2.0 [audioplayers_platform_interface flutter]
- audioplayers_darwin 6.2.0 [audioplayers_platform_interface flutter]
- audioplayers_linux 4.2.0 [audioplayers_platform_interface flutter]
- audioplayers_platform_interface 7.1.0 [collection flutter meta plugin_platform_interface]
- audioplayers_web 5.1.0 [audioplayers_platform_interface flutter flutter_web_plugins web]
- audioplayers_windows 4.2.0 [audioplayers_platform_interface flutter]
- boolean_selector 2.1.2 [source_span string_scanner]
- build_config 1.1.2 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.4 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.4 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 8.0.0 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.9.5 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 4.1.1 [flutter flutter_cache_manager]
- cached_network_image_web 1.3.1 [cached_network_image_platform_interface flutter flutter_cache_manager web]
- characters 1.4.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- ci 0.1.0
- cli_util 0.4.2 [meta path]
- clock 1.1.2
- cloud_firestore_platform_interface 6.6.5 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.4.5 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- cloud_functions_platform_interface 5.6.4 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.10.10 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- code_builder 4.10.1 [built_collection built_value collection matcher meta]
- collection 1.19.1
- connectivity_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- convert 3.1.2 [typed_data]
- crypto 3.0.6 [typed_data]
- custom_lint_builder 0.7.5 [analyzer analyzer_plugin collection custom_lint custom_lint_core custom_lint_visitor glob hotreloader meta package_config path pubspec_parse rxdart]
- custom_lint_core 0.7.5 [analyzer analyzer_plugin collection custom_lint_visitor glob matcher meta package_config path pubspec_parse source_span uuid yaml]
- custom_lint_visitor 1.0.0+7.3.0 [analyzer]
- dart_style 3.0.1 [analyzer args collection package_config path pub_semver source_span yaml]
- dbus 0.7.11 [args ffi meta xml]
- fake_async 1.3.2 [clock collection]
- ffi 2.1.4
- file 7.0.1 [meta path]
- firebase_analytics_platform_interface 4.3.4 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.5.10+10 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- firebase_app_check_platform_interface 0.1.1+4 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.2.0+8 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins web]
- firebase_auth_platform_interface 7.6.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.14.1 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 5.4.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.21.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_crashlytics_platform_interface 3.8.4 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_platform_interface 5.2.4 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.10.11 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web]
- fixnum 1.1.1
- flutter_cache_manager 3.4.1 [clock collection file flutter http path path_provider rxdart sqflite uuid]
- flutter_shaders 0.1.3 [flutter vector_math]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- frontend_server_client 4.0.0 [async path]
- glob 2.1.3 [async collection file path string_scanner]
- google_identity_services_web 0.3.3 [meta web]
- google_sign_in_android 6.2.0 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.8.1 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.5.0 [flutter plugin_platform_interface]
- google_sign_in_web 0.12.4+4 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web]
- graphs 2.3.2 [collection]
- hotreloader 4.3.0 [collection logging path stream_transform vm_service watcher]
- http 1.3.0 [async http_parser meta web]
- http_multi_server 3.2.2 [async]
- http_parser 4.1.2 [collection source_span string_scanner typed_data]
- image 4.5.3 [archive meta xml]
- io 1.0.5 [meta path string_scanner]
- js 0.7.2
- 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]
- lints 5.1.1
- logging 1.3.0
- markdown 7.3.0 [args meta]
- matcher 0.12.17 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.16.0
- mime 2.0.0
- network_info_plus 5.0.3 [collection nm flutter flutter_web_plugins meta network_info_plus_platform_interface win32 ffi]
- network_info_plus_platform_interface 2.0.2 [flutter meta plugin_platform_interface]
- nm 0.5.0 [dbus]
- octo_image 2.1.0 [flutter]
- package_config 2.2.0 [path]
- path_provider 2.1.5 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- path_provider_android 2.2.16 [flutter path_provider_platform_interface]
- path_provider_foundation 2.4.1 [flutter path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- path_provider_windows 2.3.0 [ffi flutter path path_provider_platform_interface]
- pedantic 1.11.1
- petitparser 6.1.0 [meta collection]
- platform 3.1.6
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.1 [async stack_trace]
- posix 6.0.1 [ffi meta path]
- pub_semver 2.2.0 [collection]
- pubspec_parse 1.5.0 [checked_yaml collection json_annotation pub_semver yaml]
- riverpod_analyzer_utils 0.5.10 [analyzer collection crypto custom_lint_core freezed_annotation meta path source_span]
- shared_preferences_android 2.4.8 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.4 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.4.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.4.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.4.3 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.4.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.2 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 3.0.0 [shelf stream_channel web_socket_channel]
- sign_in_with_apple_platform_interface 1.1.0 [flutter plugin_platform_interface meta]
- sign_in_with_apple_web 2.1.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface]
- sky_engine 0.0.0
- source_helper 1.3.5 [analyzer collection source_gen]
- source_span 1.10.1 [collection path term_glyph]
- speech_to_text_platform_interface 2.3.0 [flutter meta plugin_platform_interface]
- sprintf 7.0.0
- sqflite 2.4.2 [flutter sqflite_android sqflite_darwin sqflite_platform_interface sqflite_common path]
- sqflite_android 2.4.1 [flutter sqflite_common path sqflite_platform_interface]
- sqflite_common 2.5.5 [synchronized path meta]
- sqflite_darwin 2.4.2 [flutter sqflite_platform_interface meta sqflite_common path]
- sqflite_platform_interface 2.4.0 [flutter platform sqflite_common plugin_platform_interface meta]
- stack_trace 1.12.1 [path]
- state_notifier 1.0.0 [meta]
- stream_channel 2.1.4 [async]
- string_scanner 1.4.1 [source_span]
- synchronized 3.3.1
- 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]
- timing 1.0.2 [json_annotation]
- typed_data 1.4.0 [collection]
- uuid 4.5.1 [crypto sprintf meta fixnum]
- vector_math 2.1.4
- vm_service 14.3.1
- watcher 1.1.1 [async path]
- web 1.1.1
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.2 [async crypto stream_channel web web_socket]
- win32 5.12.0 [ffi]
- xdg_directories 1.1.0 [meta path]
- xml 6.5.0 [collection meta petitparser]

Additional context and comments

No response

@olostan olostan added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Mar 23, 2025
@SelaseKay
Copy link
Contributor

Hi @olostan, I believe this is a duplicate of #17196

@SelaseKay SelaseKay added resolution: duplicate This issue or pull request already exists plugin: cloud_firestore platform: ios Issues / PRs which are specifically for iOS. and removed Needs Attention This issue needs maintainer attention. labels Mar 24, 2025
@olostan
Copy link
Author

olostan commented Mar 27, 2025

It looks similar but the biggest difference that my issue is only on production builds, debug builds (running with flutter) on the same device works perfectly. Also app crashes immidiately upon start, Crashlytics doesn't record any crash. On a start page I don't access any Firebase documents (just static welcome screen).

@olostan
Copy link
Author

olostan commented Mar 27, 2025

Also I've tried to apply fix from #17197 but app still crashes even with empy Widget as a home widget... And only in production (when installing ipa with TestFlight on device), but debug runs

@olostan
Copy link
Author

olostan commented Mar 27, 2025

Ok, seems in my case the app is crashing in n documentReferenceSnapshotApp:parameters:includeMetadataChanges:source:completion, specifically on this line when creating reference.

And exact place is here

I believe the root cause is same - there is exception that is not handled by plugin so crashing the whole app... @SelaseKay will this be covered in #17196 ?

@EArminjon
Copy link

Also app crashes immidiately upon start, Crashlytics doesn't record any crash. On a start page I don't access any Firebase documents (just static welcome screen).

I've a similar issue on my side, i guess it's linked to Firebase, do you have any hint over that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ios Issues / PRs which are specifically for iOS. plugin: cloud_firestore resolution: duplicate This issue or pull request already exists type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants