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

🐛 [firebase_dynamic_links] iOS does not handle dynamic links if app is closed #4911

Closed
b-jan opened this issue Feb 2, 2021 · 7 comments
Closed
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot Stale Issue with no recent activity type: bug Something isn't working

Comments

@b-jan
Copy link

b-jan commented Feb 2, 2021

Bug report

on iOS only, if my app is closed or not installed yet, the information from the dynamic link is lost on the app opening.

Steps to reproduce

Steps to reproduce the behavior:

  1. iOS
  2. close my app completely
  3. click on the dynamic link
  4. cannot retrieve information from the link

Expected behavior

Same as Android, if the app is closed, when I click on a dynamic link, the app opens and i can retrieve the information from the link.


Additional context

I found some related issues:

I am using:

  • firebase_dynamic_links: ^0.7.0+1
  • firebase_core: ^0.7.0
  void _initDynamicLinks(context) async {
    FirebaseDynamicLinks.instance.onLink(
        onSuccess: (PendingDynamicLinkData dynamicLink) async {
      final Uri deepLink = dynamicLink?.link;

      if (deepLink != null) {
        final code = deepLink.path.split('/')[1];
        // use code
      }
    }, onError: (OnLinkErrorException error) async {
       // show error
    });

    final PendingDynamicLinkData data =
        await FirebaseDynamicLinks.instance.getInitialLink();
    final Uri deepLink = data?.link;

    if (deepLink != null) {
      final code = deepLink.path.split('/')[1];
      // use code
     }
  }

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.5 19F101 darwin-x64,
    locale fr-FR)

[✓] Android toolchain - develop for Android devices (Android SDK version
    30.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)

• No issues found!

Flutter dependencies

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

Click To Expand
Dart SDK 2.10.4
Flutter SDK 1.22.5
my_app 2.2.5+19

dependencies:
- apple_sign_in 0.1.0 [flutter]
- audioplayers 0.17.3 [uuid path_provider flutter flutter_web_plugins]
- bloc 6.1.0 [meta]
- carousel_slider 2.3.1 [flutter]
- equatable 1.2.5 [collection meta]
- firebase_analytics 7.0.1 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface]
- firebase_auth 0.20.0+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter]
- firebase_core 0.7.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
- firebase_dynamic_links 0.7.0+1 [flutter firebase_core]
- firebase_messaging 8.0.0-dev.14 [meta flutter firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web]
- firebase_remote_config 0.6.0 [flutter firebase_core]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_bloc 6.1.0 [flutter bloc provider]
- flutter_compass 0.5.1 [flutter rxdart]
- flutter_facebook_login 3.0.0 [flutter collection]
- flutter_local_notifications 3.0.3 [flutter platform flutter_local_notifications_platform_interface timezone]
- geolocator 6.1.13 [flutter geolocator_platform_interface]
- global_configuration 1.6.0 [flutter http]
- google_sign_in 4.5.5 [google_sign_in_platform_interface flutter meta google_sign_in_web]
- graphql 3.1.0 [meta http mime path crypto http_parser uuid_enhanced gql rxdart websocket quiver]
- http 0.12.2 [http_parser path pedantic]
- image_picker 0.6.7+12 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- meta 1.3.0-nullsafety.3
- package_info 0.4.3 [flutter]
- pull_to_refresh 1.6.3 [flutter]
- sensors 0.4.2+6 [flutter]
- sentry 3.0.1 [http meta stack_trace usage pedantic]
- smooth_star_rating 1.1.1 [flutter]
- transparent_image 1.0.0
- url_launcher 5.7.8 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows]
- vibration 1.7.3 [flutter vibration_web]

dev dependencies:
- flutter_launcher_icons 0.7.5 [image args yaml]
- flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math]

transitive dependencies:
- archive 2.0.13 [crypto args path]
- args 1.6.0
- characters 1.1.0-nullsafety.3
- charcode 1.1.3
- collection 1.15.0-nullsafety.3
- convert 2.1.1 [charcode typed_data]
- crypto 2.1.4 [collection convert typed_data]
- ffi 0.1.3
- file 5.2.1 [intl meta path]
- firebase 7.3.0 [http http_parser js]
- firebase_analytics_platform_interface 1.0.1 [flutter meta]
- firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta]
- firebase_auth_platform_interface 3.0.1 [flutter meta firebase_core plugin_platform_interface]
- firebase_auth_web 0.3.2+6 [flutter flutter_web_plugins meta http_parser intl firebase_core firebase_core_web firebase_auth_platform_interface js]
- firebase_core_platform_interface 3.0.1 [flutter meta plugin_platform_interface quiver]
- firebase_core_web 0.2.1+3 [firebase_core_platform_interface flutter flutter_web_plugins meta js]
- firebase_messaging_platform_interface 1.0.0-dev.10 [flutter meta firebase_core plugin_platform_interface]
- firebase_messaging_web 0.1.0-dev.5 [flutter flutter_web_plugins meta firebase_core firebase_core_web firebase_messaging_platform_interface js service_worker]
- flutter_local_notifications_platform_interface 2.0.0+1 [flutter plugin_platform_interface]
- flutter_plugin_android_lifecycle 1.0.11 [flutter]
- flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
- geolocator_platform_interface 1.0.8 [flutter meta plugin_platform_interface vector_math]
- google_sign_in_platform_interface 1.1.2 [flutter meta quiver]
- google_sign_in_web 0.9.1+1 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
- gql 0.12.3 [source_span meta collection]
- http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
- image 2.1.12 [archive xml]
- image_picker_platform_interface 1.1.1 [flutter meta http plugin_platform_interface]
- intl 0.16.1 [path]
- js 0.6.2
- matcher 0.12.6 [stack_trace]
- mime 0.9.6+3
- nested 0.0.4 [flutter]
- path 1.8.0-nullsafety.1
- path_provider 1.6.27 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 0.0.4+8 [flutter]
- path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface]
- path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.9.0
- petitparser 2.4.0 [meta]
- platform 2.2.1
- plugin_platform_interface 1.0.2 [meta]
- process 3.0.13 [file intl meta path platform]
- provider 4.3.2+2 [flutter nested collection]
- quiver 2.1.3 [matcher meta]
- rxdart 0.24.1
- service_worker 0.2.4 [js]
- sky_engine 0.0.99
- source_span 1.7.0 [charcode collection meta path term_glyph]
- stack_trace 1.9.3 [path]
- string_scanner 1.0.5 [charcode meta source_span]
- term_glyph 1.1.0
- timezone 0.5.9 [path]
- typed_data 1.3.0-nullsafety.3 [collection]
- url_launcher_linux 0.0.1+3 [flutter]
- url_launcher_macos 0.0.1+8 [flutter]
- url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface]
- url_launcher_web 0.1.5 [url_launcher_platform_interface flutter flutter_web_plugins meta]
- url_launcher_windows 0.0.1+1 [flutter]
- usage 3.4.2 [path]
- uuid 2.2.2 [crypto convert]
- uuid_enhanced 3.0.2 [crypto convert collection]
- vector_math 2.1.0-nullsafety.3
- vibration_web 1.6.2 [flutter flutter_web_plugins]
- websocket 0.0.5
- win32 1.7.4 [ffi]
- xdg_directories 0.1.2 [meta path process]
- xml 3.6.1 [collection convert meta petitparser]
- yaml 2.2.1 [charcode collection string_scanner source_span]

@b-jan b-jan added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Feb 2, 2021
@markusaksli-nc
Copy link
Contributor

Hi @b-jan
Where are you clicking on the link? If you long press and use the Open in app option is the behavior the same?
I'm assuming that the links work when the app is backgrounded?
Thank you

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Feb 3, 2021
@b-jan
Copy link
Author

b-jan commented Feb 3, 2021

Thank you for your answer @markusaksli-nc

I am clicking on the link from the web / or in whatsapp / messenger after sharing it.
You're right, the link works when the app is in background.

I just added 2 seconds of delay before handling the initial dynamic link and now I can say it fails less often... Weird.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Feb 3, 2021
@markusaksli-nc
Copy link
Contributor

Could you provide a minimal complete reproducible code sample?

I'm not seeing this with the official example.

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Feb 4, 2021
@b-jan
Copy link
Author

b-jan commented Feb 5, 2021

Thanks for your help.
I'll make the code sample next week.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Feb 5, 2021
@markusaksli-nc

This comment has been minimized.

@markusaksli-nc markusaksli-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Feb 5, 2021
@google-oss-bot
Copy link

Hey @b-jan. 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!

@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Feb 16, 2021
@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@b-jan if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants