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.71k stars 3.97k forks source link

Dynamic link does not work if it is opened from facebook #5962

Closed darkgod1802 closed 2 years ago

darkgod1802 commented 3 years ago

Bug report

I have been working with dynamic links for open a specific product of my app. When I tried to share the link in Facebook, the link redirects to the play store even if you have the application installed. The problem only occurs from Android in IOS everything is OK. I think that the problem happens by Facebook InAppBrowser

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a dynamic link
  2. Share dynamic link in a Facebook post

Expected behavior

Links redirect you to Play Store even if you have the app installed. It should redirect to app If the app has already been installed

Additional context

In App Browser does not recognize If the app is already installed


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.3 20D91 darwin-arm, locale es-419) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] VS Code (version 1.55.2) [✓] Connected device (2 available) • No issues found! ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 2.12.3 Flutter SDK 2.0.5 appie_app 1.2.2+8 dependencies: - adaptive_dialog 0.10.0+5 [animations flutter meta] - algolia 1.0.0+1 [meta http uuid] - animations 2.0.0 [flutter] - badges 1.2.0 [flutter] - bot_toast 4.0.1 [flutter] - bubble_lens 1.0.3 [flutter] - cached_network_image 3.0.0 [flutter flutter_cache_manager octo_image] - circular_profile_avatar 2.0.1-nullsafety [flutter cached_network_image] - cloud_firestore 1.0.5 [cloud_firestore_platform_interface cloud_firestore_web firebase_core firebase_core_platform_interface flutter meta] - connectivity_wrapper 1.0.4 [flutter provider] - content_placeholder 0.1.0 [flutter shimmer] - cupertino_icons 1.0.2 - dartz 0.9.2 - day_night_time_picker 1.0.1 [flutter] - dotted_line 3.0.0 [flutter] - expandable 5.0.1 [flutter] - firebase_analytics 8.0.0 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta] - firebase_auth 1.0.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.0.3 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.0.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_database 6.1.2 [firebase_core flutter] - firebase_dynamic_links 2.0.0 [firebase_core flutter] - firebase_messaging 9.0.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.7.0 [firebase_core flutter] - firebase_storage 8.0.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flare_flutter 3.0.0 [collection flutter meta] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_cupertino_date_picker_fork 1.0.3 [flutter] - flutter_image_compress 1.0.0 [flutter] - flutter_keyboard_visibility 5.0.1 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter] - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math] - flutter_secure_storage 4.1.0 [meta flutter] - flutter_staggered_grid_view 0.4.0 [flutter] - flutter_swiper 1.1.6 [flutter transformer_page_view flutter_page_indicator] - flutter_tags 0.4.8+2 [flutter] - flutter_vibrate 1.0.0 [flutter] - geocoding 2.0.0 [flutter geocoding_platform_interface] - geoflutterfire 2.2.1 [flutter cloud_firestore rxdart] - geolocator 7.0.3 [flutter geolocator_platform_interface geolocator_web] - get_storage 2.0.2 [flutter get path_provider] - google_maps_flutter 2.0.3 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface] - google_nav_bar 5.0.3 [flutter] - great_circle_distance2 1.0.1+1 - image 3.0.2 [archive meta xml] - image_cropper 1.4.0 [flutter] - image_picker 0.7.4 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface image_picker_for_web] - line_awesome_flutter 1.0.1 [flutter] - location 4.1.1 [flutter location_platform_interface location_web meta] - material_segmented_control 2.1.1+1 [flutter] - modal_bottom_sheet 2.0.0 [flutter] - month_picker_dialog 0.4.0 [flutter flutter_localizations intl rxdart] - page_transition 1.1.7+6 [flutter] - permission_handler 6.1.3 [flutter meta permission_handler_platform_interface] - provider 5.0.0 [collection flutter nested] - rive 0.7.2 [collection flutter graphs meta] - rive_splash_screen 0.0.1 [rive_loading flutter] - share 2.0.1 [meta mime flutter] - styled_text 1.0.3+4 [flutter xmlstream] - syncfusion_flutter_sliders 18.3.35-beta [flutter intl syncfusion_flutter_core] - transparent_image 2.0.0 - url_launcher 6.0.3 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web] dev dependencies: - flutter_launcher_icons 0.9.0 [args image path yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] transitive dependencies: - archive 3.1.2 [crypto path] - args 2.0.0 - async 2.5.0 [collection] - boolean_selector 2.1.0 [source_span string_scanner] - characters 1.1.0 - charcode 1.2.0 - clock 1.1.0 - cloud_firestore_platform_interface 4.0.1 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 1.0.5 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.15.0 - crypto 3.0.1 [collection typed_data] - fake_async 1.2.0 [clock collection] - ffi 1.0.0 - file 6.1.0 [meta path] - firebase 9.0.1 [http http_parser js] - firebase_analytics_platform_interface 2.0.0 [flutter meta] - firebase_analytics_web 0.3.0 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta] - firebase_auth_platform_interface 4.0.0 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 1.0.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface] - firebase_core_web 1.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.0.0 [collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 2.0.0 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 1.0.1 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_storage_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 1.0.1 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - flutter_blurhash 0.6.0 [flutter meta pedantic] - flutter_cache_manager 3.0.1 [clock collection file flutter http image path path_provider pedantic rxdart sqflite uuid] - 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_page_indicator 0.0.3 [flutter] - flutter_plugin_android_lifecycle 2.0.1 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math] - geocoding_platform_interface 2.0.0 [flutter meta plugin_platform_interface] - geolocator_platform_interface 2.0.2 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.0.3 [flutter flutter_web_plugins geolocator_platform_interface] - get 4.1.4 [flutter] - google_maps_flutter_platform_interface 2.0.4 [flutter meta plugin_platform_interface stream_transform collection] - graphs 1.0.0 - http 0.13.1 [http_parser meta path pedantic] - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data] - image_picker_for_web 2.0.0 [image_picker_platform_interface meta flutter flutter_web_plugins] - image_picker_platform_interface 2.1.0 [flutter meta http plugin_platform_interface] - intl 0.17.0 [clock path] - js 0.6.3 - location_platform_interface 2.1.0 [flutter meta plugin_platform_interface] - location_web 3.0.0 [flutter flutter_web_plugins http_parser js location_platform_interface meta] - matcher 0.12.10 [stack_trace] - meta 1.3.0 - mime 1.0.0 - nested 1.0.0 [flutter] - octo_image 1.0.0+1 [flutter flutter_blurhash] - path 1.8.0 - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 2.0.0 [flutter] - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface] - path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.11.0 - permission_handler_platform_interface 3.1.3 [flutter meta plugin_platform_interface] - petitparser 4.1.0 [meta] - platform 3.0.0 - plugin_platform_interface 2.0.0 [meta] - process 4.2.1 [file path platform] - rive_loading 0.0.4 [rive flutter] - rxdart 0.26.0 - shimmer 1.1.2 [flutter] - sky_engine 0.0.99 - source_span 1.8.0 [charcode collection path term_glyph] - sqflite 2.0.0+3 [flutter sqflite_common path] - sqflite_common 2.0.0+2 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.0 [charcode source_span] - syncfusion_flutter_core 18.3.35 [flutter pedantic] - synchronized 3.0.0 - term_glyph 1.2.0 - test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - transformer_page_view 0.1.6 [flutter] - typed_data 1.3.0 [collection] - url_launcher_linux 2.0.0 [flutter] - url_launcher_macos 2.0.0 [flutter] - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface] - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins] - url_launcher_windows 2.0.0 [flutter] - uuid 3.0.4 [crypto] - vector_math 2.1.0 - win32 2.0.5 [ffi] - xdg_directories 0.2.0 [meta path process] - xml 5.1.0 [collection meta petitparser] - xmlstream 0.12.0 - yaml 3.1.0 [collection source_span string_scanner] ```

markusaksli-nc commented 3 years ago

This is reproducible with firebase_dynamic_links: ^2.0.2 but it looks like it could be an issue with the android sdk?

flutter doctor -v ``` [√] Flutter (Channel master, 2.3.0-1.0.pre.168, on Microsoft Windows [Version 10.0.19041.928], locale et-EE) • Flutter version 2.3.0-1.0.pre.168 at C:\Development\flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 93242d7548 (5 hours ago), 2021-04-28 19:19:05 -0700 • Engine revision e7939e091e • Dart version 2.14.0 (build 2.14.0-48.0.dev) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at C:\Users\marku\AppData\Local\Android\sdk • Platform android-30, build-tools 30.0.2 • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7199119\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.7.30621.155 • Windows 10 SDK version 10.0.18362.0 [√] Android Studio (version 4.1.0) • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7199119 • Flutter plugin version 55.1.1 • Dart plugin version 201.9380 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [√] IntelliJ IDEA Ultimate Edition (version 2021.1) • IntelliJ at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\211.6693.111 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart [√] Connected device (4 available) • SM G950F (mobile) • ce12171c51cc001c03 • android-arm64 • Android 9 (API 28) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19041.928] • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93 • Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.46 • No issues found! ```
RohithKilaparthi commented 3 years ago

Any update here? Facing the same issue

eliasjtg commented 3 years ago

Same issue

russellwheatley commented 2 years ago

Unfortunately, there is nothing Flutterfire can do about this issue as outlined here.

RohithKilaparthi commented 2 years ago

Adding the Flutter Facebook SDK plugin solved it for me.