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_dynamic_links] Dynamic link keeps loading forever on Android #9465

Closed iabdousd closed 1 year ago

iabdousd commented 2 years ago

Bug report

Describe the bug We use dynamic links for email link sign in (and other cases as well), but in some Android devices the loading that shows before the app is open spins forever without the app being opened.

Expected behavior

Open the app

Additional context

I was able to run adb logcat to see what is the issue, and I got the following error:


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.71.0) [✓] Connected device (3 available) ! Error: iPhon is not connected. Xcode will continue when iPhon is connected. (code -13) [✓] HTTP Host Availability • No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.17.6 Flutter SDK 3.0.5 roam 1.0.3+546 dependencies: - add_2_calendar 2.1.3 [flutter] - animate_do 2.1.0 [flutter] - badges 2.0.3 [flutter] - cached_network_image 3.2.1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - cloud_firestore 3.4.3 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 3.3.3 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - collection 1.16.0 - connectivity_plus 2.3.6 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows] - contacts_service 0.6.3 [flutter collection quiver] - dart_geohash 2.0.2 - devicelocale 0.5.4 [flutter flutter_web_plugins] - dio 4.0.6 [http_parser path] - email_validator 2.1.17 - firebase_analytics 9.3.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_app_check 0.0.6+18 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.6.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.20.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.6 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 4.3.3 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 12.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.8.2+1 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 2.0.13 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 10.3.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_cupertino_date_picker_fork 1.0.6 [flutter] - flutter_image_compress 1.1.0 [flutter] - flutter_libphonenumber 1.2.4 [flutter] - flutter_local_notifications 9.8.0+1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_markdown 0.6.10+3 [flutter markdown meta path] - flutter_mentions 2.0.1 [flutter flutter_portal] - flutter_native_timezone 2.0.0 [flutter_web_plugins flutter js] - flutter_reorderable_list 1.2.0 [flutter] - flutter_sms 2.3.3 [flutter flutter_web_plugins plugin_platform_interface url_launcher] - flutter_svg 1.1.1+1 [flutter meta path_drawing vector_math xml] - flutter_switch 0.3.2 [flutter] - geocoding 2.0.4 [flutter geocoding_platform_interface] - geolocator 9.0.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - google_fonts 3.0.1 [flutter http path_provider crypto] - helpers 1.1.4 [flutter] - hive 2.2.3 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - http 0.13.4 [async http_parser meta path] - image 3.2.0 [archive meta xml] - image_cropper 2.0.3 [flutter image_cropper_platform_interface image_cropper_for_web] - image_gallery_saver 1.7.1 [flutter] - image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - intl 0.17.0 [clock path] - intl_phone_number_input 0.7.0+2 [flutter meta libphonenumber_plugin equatable collection] - maps_launcher 2.0.1 [flutter flutter_web_plugins url_launcher] - markdown 5.0.0 [args charcode meta] - package_info_plus 1.4.3 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - permission_handler 10.0.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - phone_number 0.12.0+2 [flutter meta] - photo_view 0.14.0 [flutter] - provider 6.0.3 [collection flutter nested] - qr_flutter 4.0.0 [flutter qr] - responsive_framework 0.2.0 [flutter collection] - screenshot 1.2.3 [flutter] - share_plus 4.0.10 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web] - shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - sorted_list 1.0.0 [collection] - sticky_headers 0.3.0+2 [flutter] - time_picker_widget 1.0.0+10 [flutter] - timezone 0.8.0 [path] - universal_html 2.0.8 [async csslib charcode collection html meta source_span typed_data universal_io] - url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - uuid 3.0.6 [crypto] - version 3.0.2 - video_editor 1.4.3 [flutter ffmpeg_kit_flutter_min_gpl path_provider video_player video_thumbnail path] - video_viewer 1.2.7 [flutter gesture_x_detector helpers http path_provider provider video_player volume_watcher wakelock] - webview_flutter 3.0.4 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] - wechat_assets_picker 7.3.4 [flutter extended_image photo_manager provider video_player] dev dependencies: - flutter_launcher_icons 0.9.3 [args image path yaml] - flutter_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - icapps_license 2.0.2 [http path yaml] transitive dependencies: - archive 3.3.1 [crypto path] - args 2.3.1 - async 2.8.2 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface] - characters 1.2.0 - charcode 1.3.1 - clock 1.1.0 - cloud_firestore_platform_interface 5.7.0 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.8.3 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.1.12 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.3.1 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm] - connectivity_plus_macos 1.2.4 [connectivity_plus_platform_interface flutter] - connectivity_plus_platform_interface 1.2.1 [flutter meta plugin_platform_interface] - connectivity_plus_web 1.2.3 [connectivity_plus_platform_interface flutter_web_plugins flutter] - connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter] - cross_file 0.3.3+1 [js meta] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dbus 0.7.7 [args ffi meta xml] - equatable 2.0.3 [collection meta] - extended_image 6.2.1 [extended_image_library flutter meta] - extended_image_library 3.3.0 [crypto flutter http_client_helper path path_provider] - fake_async 1.3.0 [clock collection] - ffi 2.0.1 - ffmpeg_kit_flutter_min_gpl 4.5.1 [ffmpeg_kit_flutter_platform_interface flutter] - ffmpeg_kit_flutter_platform_interface 0.2.1 [flutter plugin_platform_interface] - file 6.1.2 [meta path] - firebase 9.0.3 [http http_parser js] - firebase_analytics_platform_interface 3.3.0 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.2 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_app_check_platform_interface 0.0.4+12 [firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.0.6+1 [firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.5.2 [collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 4.2.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.5.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 1.7.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.12 [collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.3+8 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.1.0 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.1.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.1+12 [firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.1+1 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_remote_config_platform_interface 1.1.12 [firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.1.1 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 4.1.12 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.3.2 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - flutter_blurhash 0.7.0 [flutter] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_local_notifications_linux 0.5.1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories] - flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 2.0.7 [flutter] - flutter_portal 0.4.0 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - geolocator_android 4.0.2 [flutter geolocator_platform_interface] - geolocator_apple 2.2.1 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.6 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - gesture_x_detector 1.1.1 [flutter vector_math] - html 0.15.0 [csslib source_span] - http_client_helper 2.0.2 [http] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - image_cropper_for_web 0.0.4 [flutter flutter_web_plugins image_cropper_platform_interface js] - image_cropper_platform_interface 2.0.0 [flutter plugin_platform_interface http] - image_picker_android 0.8.5+1 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.5+6 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface] - js 0.6.4 - libphonenumber 2.0.2 [flutter meta] - libphonenumber_platform_interface 0.3.1 [flutter plugin_platform_interface] - libphonenumber_plugin 0.2.3 [flutter flutter_web_plugins libphonenumber_platform_interface libphonenumber_web libphonenumber] - libphonenumber_web 0.2.0+1 [flutter flutter_web_plugins js libphonenumber_platform_interface] - lints 2.0.0 - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.4 - meta 1.7.0 - mime 1.0.2 - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - octo_image 1.0.2 [flutter flutter_blurhash] - package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path] - package_info_plus_macos 1.3.0 [flutter] - package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface] - package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 2.0.0 [package_info_plus_platform_interface ffi flutter win32] - path 1.8.1 - path_drawing 1.0.0 [vector_math meta path_parsing flutter] - path_parsing 1.0.0 [vector_math meta] - path_provider_android 2.0.16 [flutter path_provider_platform_interface] - path_provider_ios 2.0.10 [flutter path_provider_platform_interface] - path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.0 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - permission_handler_android 10.0.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface] - petitparser 5.0.0 [meta] - photo_manager 2.1.4 [flutter] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - process 4.2.4 [file path platform] - qr 2.1.0 [meta] - quiver 3.1.0 [matcher] - rxdart 0.27.5 - share_plus_linux 3.0.0 [share_plus_platform_interface file flutter meta url_launcher] - share_plus_macos 3.0.1 [share_plus_platform_interface flutter] - share_plus_platform_interface 3.0.3 [flutter meta mime plugin_platform_interface] - share_plus_web 3.0.1 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta] - share_plus_windows 3.0.1 [share_plus_platform_interface flutter meta url_launcher] - shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - sky_engine 0.0.99 - source_span 1.8.2 [collection path term_glyph] - sqflite 2.0.3 [flutter sqflite_common path] - sqflite_common 2.2.1+1 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - string_scanner 1.1.0 [charcode source_span] - synchronized 3.0.0+2 - term_glyph 1.2.0 - test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - typed_data 1.3.1 [collection] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher_android 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface] - url_launcher_web 2.0.12 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - vector_math 2.1.2 - video_player 2.4.5 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_player_android 2.3.8 [flutter video_player_platform_interface] - video_player_avfoundation 2.3.5 [flutter video_player_platform_interface] - video_player_platform_interface 5.1.3 [flutter plugin_platform_interface] - video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface] - video_thumbnail 0.5.2 [flutter] - volume_watcher 2.0.1 [flutter] - wakelock 0.5.6 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows] - wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface] - wakelock_platform_interface 0.3.0 [flutter meta] - wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface] - wakelock_windows 0.2.0 [flutter wakelock_platform_interface win32] - webview_flutter_android 2.9.2 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 1.9.1 [flutter meta plugin_platform_interface] - webview_flutter_wkwebview 2.9.1 [flutter path webview_flutter_platform_interface] - win32 2.7.0 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 6.1.0 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

iabdousd commented 2 years ago

Here's the intent-filter that I got in my android manifest:

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:host="*.roamtogether.app" android:scheme="https"/>
</intent-filter>
iabdousd commented 2 years ago

After further investigation, the issue is only in Android 13 and in the dynamic links that has a subdomain.

darshankawar commented 2 years ago

@iabdousd Can you provide the logcat in properly formatted text ?

iabdousd commented 2 years ago

Yes sure here it's:

09-05 10:01:37.852 10292 10292 E AcceptInvitation: Activity not found to handle Intent action [CONTEXT service_id=77 ]
09-05 10:01:37.852 10292 10292 E AcceptInvitation: android.content.ActivityNotFoundException: Unable to find explicit activity class {app.roamtogether.android/app.roamtogether.android.MainActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2158)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.Activity.startActivityForResult(Activity.java:5470)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.platform_startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at fdx.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.public_startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):3)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.Activity.startActivityForResult(Activity.java:5428)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.platform_startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at fdx.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.public_startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.startActivityForResult(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.Activity.startActivity(Activity.java:5926)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.platform_startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at com.google.android.chimera.android.Activity.startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.public_startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):2)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):3)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.Activity.startActivity(Activity.java:5893)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezq.platform_startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at ezp.startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at com.google.android.chimera.android.Activity.startActivity(:com.google.android.gms@221821044@22.18.21 (190400-453244992):1)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at hyt.x(:com.google.android.gms@221821044@22.18.21 (190400-453244992):4)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at hyv.onPostExecute(:com.google.android.gms@221821044@22.18.21 (190400-453244992):3)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.os.AsyncTask.finish(AsyncTask.java:771)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.os.Handler.dispatchMessage(Handler.java:106)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.os.Looper.loopOnce(Looper.java:201)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.os.Looper.loop(Looper.java:288)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at android.app.ActivityThread.main(ActivityThread.java:7898)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at java.lang.reflect.Method.invoke(Native Method)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
09-05 10:01:37.852 10292 10292 E AcceptInvitation:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
darshankawar commented 2 years ago

@iabdousd What's the targetSdkVersion you are using ? Can you set it to 33 and see if it helps ?

iabdousd commented 2 years ago

Hi thanks for your assistance, Yes. It's already set to 33

darshankawar commented 2 years ago

Thanks for the update. I am unable to verify this scenario since I don't have android 13 enabled device. Keeping this issue open and labeling for further insights from the team.

/cc @russellwheatley

andre-paraense commented 2 years ago

It is possible to reproduce the error on an Android Emulator API 33.

I have tested o an Android Emulator API 33 both with targetSdkVersion32 and 33, and to my surprise it works with targetSdkVersion32. So that is my workaround for now. Will wait until this get sorted before moving to API 33.

iabdousd commented 2 years ago

Thank you so much @andre-paraense! I am going to do the same for now!

iabdousd commented 2 years ago

Is there any updates on this? We need to go up to SDK 33 for firebase_messaging.

liuzs0666 commented 2 years ago

+1 to this. we have exactly the same issue.

JustinWeru12 commented 2 years ago

+1. Occurred in production

svartalfheim commented 2 years ago

I think the cause is that the behavior of IntentFilter has changed since Android 13 (https://developer.android.com/guide/components/intents-filters?hl=en#imatch) as mentioned in FirebaseAndroidSDK here: https://github.com/firebase/firebase-android-sdk/issues/4198

However, I use DynamicLink for email authentication, so I don't know how to solve this problem.

jptwl commented 2 years ago

I have the same issue on Android 13.It's works fine on Android 12 with same code base.

russellwheatley commented 1 year ago

Hey @iabdousd, I'd be happy to look into this. Could you provide a barebones, reproducible code sample that I can run on my android 13 emulator, please? Or anyone else that is experiencing this issue. Thanks.

iabdousd commented 1 year ago

Hi @russellwheatley, all you need to do to reproduce this is to create a dynamic link that has a sub domain and use it to open your app while having compileSdkVersion and targetSdkVersion set to 33 in your app/build.gradle.

russellwheatley commented 1 year ago

@iabdousd Please provide a reproducible code sample if would like someone to investigate this. Thanks.

google-oss-bot commented 1 year ago

Hey @iabdousd. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

andre-paraense commented 1 year ago

@russellwheatley I believe this is a relevant bug which will prevent anyone with a Flutter app using Dynamic Links to move to Android API 33. I am not sure about @iabdousd , but my perspective here is of one who works in commercial for-profit company and found out about this issue first hand in production. In this case, it is impossible to share code, and we just don't have time to go out of the way and create a sample code reproducing this.

I don't know what would be the best process here. Maybe there should be an example app for the firebase dynamic link in its repository(is there?) If yes, definitely we can try to reproduce the bug there, using Android Emulator and API 33.

iabdousd commented 1 year ago

You don't need to write that much code to reproduce the issue, you just need to add Firebase dynamic links to any project and create a dynamic link with a subdomain and try to open the app with it.

russellwheatley commented 1 year ago

My dynamic link https://flutterfiretests.page.link/iho8 worked fine on Android emulator with API 33. Now the onus is on you, @iabdousd, to provide a reproduction. I cannot fix what I cannot reproduce.

@andre-paraense - I've just updated the dynamic links example here so it uses the correct Firebase project. but the previous version works as well (i.e. the one on master branch).

andre-paraense commented 1 year ago

@russellwheatley good to know, thanks! I will go ahead and test my code again soon and will post an update here when I get to it

iabdousd commented 1 year ago

Hey @russellwheatley, sorry for not mentioning but it only happens on custom domain names. The reason why I am not comfortable to send an example is I am not sure if it's safe to share the google-services.json of our main project.

iabdousd commented 1 year ago

Maybe the solution is to create a new project with any domain and share it?

russellwheatley commented 1 year ago

It is perfectly fine to share your android google-services.json file. Hence why we share ours with FlutterFire example apps. See here. Your project resources are supposed to be protected by the rules you set in the Firebase console.

You can also create a throwaway project if you wish, @iabdousd, for the purpose of demonstration.

iabdousd commented 1 year ago

Hi again @russellwheatley,

I ended up creating a throwaway project and it's ready now, you can have a look at it here: https://github.com/iabdousd/firebase_dl_issue_9465

Ennio97 commented 1 year ago

same issue here.

Ennio97 commented 1 year ago

@russellwheatley i've tried the example flutter app in the dynamic_link package from here and I notice that dynamic link works well if we use:

android { compileSdkVersion 31 defaultConfig { ... targetSdkVersion 31 ... } }

but if we set the target and the compile sdk version to 33 android { compileSdkVersion 33 defaultConfig { ... targetSdkVersion 33 ... } } and we launch the dynamic link app will still in loading and no redirection happen.

Here a video

Flutter doctor output [✓] Flutter (Channel stable, 3.3.4, on macOS 13.0 22A380 darwin-x64, locale it-IT) [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 14.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.71.0) [✓] Connected device (3 available) [✓] HTTP Host Availability
russellwheatley commented 1 year ago

Thanks for the reproduction on the example app, @Ennio97. I'll take a look 👍

russellwheatley commented 1 year ago

Hey @Ennio97, I fixed it by adding my SHA-256 fingerprint to the app in the Firebase console. The next step is to add the intent-filter for your custom domain in your "AndroidManifest.xml".

Here is some documentation on adding SHA-256 fingerprint

Documentation for adding the intent-filter.

For example, this is the intent-filter that will be added to the dynamic links example app.

iabdousd commented 1 year ago

Hey @russellwheatley, thanks for the assistance I can verify that adding SHA-256 fingerprint solves the problem.

I will keep this open in case anyone else still have questions/issues.

Ennio97 commented 1 year ago

Thank you so much @russellwheatley, now it works correctly! :)

nilsreichardt commented 1 year ago

My issue was that android:autoVerify="true" was missing in AndroidManifest.xml (see here) and we had 3 SHA-256 values in our Firebase project. I removed the unused SHA-256 and SHA1 values now it workes 👍

iabdousd commented 1 year ago

Hey @russellwheatley, it seems like this issue is happening in Flutter 3.3.8 !!

It's reproducible in the above repository that I shared (https://github.com/iabdousd/firebase_dl_issue_9465).

LOCKEDFILE commented 1 year ago

In my case, changing the SDK version solved the problem.

targetSdkVersion 33 -> targetSdkVersion 32

Still, it seems too early to update the version 33.

iabdousd commented 1 year ago

I am doing the same workaround now but the problem is that firebase_messaging needs targetSdkVersion set to 33 in order to request notifications permission

andre-paraense commented 1 year ago

@LOCKEDFILE @iabdousd the solution presented here in previous comments do work for API 33. You need to do two things:

1- Add the SHA-256 key to your firebase project configuration 2- Add the necessary intent-filter code block to your AndroidManifest.xml (read previous comments and docs for details).

I have done both things and I can confirm the issue is gone for me. So now I am back to API 33.

andre-paraense commented 1 year ago

My dynamic link https://flutterfiretests.page.link/iho8 worked fine on Android emulator with API 33. Now the onus is on you, @iabdousd, to provide a reproduction. I cannot fix what I cannot reproduce.

@andre-paraense - I've just updated the dynamic links example here so it uses the correct Firebase project. but the previous version works as well (i.e. the one on master branch).

@russellwheatley I can confirm it works for me! Thank you very much! 👏🏽

orestesgaolin commented 1 year ago

I have 3 SHA-256 fingerprints (2 for debug keys, one for release key) in Firebase console and was wondering if this might be the problem with handling deep links?

I tested my intent filters with Android Studio App Link Assistant and it validates the intents correctly. The app is able to handle dynamic link correctly on SDK 32, but bumping it to 33 results with following logcat output:

ActivityTaskManager: START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=https://m[REDACTED]t.page.link/... flg=0x90400 (has extras)} from uid 10259
ActivityTaskManager: START u0 {act=com.google.firebase.dynamiclinks.VIEW_DYNAMIC_LINK cat=[android.intent.category.BROWSABLE] dat=https://m[REDACTED]t.page.link/... flg=0x14000000 pkg=com.google.android.gms cmp=com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity (has extras)} from uid 10248
PackageManager: Intent does not match component's intent filter: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] dat=https://[REDACTED].firebaseapp.com/... flg=0x14000000 pkg=[REDACTED].tst cmp=[REDACTED].tst/[REDACTED].MainActivity (has extras) }
PackageManager: Access blocked: ComponentInfo{[REDACTED].tst/[REDACTED].MainActivity}
Pageboost: onAppLaunch : [REDACTED].tst
ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] dat=https://[REDACTED].firebaseapp.com/... flg=0x14000000 pkg=[REDACTED].tst cmp=[REDACTED].tst/[REDACTED].MainActivity (has extras)} from uid 10243
AcceptInvitation: android.content.ActivityNotFoundException: Unable to find explicit activity class {[REDACTED].tst/[REDACTED].MainActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
AppsFilter: interaction: PackageSetting{faf292f [REDACTED].tst/10925} -> PackageSetting{c580b0e net.booksy.customer/10196} BLOCKED