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

[Bug]: PlatformException(FL_INIT_FAILED, com.google.android.recaptcha.RecaptchaException: Internal Error, null, null) #60

Closed
YuWenHaoqq opened this issue Jul 6, 2023 · 23 comments
Assignees
Labels
bug Something isn't working

Comments

@YuWenHaoqq
Copy link

Are you seeing the problem on Android or iOS?

None

Contact Details

yuwenhaomail@gmail.com

Describe the bug

This error may occur on individual networks and phones

Site Key

No response

Select the method used to integrate with reCAPTCHA Mobile.

SPM (iOS)

SDK Version

18.2.1

To Reproduce

RecaptchaEnterprise.initClient can throw exception when open app

Expected behavior

No response

Development IDE

No response

To Reproduce

  • Model: readmi 9a
  • OS: miui 12.0.6
  • real Device

Relevant log output

I/flutter (18313): ----------------FIREBASE CRASHLYTICS----------------
I/flutter (18313): PlatformException(FL_INIT_FAILED, com.google.android.recaptcha.RecaptchaException: Internal Error, null, null)
I/flutter (18313): 
I/flutter (18313): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
I/flutter (18313): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
I/flutter (18313): <asynchronous suspension>
I/flutter (18313): #2      MethodChannelRecaptchaEnterprise.initClient (package:recaptcha_enterprise_flutter/recaptcha_enterprise_method_channel.dart:34:12)
I/flutter (18313): <asynchronous suspension>
I/flutter (18313): #3      initRecaptchaEnterprise (package:coupert/main.dart:278:5)
I/flutter (18313): <asynchronous suspension>
I/flutter (18313): ----------------------------------------------------

Relevant log output

This issue may occur when using the company intranet and cannot be replicated on other networks
Sorry, we can only provide this information. For whatever reason, I don't have any direction either

@YuWenHaoqq YuWenHaoqq added the bug Something isn't working label Jul 6, 2023
@YuWenHaoqq
Copy link
Author

Of course, this intranet can access Google services

@mcorner
Copy link
Collaborator

mcorner commented Jul 6, 2023

Excellent. This exception comes from Flutter, but is due to an underlying issue in the SDK. I believe this is related to a hostname difference in China. Fixing it will require an SDK update. Give us a few weeks and I think we can sort this out.

It would be really great if you would be willing to privately beta test something in your own environment for me. Email me at my first name and lastname @google.com and I can send youa build.

Internal bug reference: b/290170911

@mcorner
Copy link
Collaborator

mcorner commented Jul 7, 2023

I do have a possible fix in a beta build if someone wants to try it. Also verify that you can reach the following two URLs:

https://www.gstatic.cn/images/branding/product/1x/avatar_pages_square_blue_32dp.png
https://www.gstatic.com/images/branding/product/1x/avatar_pages_square_blue_32dp.png

@YuWenHaoqq
Copy link
Author

https://www.gstatic.cn/images/branding/product/1x/avatar_pages_square_blue_32dp.png
https://www.gstatic.com/images/branding/product/1x/avatar_pages_square_blue_32dp.png

I am able to successfully access both addresses
my email:yuwenhaomail@gmail.com
If you can give me the address of the test package, I am willing to test

@aBenVip
Copy link

aBenVip commented Jul 10, 2023

[INFO:CONSOLE(1)] "Uncaught ReferenceError: recaptcha is not defined", source: https://www.recaptcha.net/recaptcha/api3/mwv
this log happened when init recaptcha sdk , i think https://www.recaptcha.net/recaptcha/api3/mwv maybe has any error , pls check it ,thanks @mcorner

@mcorner
Copy link
Collaborator

mcorner commented Jul 12, 2023

Update: we are working internally first to see if we can verify the problem and fix. Thanks for your patience.

@YuWenHaoqq
Copy link
Author

OK, I will check the latest situation every day. If there is a package that can be tested, please tell me where it is. Thank you 🙏

@mcorner
Copy link
Collaborator

mcorner commented Jul 21, 2023

We have confirmed the fix by testing behind the firewall in China. We are now waiting for another internal fix to release. I would expect to see this in 18.3.0

@mcorner
Copy link
Collaborator

mcorner commented Aug 7, 2023

We have not forgotten about this (I was on vacation). We are planing on a release this week or next.

@thetanz-geoff
Copy link

Thanks @mcorner. Very eager to see this go live as soon as it can.

@thetanz-geoff
Copy link

Hello again @mcorner. Could you please advise whether this fix is on-track to be released this week?

@mcorner
Copy link
Collaborator

mcorner commented Aug 16, 2023

We are in the middle of the release now, so very likely in the next few days.

@mcorner
Copy link
Collaborator

mcorner commented Aug 18, 2023

Android and iOS 18.3.0 have been released with a fix for this issue.

@mcorner mcorner closed this as completed Aug 18, 2023
@thetanz-geoff
Copy link

Much appreciated @mcorner.

@gastsail
Copy link

gastsail commented Oct 27, 2023

This internal error happens also on Android in the 18.2.0 , is this mandatory to update it to 18.3.0 ? This is because I want to know if that internal error is also fixed for every platform using the latest version.

We need to migrate different modules in the company to 1.9.0 in order to update this dependency and we need to know if its a good choice to migrate to this latest version @mcorner

@mcorner
Copy link
Collaborator

mcorner commented Oct 27, 2023

The forced Kotlin upgrade is an unfortunate side effect, we have looked into alternatives, but Google follows the Kotlin releases very, very quickly.

But yes, you have to be on at least 18.3.0 to fix the issue in China.

There are other sources of internal errors, but those are getting stamped out over time from the backend.

@gastsail
Copy link

Great @mcorner , we are on Argentina, but I think that upgrading our modules to kotlin 1.9 will be the best for future updates, because new updates of recaptcha will require kotlin 1.9.0 , that's right ?

Thanks !

@mcorner
Copy link
Collaborator

mcorner commented Oct 27, 2023

The original issue here is only in China. There are other benefits from upgrading (stability, detection, etc) and we strongly encourage users to upgrade whenever possible.

The Kotlin compatibility (IIUC) is +1 and -1 minor version. SDK 18.3.0 was compiled with 1.9.0 so it should work with Kotlin 1.8, 1.9 or some future 1.10. Let me know what works for you.

@gastsail
Copy link

So, can we use kotlin 1.8.0 with gradle 8.0 and JDK 19 to upgrade to 18.3 , right ?

Because instead of migrating to kotlin 1.9.0 , our team will have less effort upgrading to kotlin 1.8.0 to upgrade recaptcha to 18.3.0

Let me know about this so we can start working on it, thanks a lot @mcorner

@mcorner
Copy link
Collaborator

mcorner commented Nov 1, 2023

I don't believe we have tested all of the combinations of jdk and gradle versions, but I don't see why it wouldn't work. You can always try a small test app first to confirm.

@alqayyim
Copy link

alqayyim commented Nov 9, 2023

@mcorner Hi, it's still happening on 18.3.0

image

this is happens when execute not on getClient

@mcorner
Copy link
Collaborator

mcorner commented Nov 9, 2023

Can you post a text version of this stack trace?

@mcorner
Copy link
Collaborator

mcorner commented Nov 9, 2023

And open a new bug, I see you are not using this in China so this is not related to the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants