firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

[firebase_auth]: Particular carrier does not receive OTP – again #13103

Closed lisovyk closed 2 months ago

lisovyk commented 2 months ago

Is there an existing issue for this?

Which plugins are affected?

Auth

Which platforms are affected?

Android, iOS, macOS, Web, Windows

Description

A particular carrier in Ukraine does not receive OTPs, and the auth service returns an error:

[firebase_auth/invalid-app-credential] The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.

We've encountered something similar couple months ago, and all businesses had just to wait untill it resolves itself. I'd like to at least have some status dashboard or, better, notification, if firebase has troubles sending SMS to particular carriers.

So far there is nothing to help the developers, and the error is not helpful at all.

Reproducing the issue

Try to send an SMS to any lifecell number in Ukraine – +38 093 XXX XX XX

Firebase Core version

3.2.0

Flutter Version

3.22.0

Relevant Log Output

At some point of trying to fix on mobile we got `SMS verification code request failed: unknown status code: 17499 Error code:39`

Web app gives `[firebase_auth/invalid-app-credential] The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.`

Flutter dependencies

Expand Flutter dependencies snippet
```yaml dependencies: - animated_text_kit 4.2.2 [flutter characters] - appinio_social_share 0.3.0 [flutter plugin_platform_interface] - auto_size_text 3.0.0 [flutter] - awesome_notifications 0.8.3 [flutter flutter_web_plugins plugin_platform_interface intl] - cached_network_image 3.3.0 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - carousel_slider 4.2.1 [flutter] - collection 1.18.0 - cupertino_icons 1.0.6 - custom_refresh_indicator 2.2.1 [flutter] - device_calendar 4.3.2 [flutter collection sprintf timezone] - device_info_plus 10.1.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry] - dynamic_color 1.7.0 [flutter flutter_test material_color_utilities] - firebase_analytics 10.8.9 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.17.8 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.31.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.4.18 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 14.7.19 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_ui_auth 1.13.1 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations meta] - firebase_ui_oauth_apple 1.2.19 [firebase_auth firebase_ui_oauth flutter] - firebase_ui_oauth_google 1.3.1 [firebase_auth firebase_ui_oauth flutter google_sign_in] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_animate 4.5.0 [flutter flutter_shaders] - flutter_form_builder 9.3.0 [flutter intl] - flutter_html 3.0.0-beta.2 [html csslib collection list_counter flutter] - flutter_multi_formatter 2.12.4 [flutter collection base58check bech32] - flutter_native_timezone 2.0.0 [flutter_web_plugins flutter js] - flutter_quill 9.3.17 [flutter flutter_localizations intl dart_quill_delta collection quiver equatable meta html flutter_colorpicker markdown html2md charcode url_launcher flutter_keyboard_visibility device_info_plus super_clipboard] - flutter_statusbarcolor_ns 0.5.0 [flutter] - flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler] - font_awesome_flutter 10.7.0 [flutter] - form_builder_validators 10.0.1 [flutter flutter_localizations intl] - geolocator 10.1.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get_it 7.6.7 [async collection] - go_router 11.1.4 [collection flutter flutter_web_plugins logging meta] - google_maps_flutter 2.5.3 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface google_maps_flutter_web] - google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - google_tag_manager 0.1.0 [js] - gtm 0.1.2 [flutter gtm_platform_interface gtm_android gtm_ios] - hive 2.2.3 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - http 1.2.1 [async http_parser meta web] - image 3.3.0 [archive meta xml] - in_app_review 2.0.9 [flutter in_app_review_platform_interface] - intl 0.19.0 [clock meta path] - introduction_screen 3.1.14 [flutter collection dots_indicator flutter_keyboard_visibility] - marquee 2.2.3 [fading_edge_scrollview flutter] - mobile_number 2.1.1 [flutter] - package_info_plus 8.0.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock] - palette_generator 0.3.3+3 [collection flutter] - permission_handler 11.0.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - photo_view 0.14.0 [flutter] - provider 6.1.2 [collection flutter nested] - qr_flutter 4.1.0 [flutter qr] - remixicon 1.2.0 [flutter] - screenshot 3.0.0 [flutter] - share_plus 7.0.2 [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 win32] - sliver_tools 0.2.12 [flutter] - timezone 0.9.2 [path] - universal_platform 1.0.0+1 - upgrader 10.3.0 [flutter device_info_plus html http os_detect package_info_plus shared_preferences url_launcher version xml] - url_launcher 6.2.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - visibility_detector 0.4.0+2 [flutter] dev dependencies: - build_runner 2.4.8 [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] - change_app_package_name 1.1.0 - flutter_launcher_icons 0.11.0 [args checked_yaml cli_util image json_annotation path yaml] - flutter_lints 2.0.3 [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] - hive_generator 2.0.1 [build source_gen hive analyzer source_helper] dependency overrides: - flutter_colorpicker 1.0.3 [flutter] - geolocator_android 4.5.4 [flutter geolocator_platform_interface meta uuid] - super_native_extensions 0.8.15 [flutter flutter_web_plugins meta ffi collection path uuid irondash_engine_context irondash_message_channel device_info_plus pixel_snap web] transitive dependencies: - _fe_analyzer_shared 67.0.0 [meta] - _flutterfire_internals 1.3.33 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 6.4.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.4.10 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - base58check 2.0.0 [crypto collection] - bech32 0.2.2 [convert] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.4.1 [analyzer async convert crypto glob logging meta package_config path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 4.0.1 [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.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml] - build_runner_core 7.3.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.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 3.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.1.0 [cached_network_image_platform_interface flutter flutter_cache_manager] - characters 1.3.0 - charcode 1.3.1 - checked_yaml 2.0.3 [json_annotation source_span yaml] - cli_util 0.3.5 [meta path] - clock 1.1.1 - code_builder 4.10.0 [built_collection built_value collection matcher meta] - convert 3.1.1 [typed_data] - cross_file 0.3.4+1 [meta web] - crypto 3.0.3 [typed_data] - csslib 0.17.3 [source_span] - dart_quill_delta 9.3.17 [collection diff_match_patch quiver] - dart_style 2.3.6 [analyzer args collection path pub_semver source_span] - desktop_webview_auth 0.0.15 [crypto flutter http flutter_web_plugins plugin_platform_interface] - device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface] - diff_match_patch 0.4.1 - dots_indicator 2.1.2 [flutter] - email_validator 2.1.17 - equatable 2.0.5 [collection meta] - fading_edge_scrollview 3.0.0 [flutter] - fake_async 1.3.1 [clock collection] - ffi 2.1.2 - file 7.0.0 [meta path] - firebase_analytics_platform_interface 3.9.9 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.5+21 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 7.2.6 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.11.5 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.17.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_crashlytics_platform_interface 3.6.25 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links 5.4.17 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.6+25 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.35 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.8.5 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web] - firebase_ui_localizations 1.10.2 [flutter flutter_localizations path] - firebase_ui_oauth 1.5.1 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter] - firebase_ui_shared 1.4.1 [flutter] - fixnum 1.1.0 - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_keyboard_visibility 6.0.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter] - flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface] - flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter] - flutter_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_plugin_android_lifecycle 2.0.17 [flutter] - flutter_shaders 0.1.2 [flutter vector_math] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - geolocator_apple 2.3.7 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.2.2 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.2.1 [flutter flutter_web_plugins geolocator_platform_interface] - 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.1+1 [meta web] - google_maps 6.3.0 [js js_wrapping meta] - google_maps_flutter_android 2.7.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_ios 2.5.2 [flutter google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_platform_interface 2.6.0 [collection flutter plugin_platform_interface stream_transform] - google_maps_flutter_web 0.5.4+3 [collection flutter flutter_web_plugins google_maps google_maps_flutter_platform_interface sanitize_html stream_transform] - google_sign_in_android 6.1.22 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.4 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface] - google_sign_in_web 0.12.3+3 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web] - graphs 2.3.1 [collection] - gtm_android 0.1.0 [flutter gtm_platform_interface] - gtm_ios 0.0.5 [flutter gtm_platform_interface] - gtm_platform_interface 0.0.6 [flutter plugin_platform_interface] - html 0.15.4 [csslib source_span] - html2md 1.3.1 [html collection] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - in_app_review_platform_interface 2.0.5 [flutter url_launcher plugin_platform_interface platform] - io 1.0.4 [meta path string_scanner] - irondash_engine_context 0.5.3 [flutter plugin_platform_interface] - irondash_message_channel 0.7.0 [flutter ffi] - js 0.6.7 [meta] - js_wrapping 0.7.4 [js] - json_annotation 4.8.1 [meta] - leak_tracker 10.0.4 [clock collection meta path vm_service] - leak_tracker_flutter_testing 3.0.3 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 3.0.1 [leak_tracker matcher meta] - lints 2.1.1 - list_counter 1.0.2 - logging 1.2.0 - markdown 7.2.2 [args meta] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.12.0 - mime 1.0.5 - nested 1.0.0 [flutter] - octo_image 2.0.0 [flutter] - os_detect 2.0.1 - package_config 2.1.0 [path] - package_info_plus_platform_interface 3.0.0 [flutter meta plugin_platform_interface] - path 1.9.0 - path_parsing 1.0.1 [vector_math meta] - path_provider 2.1.2 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - path_provider_android 2.2.2 [flutter path_provider_platform_interface] - path_provider_foundation 2.3.2 [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.2.1 [ffi flutter path path_provider_platform_interface win32] - permission_handler_android 11.1.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.1.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.12.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.3 [flutter permission_handler_platform_interface] - petitparser 6.0.2 [meta] - pixel_snap 0.1.5 [flutter] - platform 3.1.4 - plugin_platform_interface 2.1.8 [meta] - pointycastle 3.7.4 [collection convert js] - pool 1.5.1 [async stack_trace] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml] - qr 3.0.2 [meta] - quiver 3.2.1 [matcher] - rxdart 0.27.7 - sanitize_html 2.1.0 [html meta] - share_plus_platform_interface 3.4.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.5 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.3.2 [flutter plugin_platform_interface] - shared_preferences_web 2.3.0 [flutter flutter_web_plugins shared_preferences_platform_interface web] - shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.4.1 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 1.0.4 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.4 [analyzer collection source_gen] - source_span 1.10.0 [collection path term_glyph] - sprintf 7.0.0 - sqflite 2.3.2 [flutter sqflite_common path] - sqflite_common 2.5.4 [synchronized path meta] - stack_trace 1.11.1 [path] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - super_clipboard 0.8.15 [flutter collection meta super_native_extensions] - synchronized 3.1.0+1 - term_glyph 1.2.1 - test_api 0.7.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - timing 1.0.1 [json_annotation] - typed_data 1.3.2 [collection] - url_launcher_android 6.3.0 [flutter url_launcher_platform_interface] - url_launcher_ios 6.2.5 [flutter url_launcher_platform_interface] - url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface] - url_launcher_web 2.3.1 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface] - uuid 4.3.3 [crypto sprintf meta fixnum] - vector_graphics 1.1.11+1 [flutter http vector_graphics_codec] - vector_graphics_codec 1.1.11+1 - vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - version 3.0.2 - vm_service 14.2.1 - watcher 1.1.0 [async path] - web 0.5.1 - web_socket_channel 2.4.5 [async crypto stream_channel web] - win32 5.3.0 [ffi] - win32_registry 1.1.2 [ffi win32] - xdg_directories 1.0.4 [meta path] - xml 6.5.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```

Additional context and comments

Same problem in mobile and a separate web app. Other carriers work well, nothing changed on our part in production envs.

Lyokone commented 2 months ago

Hey @lisovyk, I'll ping it internally but you might want to raise a ticket as well since it looks related to a backend issue and not with FlutterFire directly. Have you seen this response? https://github.com/firebase/firebase-js-sdk/issues/8387#issuecomment-2253507927

lisovyk commented 2 months ago

I've seen this issue but it looks like it concerns only localhost-related calls, while we have a problem in production for part of users only, and have confirmed it is bugged for a part of users who use a particular operator.

We did tests with another OTP service and it works well with said operator, so the problem is definitely on firebase's part.

I'll raise a ticket in the linked repo, thank you.

nohe427 commented 2 months ago

What is the cell service carrier?

lisovyk commented 2 months ago

@nohe427 "life" or "lifecell"

The issue is already fixed – although it seems that we can expect it to happen again, as Error 39 comes up when operator has reliability issues. Unfortunately, there is no way for us to know it before our users.

krisgerhard commented 2 months ago

I don't think SDK is a variable here. I'm seeing the same with JS SDK. Pretty much all of Estonia is affected. Firebase/Google Cloud metrics show that SMS is sent out but they are not received. I'm also billed for the SMS's.

Lyokone commented 2 months ago

I have passed this over, if this still happens you can try to contact the firebase support directly. Unfortunately, nothing the FlutterFire repository can do directly :/

krisgerhard commented 2 months ago

I am in contact with Firebase Support at the moment, resolution pending. But it seems that some numbers have been blacklisted incorrectly. Estonian numbers starting with +372 55... and +372 58... are not receiving OTP messages in any Firebase projects (including demo).