[Firebase auth]: about:blank page firebase auth verifyPhoneNumber
Is there an existing issue for this?
- [X] I have searched the existing issues.
Which plugins are affected?
Auth
Which platforms are affected?
iOS
Description
I am using SMS sending feature in firebase flutter. With Android it works normally, but with iOS it always authenticates but the capcha authentication screen then hangs on a blank page. I have configured as documented their URLSchemes entry, but it doesn't work in the application. If I paste that link into the browser, it still works, proving that I did the URLSchemes correctly
Firebase auth: firebase_auth: ^4.19.4
my code :
static Future sendSMS(String phoneNumber) async {
await auth.verifyPhoneNumber(
phoneNumber: '+84$phoneNumber',
timeout: const Duration(seconds: 60),
verificationCompleted: (PhoneAuthCredential credential) {},
verificationFailed: (FirebaseAuthException e) {
print(e);
},
codeSent: (String verificationId, int? resendToken) async {
verificationIdSMS = verificationId;
codeAutoRetrievalTimeout: (String verificationId) {
},
);
}
info.plist: URLSchemes
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>app-1-681450703683-ios-648e9cfe7de51b66febdf6</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app-1-681450703683-ios-648e9cfe7de51b66febdf6</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.googleusercontent.apps.681450703683-jbbgj8t0a8d646929dkltm63ir6ip359</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.681450703683-jbbgj8t0a8d646929dkltm63ir6ip359</string>
</array>
</dict>
firebase app: firebase app
debug console: debug console
Restarted application in 981ms.
[GETX] Instance "StorageService" has been created
[GETX] Instance "GetMaterialController" has been created
[GETX] Instance "GetMaterialController" has been initialized
[GETX] GOING TO ROUTE /slash
[GETX] Instance "SlashControllerOverwrite" has been created
[GETX] Instance "AuthenticationRepository" has been created with tag "serp_master_app_module"
[GETX] Instance "StorageService" has been created with tag "serp_master_app_module"
[GETX] Instance "NotificationRepository" has been created with tag "serp_master_app_module"
[GETX] Instance "SlashControllerOverwrite" has been initialized
[GETX] GOING TO ROUTE /login
[GETX] REMOVING ROUTE /slash
flutter: false
[GETX] Instance "LogInOverwriteController" has been created with tag "serp_master_app_module"
[GETX] Instance "LogInOverwriteController" with tag "serp_master_app_module" has been initialized
[GETX] "SlashControllerOverwrite" onDelete() called
[GETX] "SlashControllerOverwrite" deleted from memory
[GETX] OPEN DIALOG 301677814
[GETX] CLOSE DIALOG 301677814
[GETX] GOING TO ROUTE /SendOtp
[GETX] Instance "SendOtpController" has been created
[GETX] Instance "StorageService" has been created with tag "serp_master_app_module"
[GETX] Instance "AuthenticationRepository" has been created with tag "serp_master_app_module"
[GETX] Instance "SendOtpController" has been initialized
when I have to press the done button: click done button
Restarted application in 981ms.
[GETX] Instance "StorageService" has been created
[GETX] Instance "GetMaterialController" has been created
[GETX] Instance "GetMaterialController" has been initialized
[GETX] GOING TO ROUTE /slash
[GETX] Instance "SlashControllerOverwrite" has been created
[GETX] Instance "AuthenticationRepository" has been created with tag "serp_master_app_module"
[GETX] Instance "StorageService" has been created with tag "serp_master_app_module"
[GETX] Instance "NotificationRepository" has been created with tag "serp_master_app_module"
[GETX] Instance "SlashControllerOverwrite" has been initialized
[GETX] GOING TO ROUTE /login
[GETX] REMOVING ROUTE /slash
flutter: false
[GETX] Instance "LogInOverwriteController" has been created with tag "serp_master_app_module"
[GETX] Instance "LogInOverwriteController" with tag "serp_master_app_module" has been initialized
[GETX] "SlashControllerOverwrite" onDelete() called
[GETX] "SlashControllerOverwrite" deleted from memory
[GETX] OPEN DIALOG 301677814
[GETX] CLOSE DIALOG 301677814
[GETX] GOING TO ROUTE /SendOtp
[GETX] Instance "SendOtpController" has been created
[GETX] Instance "StorageService" has been created with tag "serp_master_app_module"
[GETX] Instance "AuthenticationRepository" has been created with tag "serp_master_app_module"
[GETX] Instance "SendOtpController" has been initialized
flutter: lá»—i xm:
flutter: [firebase_auth/web-context-cancelled] The interaction was cancelled by the user.
is expected to be able to complete authentication
Reproducing the issue
Firebase Core version
2.30.1
Flutter Version
3.19.6
Relevant Log Output
No response
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
Hello @vqh2602, thank you for reporting this issue. I've run the example app, and it worked fine with no issues. Could you try running the example app and test if it works? Also, try integrating your Firebase (using the FlutterFire CLI, for instance) with the example app and test again.
Hello for me i also see this issue:
When entering a phone number and call verifyPhoneNumber to get the OTP!
It open browser as usual to run reCAPTCHA
But every time i see: This site can't be reached!
And the error message is: YourProject.firebaseapp.com DNS address could not be found. Diagnosing the problem
I'm using the default phone number service host domain which is:
YourProject.firebaseapp.com
It is new issue! it never happened before.
Hello @vqh2602, thank you for reporting this issue. I've run the example app, and it worked fine with no issues. Could you try running the example app and test if it works? Also, try integrating your Firebase (using the FlutterFire CLI, for instance) with the example app and test again.
@arabnology Just to confirm, you mentioned that the example app isn't working either, giving you the error "DNS address could not be found" or "This site can't be reached," correct?
This seems to be a network-related issue. Could you try testing on a different platform, such as Android? Also, if you're using a simulator, try testing on a real iOS device and let us know if the issue persists.
Hey @vqh2602. 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!
Since there haven't been any recent updates here, I am going to close this issue.
@vqh2602 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.
I face the same issue, on ios (physical phone) . It used work something broke in QA and not working , need help