flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

Initial task failed for action RecaptchaAction(action=getOobCode)with exception - An internal error has occurred. [ unexpected end of stream on com.android.okhttp.Address@80d85b16 ]

Open JuYiYang opened this issue 1 year ago • 14 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

Android

Description

I use flutter + firebase to develop, I had some errors using firebase's email login I have been in the AndroidManifest. XML configuration for android: usesCleartextTraffic = "true" still rerun this mistake, my firebase console Also enable email login Errors are as follows

I/FirebaseAuth(21869): Email link sign in for [email protected] with empty reCAPTCHA token W/System (21869): Ignoring header X-Firebase-Locale because its value was null. W/LocalRequestInterceptor(21869): Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: Too many attempts. Initial task failed for action RecaptchaAction(action=getOobCode)with exception - An internal error has occurred. [ unexpected end of stream on com.android.okhttp.Address@80d85b16 ]

Here are some of my configurations

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:label="wallpaper_book"
        android:name="${applicationName}"
        android:usesCleartextTraffic="true"
        android:icon="@mipmap/ic_launcher">
        <activity ......

firebase console enter image description here

Reproducing the issue

FirebaseAuth.instance
    .sendSignInLinkToEmail(
        email: '[email protected]',
        actionCodeSettings: ActionCodeSettings(
            url: 'https://wallpaper-book.firebaseapp.com/__/auth/',
            // This must be true
            handleCodeInApp: true,
            // iOSBundleId: 'com.example.ios',
            androidPackageName: 'com.example.wallpaper_book',
            // installIfNotAvailable
            androidInstallApp: true,
            // minimumVersion
            androidMinimumVersion: '12'))
    .catchError((onError) {
  OtherUtils.showToastInfo('Error sending email verification $onError',
      backgroundColor: const Color(0xFF7c2eed), textColor: Colors.white);
}).then((value) {
  Loading.dismiss();
});

}

Firebase Core version

2.31.1

Flutter Version

3.19.6

Relevant Log Output

I/FirebaseAuth(21869): Email link sign in for [email protected] with empty reCAPTCHA token
W/System  (21869): Ignoring header X-Firebase-Locale because its value was null.
D/TrafficStats(21869): tagSocket(133) with statsTag=0xffffffff, statsUid=-1
D/Linux   (21869): [Posix_connect Debug]Process com.example.wallpaper_book :9099 
E/RecaptchaCallWrapper(21869): Initial task failed for action RecaptchaAction(action=getOobCode)with exception - An internal error has occurred. [ unexpected end of stream on com.android.okhttp.Address@80d85b16 ]

Flutter dependencies

dependencies { // Import the Firebase BoM implementation platform('com.google.firebase:firebase-bom:33.0.0')

// TODO: Add the dependencies for Firebase products you want to use // When using the BoM, don't specify versions in Firebase dependencies implementation 'com.google.firebase:firebase-analytics'

// Add the dependency for the Firebase Authentication library
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-auth-ktx")

// Also add the dependency for the Google Play services library and specify its version
implementation("com.google.android.gms:play-services-auth:20.7.0")

// Add the dependencies for any other desired Firebase products // https://firebase.google.com/docs/android/setup#available-libraries }

Additional context and comments

No response

JuYiYang avatar Jun 04 '24 03:06 JuYiYang

Can you try to reproduce this issue again with the latest flutterfire packages?

TarekkMA avatar Jun 05 '24 08:06 TarekkMA

您能尝试使用最新的 flutterfire 包再次重现此问题吗?

Yes, I tried it with the latest version. Same result firebase_auth: ^5.0.0 firebase_core: ^3.0.0

JuYiYang avatar Jun 05 '24 09:06 JuYiYang

Does the same also happen to the flutter auth example app?

https://github.com/firebase/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example

TarekkMA avatar Jun 05 '24 11:06 TarekkMA

Flutter auth 示例应用程序是否也发生同样的事情?

https://github.com/firebase/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example

Yes the same, is not my computer environment problem image

JuYiYang avatar Jun 06 '24 02:06 JuYiYang

Flutter auth 示例应用程序是否也发现了一些有趣的事情?

https://github.com/firebase/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example

My own projects as well as flutter_auth_example have no problem logging in with google

JuYiYang avatar Jun 06 '24 02:06 JuYiYang

So is the issue still happening or it has been solved? if so please indicate what was the solution as other users might find it useful.

TarekkMA avatar Jun 10 '24 09:06 TarekkMA

So is the issue still happening or it has been solved? if so please indicate what was the solution as other users might find it useful.

It did not solve, I just explained my current operation situation, running on my machine, using google login is OK, using email login will report an error

JuYiYang avatar Jun 10 '24 13:06 JuYiYang

Hello @JuYiYang, Can you please send a complete minimal running reproduction of this issue?

TarekkMA avatar Jun 25 '24 09:06 TarekkMA

Facing the same issue as well.

cheejiayuan512 avatar Jun 28 '24 02:06 cheejiayuan512

@TarekkMA https://github.com/firebase/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example the OP mentioned that the example for email link sign-in is facing the same issue, is that enough for a complete minimal running reproduction of the issue?

cheejiayuan512 avatar Jun 28 '24 02:06 cheejiayuan512

@cheejiayuan512 @JuYiYang I wasn't able to replicate this issue with the example app. Maybe check if you are using the AppCheck plugin to set the token correctly?

TarekkMA avatar Jun 28 '24 06:06 TarekkMA

Hi Tarekk, turns out it was user error. The email was sent to my spam folder which I did not check, and I needed to click on the link within the emulator itself instead of copypasting it from desktop to emulator. Not sure about OP, thank you!

cheejiayuan512 avatar Jun 28 '24 07:06 cheejiayuan512

@cheejiayuan512 Glad that the issue is solved for you. We'll keep this issue open until the OP provides more insight on whether this solution also helped them or not.

TarekkMA avatar Jun 28 '24 07:06 TarekkMA

Hello @JuYiYang, Can you please send a complete minimal running reproduction of this issue?

Of course this file is only 80mb but I wonder why the hard disk is so big[https://drive.google.com/file/d/13C9L8HrL_BcoytNg89rO6Jn7AmW1XbO-/view?usp=drive_link](url)

JuYiYang avatar Jun 28 '24 08:06 JuYiYang

Hey @JuYiYang. 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 avatar Jul 09 '24 01:07 google-oss-bot

嘿@JuYiYang。我们需要更多信息来解决此问题,但 7 个工作日内没有更新。我将问题标记为过时,如果接下来 7 天内没有新的更新,我将自动关闭它。

如果您有更多信息可以帮助我们彻底解决此问题,请添加评论!

I send the code link
https://drive.google.com/file/d/13C9L8HrL_BcoytNg89rO6Jn7AmW1XbO-/view?usp=sharing

JuYiYang avatar Jul 10 '24 07:07 JuYiYang

I'm getting this error when trying to run your project, please try to fix this issue and upload again (or use GitHub if possible)
[test] flutter pub get --no-example
Resolving dependencies...
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because wallpaper_book depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because wallpaper_book depends on intl ^0.18.1, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because wallpaper_book depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because wallpaper_book depends on intl ^0.18.1, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Because wallpaper_book depends on intl ^0.19.1 which doesn't match any versions, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Because wallpaper_book depends on intl ^0.19.1 which doesn't match any versions, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because wallpaper_book depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because wallpaper_book depends on intl ^0.18.1, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

TarekkMA avatar Jul 10 '24 08:07 TarekkMA

我在尝试运行您的项目时收到此错误,请尝试修复此问题并再次上传(或尽可能使用 GitHub)

[test] flutter pub get --no-example
Resolving dependencies...
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because wallpaper_book depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because wallpaper_book depends on intl ^0.18.1, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because wallpaper_book depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because wallpaper_book depends on intl ^0.18.1, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Because wallpaper_book depends on intl ^0.19.1 which doesn't match any versions, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Because wallpaper_book depends on intl ^0.19.1 which doesn't match any versions, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

--

[test] flutter pub get --no-example
Resolving dependencies...
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because wallpaper_book depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because wallpaper_book depends on intl ^0.18.1, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on intl: flutter pub add intl:^0.19.0
exit code 1

This may be the intl version of the problem, my native can work properly, can you try to upgrade to 0.19.0 try

JuYiYang avatar Jul 13 '24 07:07 JuYiYang

Hey @JuYiYang. 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 avatar Jul 23 '24 01:07 google-oss-bot

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

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

google-oss-bot avatar Aug 01 '24 01:08 google-oss-bot