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.73k stars 3.98k forks source link

[firebase_auth]: <When app_links is used with firebase, IOS fails to obtain deepLink.> #13806

Closed Sansuihe closed 3 weeks ago

Sansuihe commented 3 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Analytics

Which platforms are affected?

iOS

Description

bug:When I used firebase for flutter project and needed to do deepLink special processing by myself, everything was normal on Android platform using app_links, but on ios platform deepLink started the App normally but could not normally get the url of the launch listener callback.

[[FirebaseAnalytics]] 11.2.0 - [FirebaseAnalytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    index = 0;
}

My deeplink link was intercepted by Firebase abnormally, so that both Firebase and app_links are wrong. Firebase displays the above error message, while app_links has no callback information. I actually want to receive it from app_links. No need for this Firebase intercept

flutter version 3.22.2;

app_links: ^6.1.3

firebase_core: ^3.6.0

Reproducing the issue

flutter version 3.22.2; I introduced the following plug-ins in the project to use in other projects can also reproduce this problem,I'm not sure who intercepted it but I didn't introduce firebase_dynamic_links。

firebase_core: ^3.6.0  
  firebase_analytics: ^11.3.3 
  firebase_crashlytics: ^4.1.3 
  firebase_messaging: ^15.1.3
  firebase_auth: ^5.3.1 
  app_links: ^6.1.3

Firebase Core version

3.6.0

Flutter Version

3.22.2

Relevant Log Output

[[FirebaseAnalytics]] 11.2.0 - [FirebaseAnalytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    index = 0;
}

Flutter dependencies

firebase_core: ^3.6.0  
  firebase_analytics: ^11.3.3 
  firebase_crashlytics: ^4.1.3 
  firebase_messaging: ^15.1.3
  firebase_auth: ^5.3.1 
  app_links: ^6.1.3

Additional context and comments

I got the results I wanted as expected on the ios platform in the following ways,But Firebase's error message is always there. I'm not sure why Firebase uses deeplink by default。

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
       AppLinks.shared.handleLink(url: url)
   }
SelaseKay commented 3 weeks ago

Hi @Sansuihe, thanks for the report. Kindly checkout this Stack Overflow potential solution to see if it resolves your issue.

Sansuihe commented 3 weeks ago

Hi @Sansuihe, thanks for the report. Kindly checkout this Stack Overflow potential solution to see if it resolves your issue.

Thank you. It is indeed the reason why I rewrote the application, but I have to close my previous rewrite in order to execute it correctly

SelaseKay commented 3 weeks ago

Does that mean the issue has been resolved?

Sansuihe commented 3 weeks ago

Does that mean the issue has been resolved?

Yes, thank you.