Closed tzvc closed 3 years ago
Hi @daikini
can you please provide your flutter doctor -v
,
your flutter run --verbose
and yourpubspec.yaml
Thank you
Possible duplicate of #2221
Hi @TahaTesser,
I don't think this is a duplicate of https://github.com/FirebaseExtended/flutterfire/issues/2221 as I am having the issue on Android (dont have an Iphone to test on) and I'm not using the page.link
host (I'm using a custom host).
Related to that, when I try to use the default host myapp.page.link
in firebase, I get an error:
flutter doctor -v
:
[ā] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.5 18F132, locale en-AU)
ā¢ Flutter version 1.12.13+hotfix.8 at /Users/theo/flutter
ā¢ Framework revision 0b8abb4724 (7 weeks ago), 2020-02-11 11:44:36 -0800
ā¢ Engine revision e1e6ced81d
ā¢ Dart version 2.7.0
[ā] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
ā¢ Android SDK at /Users/theo/Library/Android/sdk
ā¢ Android NDK location not configured (optional; useful for native profiling support)
ā¢ Platform android-29, build-tools 28.0.3
ā¢ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
ā¢ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
ā¢ All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 10.1)
ā¢ Xcode at /Applications/Xcode.app/Contents/Developer
ā¢ Xcode 10.1, Build version 10B61
ā Flutter requires a minimum Xcode version of 11.0.0.
Download the latest version or update via the Mac App Store.
ā¢ CocoaPods version 1.7.4
[ā] Android Studio (version 3.3)
ā¢ Android Studio at /Applications/Android Studio.app/Contents
ā¢ Flutter plugin version 32.0.1
ā¢ Dart plugin version 182.5215
ā¢ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[ā] VS Code (version 1.42.1)
ā¢ VS Code at /Applications/Visual Studio Code.app/Contents
ā¢ Flutter extension version 3.8.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
flutter run --verbose
logs:
[ +1 ms] W/DynamiteModule(19383): Local module descriptor class for com.google.firebase.auth not found.
[ ] I/FirebaseAuth(19383): [FirebaseAuth:] Preparing to create service connection to gms implementation
[+17905 ms] D/DecorView(19383): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@52c9d32[MainActivity]
[+17586 ms] D/DecorView(19383): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@52c9d32[MainActivity]
// here I call the firebase_auth sendSignInEmail()
[ +890 ms] I/BiChannelGoogleApi(19383): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms:
com.google.firebase.auth.api.internal.zzaq@b2a1319
// here I put the app on background to open my gmail
[+9943 ms] D/FlutterView(19383): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@22d19ca
[+4353 ms] W/ActivityThread(19383): handleWindowVisibility: no activity for token android.os.BinderProxy@4435045
// the link open the app back
[ +22 ms] D/FlutterActivityAndFragmentDelegate(19383): Setting up FlutterEngine.
[ ] D/FlutterActivityAndFragmentDelegate(19383): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this
FlutterFragment.
[ +266 ms] D/FlutterActivityAndFragmentDelegate(19383): Attaching FlutterEngine to the Activity that owns this Fragment.
[ +218 ms] D/FlutterView(19383): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@5f58181
[ +6 ms] D/FlutterActivityAndFragmentDelegate(19383): Executing Dart entrypoint: main, and sending initial route: /
[ +11 ms] D/DecorView(19383): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@ac8ea03[MainActivity]
my pubspec.yml
:
dependencies:
google_sign_in: ^4.0.0
firebase_auth: ^0.15.5+2
cloud_functions: ^0.4.1+6
cloud_firestore: ^0.12.7
geoflutterfire: ^2.0.3+5
image_picker: ^0.5.0+3
firebase_storage: ^3.0.1
timeago: ^2.0.10
geolocator: ^5.3.0
google_maps_flutter: ^0.5.21+6
cached_network_image: ^1.1.1
firebase_messaging: ^5.1.8
geocoder: ^0.2.1
image: ^2.0.7
provider: ^3.1.0
fluster: ^1.1.2
overlay_support: ^1.0.1
responsive_image: ^0.1.0
intl: ^0.16.1
firebase_dynamic_links: ^0.5.0+11
package_info: ^0.4.0+16
flutter_secure_storage: ^3.3.1+1
flutter_facebook_login: ^3.0.0
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_launcher_icons: '^0.7.0'
flutter_test:
sdk: flutter
Any updates on this? Anyone having the same issue?
Im having the same issue,the app open but the callback onLink don't trigger
Same issue here, but happening only with some iOS devices. Some iOS logins works just fine.
Update: this might be related to this firebase-ios-sdk issue, which also mentions a related issue on Apple Developer Forum.
My app correctly detects dynamic links I create and I'm able to handle them (both initial links and when onLink is triggered). This is on both Android and iOS devices. However, as the original post points out, the links sent in emails by firebase_auth
are not detected for some reason. So if a user gets an email confirmation or password reset email and taps on it while holding a mobile device, it will open the mobile app but nothing happens (as far as I can see, and I just updated firebase_dynamic_links
to make sure). So I'm not sure if the problem is with firebase_auth
or with firebase_dynamic_links
(perhaps the latter is filtering those somehow). Note that when the emails are sent by Firebase Auth, I have them correctly using my custom domain.
Not sure if we're supposed to explicitly set dynamicLinks: false
for the /__/auth
path in our firebase.json at the root of our domain or what - something like this which I haven't tried yet:
{
"hosting": {
"appAssociation": "AUTO",
"rewrites": [
{
"source": "/__/auth**",
"dynamicLinks": false
},
I'm wondering if the only way to have a decent UX with Flutter at the moment is to trigger a cloud function that uses the Firebase Admin SDK so that it can make use of generatePasswordResetLink
which is not available on the client side. Then maybe passing ActionCodeSettings would allow me to force the link to be opened in a web browser instead of the mobile app.
But ideally the Firebase SDKs for Flutter would give us a parameter to tell it to send a password reset email that opens in a web browser only. That or help us figure out how to read these links in the mobile app. :)
Is there any update regarding this? I am having the same issue in Flutter (testing on Android). The weird thing is that if I create the link using the Python SDK and then open it, it triggers the onLink method and I am able to sign in, but if I create the link in Flutter it doesn't trigger it.
No issues on both IOS and Android witht the latest release. I invite you guys to try it out and if it works for you too, i'll go ahead and close this issue.
Thanks for the feedback, @theochampion. Will close this issue now the problem has been resolved for you. Should anyone else experience any problems, please create a new issue.
I'm using
firebase_auth
andfirebase_dynamic_links
to implement passwordless login. When I click on the link in the auth email, it opens in my app as it should but the link isn't handled (theonLink
callback is not called).The weird thing is that every other dynamic links I have work properly (they get handled in
onLink
).I extracted the link from the email, it looks like this:
So, from what I understand, I call is made at
https://myapp-5p4rk.firebaseapp.com/__/auth/action
(i'm not sure why is that step needed) and then it gets redirected to my dynamic link I configured in the consolehttps://getmyapp.app/links/sign_in
. At this point, it should open my app andonLink
should trigger. But it doesn't happen.Now if I just enter
https://getmyapp.app/links/sign_in
in my browser, my app open andonLink
is triggered!I don't really what is the difference and what could cause the link coming from the email not to trigger
onLink
... Any ideas? šfirebase_auth: ^0.15.5+2
firebase_dynamic_links: ^0.5.0+11
The code I use for handling the links in my app: