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

[cloud_firestore]: FlutterFirebaseFirestoreMessageCodec.java uses unchecked or unsafe operations. #16978

Open
1 task done
bennajah opened this issue Jan 16, 2025 · 3 comments · May be fixed by #16979
Open
1 task done
Labels
Needs Attention This issue needs maintainer attention. platform: android Issues / PRs which are specifically for Android. plugin: auth plugin: cloud_firestore type: bug Something isn't working

Comments

@bennajah
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Database

Which platforms are affected?

Android

Description

When building a Flutter project using cloud_firestore version 5.6.1, warnings unchecked or unsafe operations, and deprecated APIs appear in the console.

Image

Reproducing the issue

  1. Use VS CODE
  2. Add cloud_firestore: ^5.6.1 to the pubspec.yaml file.
  3. Run the project using flutter build apk --release
  4. Observe the warnings in the console output.

Firebase Core version

3.10.0

Flutter Version

3.27.2

Relevant Log Output

Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: C:\Users\benna\AppData\Local\Pub\Cache\hosted\pub.dev\cloud_firestore-5.6.1\android\src\main\java\io\flutter\plugins\firebase\firestore\FlutterFirebaseFirestoreMessageCodec.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.6.1
Flutter SDK 3.27.2
myapp 1.0.0+1

dependencies:
- cached_network_image 3.4.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image]
- cloud_firestore 5.6.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cupertino_icons 1.0.8
- firebase_analytics 11.4.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 5.4.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.10.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 4.3.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_performance 0.10.1 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- firebase_storage 12.4.0 [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_facebook_auth 7.1.1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web facebook_auth_desktop]
- flutter_hooks 0.20.5 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]       
- flutter_svg 2.0.17 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- font_awesome_flutter 10.8.0 [flutter]
- formz 0.8.0 [meta]
- fpdart 1.1.1
- freezed_annotation 2.4.4 [collection json_annotation meta]
- geolocator 13.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- go_router 14.6.3 [collection flutter flutter_web_plugins logging meta]
- google_fonts 6.2.1 [flutter http path_provider crypto]
- google_sign_in 6.2.2 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- hooks_riverpod 2.6.1 [collection flutter flutter_hooks flutter_riverpod riverpod state_notifier]
- image_picker 1.1.2 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows]
- intl 0.19.0 [clock meta path]
- json_annotation 4.9.0 [meta]
- onesignal_flutter 5.2.9 [flutter]
- package_info_plus 8.1.3 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock]
- permission_handler 11.3.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface]
- riverpod_annotation 2.6.1 [meta riverpod]
- share_plus 10.1.4 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi web win32]
- shared_preferences 2.3.5 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- url_launcher 6.3.1 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]

dev dependencies:
- build_runner 2.4.14 [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_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_socket_channel yaml]
- custom_lint 0.7.1 [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 2.5.8 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation dart_style]        
- go_router_builder 2.7.3 [analyzer async build build_config collection meta path source_gen source_helper]
- json_serializable 6.9.3 [analyzer async build build_config collection dart_style json_annotation meta path pub_semver pubspec_parse source_gen source_helper]
- riverpod_generator 2.6.4 [analyzer build build_config collection crypto meta path riverpod_analyzer_utils riverpod_annotation source_gen]
- riverpod_lint 2.6.4 [analyzer analyzer_plugin collection custom_lint_builder meta path riverpod riverpod_analyzer_utils source_span yaml]

dependency overrides:
- flutter_secure_storage 10.0.0-beta.4 [flutter flutter_secure_storage_darwin flutter_secure_storage_linux flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta]
- font_awesome_flutter 10.8.0 [flutter]

transitive dependencies:
- _fe_analyzer_shared 78.0.0 [meta]
- _flutterfire_internals 1.3.49 [collection firebase_core firebase_core_platform_interface flutter meta]
- _macros 0.3.3
- analyzer 7.1.0 [_fe_analyzer_shared collection convert crypto glob macros meta package_config path pub_semver source_span watcher yaml]
- analyzer_plugin 0.12.0 [analyzer collection dart_style meta pub_semver yaml path]
- args 2.6.0
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- build 2.4.2 [analyzer async convert crypto glob logging meta package_config path]
- build_config 1.1.2 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.3 [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.3 [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.3 [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.3.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.1
- cloud_firestore_platform_interface 6.6.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.4.1 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- code_builder 4.10.1 [built_collection built_value collection matcher meta]
- collection 1.19.0
- convert 3.1.2 [typed_data]
- cross_file 0.3.4+2 [meta web]
- crypto 3.0.6 [typed_data]
- custom_lint_builder 0.7.1 [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.1 [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.1.0 [analyzer]
- dart_style 3.0.1 [analyzer args collection package_config path pub_semver source_span yaml]
- facebook_auth_desktop 2.1.1 [flutter http flutter_secure_storage flutter_facebook_auth_platform_interface]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.3
- file 7.0.1 [meta path]
- file_selector_linux 0.9.3+2 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.4+2 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.6.2 [cross_file flutter http plugin_platform_interface]
- file_selector_windows 0.9.3+3 [cross_file file_selector_platform_interface flutter]
- firebase_analytics_platform_interface 4.3.0 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]   
- firebase_analytics_web 0.5.10+6 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- firebase_auth_platform_interface 7.5.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.13.6 [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.19.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_crashlytics_platform_interface 3.8.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_performance_platform_interface 0.1.5 [_flutterfire_internals firebase_core flutter plugin_platform_interface]      
- firebase_performance_web 0.1.7+6 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins]
- firebase_storage_platform_interface 5.2.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.10.7 [_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_facebook_auth_platform_interface 6.1.2 [flutter plugin_platform_interface]
- flutter_facebook_auth_web 6.1.2 [flutter flutter_web_plugins flutter_facebook_auth_platform_interface web]
- flutter_plugin_android_lifecycle 2.0.24 [flutter]
- flutter_riverpod 2.6.1 [collection flutter meta riverpod state_notifier]
- flutter_secure_storage_darwin 0.1.0 [flutter plugin_platform_interface]
- flutter_secure_storage_linux 2.0.1 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 2.0.1 [flutter plugin_platform_interface]
- flutter_secure_storage_web 2.0.0 [flutter flutter_secure_storage_platform_interface flutter_web_plugins web]
- flutter_secure_storage_windows 4.0.0 [ffi flutter flutter_secure_storage_platform_interface path path_provider win32]       
- frontend_server_client 4.0.0 [async path]
- geolocator_android 4.6.1 [flutter geolocator_platform_interface meta uuid]
- geolocator_apple 2.3.8+1 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.2.4 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 4.1.1 [flutter flutter_web_plugins geolocator_platform_interface web]
- geolocator_windows 0.2.3 [flutter geolocator_platform_interface]
- glob 2.1.2 [async collection file path string_scanner]
- google_identity_services_web 0.3.3 [meta web]
- google_sign_in_android 6.1.34 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.7.8 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface]
- google_sign_in_web 0.12.4+3 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web]
- graphs 2.3.2 [collection]
- hotreloader 4.2.0 [collection logging path stream_transform vm_service watcher]
- http 1.2.2 [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_picker_android 0.8.12+20 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 3.0.6 [flutter flutter_web_plugins image_picker_platform_interface mime web]
- image_picker_ios 0.8.12+2 [flutter image_picker_platform_interface]
- image_picker_linux 0.2.1+1 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface]   
- image_picker_macos 0.2.1+1 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface]   
- image_picker_platform_interface 2.10.1 [cross_file flutter http plugin_platform_interface]
- image_picker_windows 0.2.1+1 [file_selector_platform_interface file_selector_windows flutter image_picker_platform_interface]
- io 1.0.5 [meta path string_scanner]
- js 0.7.1
- leak_tracker 10.0.7 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.8 [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
- macros 0.1.3-main.0 [_macros]
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- mime 2.0.0
- octo_image 2.1.0 [flutter]
- package_config 2.1.1 [path]
- package_info_plus_platform_interface 3.0.2 [flutter meta plugin_platform_interface]
- path 1.9.0
- path_parsing 1.1.0 [meta vector_math]
- 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.15 [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]
- permission_handler_android 12.0.13 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.4.5 [flutter permission_handler_platform_interface]
- permission_handler_html 0.1.3+5 [flutter flutter_web_plugins permission_handler_platform_interface web]
- permission_handler_platform_interface 4.2.3 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface]
- petitparser 6.0.2 [meta]
- platform 3.1.6
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.1 [async stack_trace]
- pub_semver 2.1.5 [collection meta]
- pubspec_parse 1.5.0 [checked_yaml collection json_annotation pub_semver yaml]
- riverpod 2.6.1 [collection meta stack_trace state_notifier]
- riverpod_analyzer_utils 0.5.9 [analyzer collection crypto custom_lint_core freezed_annotation meta path source_span]        
- rxdart 0.28.0
- share_plus_platform_interface 5.0.2 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shared_preferences_android 2.4.1 [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.2 [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 2.0.1 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.0
- source_gen 2.0.0 [analyzer async build dart_style glob path pub_semver source_span yaml]
- source_helper 1.3.5 [analyzer collection source_gen]
- source_span 1.10.0 [collection path term_glyph]
- sprintf 7.0.0
- sqflite 2.4.1 [flutter sqflite_android sqflite_darwin sqflite_platform_interface sqflite_common path]
- sqflite_android 2.4.0 [flutter sqflite_common path sqflite_platform_interface]
- sqflite_common 2.5.4+6 [synchronized path meta]
- sqflite_darwin 2.4.1+1 [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.0 [path]
- state_notifier 1.0.0 [meta]
- stream_channel 2.1.2 [async]
- stream_transform 2.1.1
- string_scanner 1.3.0 [source_span]
- synchronized 3.3.0+3
- term_glyph 1.2.1
- test_api 0.7.3 [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]
- url_launcher_android 6.3.14 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.3.2 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.2 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.4.0 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.4 [flutter url_launcher_platform_interface]
- uuid 4.5.1 [crypto sprintf meta fixnum]
- vector_graphics 1.1.15 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.13
- vector_graphics_compiler 1.1.16 [args meta path path_parsing vector_graphics_codec xml]
- vector_math 2.1.4
- vm_service 14.3.0
- watcher 1.1.1 [async path]
- web 1.1.0
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.1 [async crypto stream_channel web web_socket]
- win32 5.10.0 [ffi]
- xdg_directories 1.1.0 [meta path]
- xml 6.5.0 [collection meta petitparser]
- yaml 3.1.3 [collection source_span string_scanner]

Additional context and comments

No response

@bennajah bennajah added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jan 16, 2025
@SelaseKay SelaseKay added plugin: cloud_firestore platform: android Issues / PRs which are specifically for Android. plugin: auth labels Jan 16, 2025
@SelaseKay
Copy link
Contributor

Hi @bennajah, thanks for the report. I’ve isolated the issue and found that the deprecation warnings are coming from firebase_auth. As mentioned in this comment, we don’t have a set timeline for the complete removal of these APIs at this point.

@bennajah
Copy link
Author

Hi @bennajah, thanks for the report. I’ve isolated the issue and found that the deprecation warnings are coming from firebase_auth. As mentioned in this comment, we don’t have a set timeline for the complete removal of these APIs at this point.

But the warning mentioned firestore plugin not firebase_auth

@SelaseKay
Copy link
Contributor

Correct, the unchecked/unsafe warning is indeed related to cloud_firestore. However, in my previous comment, I was referring to the deprecation warnings, which appear to be originating from firebase_auth.

@SelaseKay SelaseKay linked a pull request Jan 16, 2025 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: android Issues / PRs which are specifically for Android. plugin: auth plugin: cloud_firestore type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants