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 auth]: about:blank page firebase auth verifyPhoneNumber #12748

Open
1 task done
vqh2602 opened this issue May 6, 2024 · 4 comments
Open
1 task done

[Firebase auth]: about:blank page firebase auth verifyPhoneNumber #12748

vqh2602 opened this issue May 6, 2024 · 4 comments
Assignees
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: ios Issues / PRs which are specifically for iOS. plugin: auth Stale Issue with no recent activity type: bug Something isn't working

Comments

@vqh2602
Copy link

vqh2602 commented May 6, 2024

Is there an existing issue for this?

  • 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

bug image:
bug
bug video:
bug

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

bug image:
bug
bug video:
bug

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

@vqh2602 vqh2602 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels May 6, 2024
@vqh2602 vqh2602 changed the title [Firebase auth]: <YOUR TITLE HERE> [Firebase auth]: about:blank page firebase auth verifyPhoneNumber May 6, 2024
@TarekkMA
Copy link
Contributor

TarekkMA commented May 7, 2024

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.

@TarekkMA TarekkMA added blocked: customer-response Waiting for customer response, e.g. more information was requested. plugin: auth platform: ios Issues / PRs which are specifically for iOS. and removed Needs Attention This issue needs maintainer attention. labels May 7, 2024
@arabnology
Copy link

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.

@TarekkMA
Copy link
Contributor

TarekkMA commented May 10, 2024

@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.

@TarekkMA TarekkMA self-assigned this May 10, 2024
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label May 21, 2024
@google-oss-bot
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: ios Issues / PRs which are specifically for iOS. plugin: auth Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants