GoogleCloudPlatform / recaptcha-enterprise-mobile-sdk

Apache License 2.0
31 stars 6 forks source link

[Bug]: Exception: com.google.android.recaptcha.RecaptchaException: Internal Error #57

Closed jamesbluecrow closed 1 year ago

jamesbluecrow commented 1 year ago

Are you seeing the problem on Android or iOS?

Android

Contact Details

No response

Describe the bug

Exception: com.google.android.recaptcha.RecaptchaException: Internal Error

Site Key

No response

Select the method used to integrate with reCAPTCHA Mobile.

GMaven (Android)

SDK Version

18.2.1

To Reproduce

No repro steps, we just have seen this exception coming more than 200 times in our app.

Expected behavior

No response

Development IDE

Android Studio Flamingo | 2022.2.1 Patch 2

To Reproduce

We have seen it on a variety of devices:

Relevant log output

Non-fatal Exception: com.google.android.recaptcha.RecaptchaException: Internal Error
       at com.google.android.recaptcha.internal.zzdc.zzoid(com.google.android.recaptcha:recaptcha@@18.2.1:10)
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:335)
       at android.os.Looper.loop(Looper.java:222)
       at android.os.HandlerThread.run(HandlerThread.java:67)


### Relevant log output

_No response_
mcorner commented 1 year ago

Thanks for the error report. These errors are due to something going wrong internally in the SDK. We are steadily improving this error rate (one fix is rolling out this week), but we recognize they still occur.

jamesbluecrow commented 1 year ago

Thanks for the error report. These errors are due to something going wrong internally in the SDK. We are steadily improving this error rate (one fix is rolling out this week), but we recognize they still occur.

  • Can you give me a sense of what percentage of the time you are seeing it?

We see this quite a lot. Around 20% of the time.

  • Is this in getClient or execute?

This is happening on the Recaptcha.getClient()

  • Have you implemented retries for getClient and execute to get around this?

Yes we do have some retry code to get around this, but wanted to share hopefully to help. Not sure if there is any other info I can provide to you to help?

mcorner commented 1 year ago

It would be very unusual to see an internal error that percentage of the time. However the overall exception rate from getClient can be that high, but it will be due to network errors (disconnected or poorly connected). If you share you sitekey with me I can look at our metrics. It is plainly visible in your app, but if you like you can email it to me at my first and last name at google.com

YuWenHaoqq commented 1 year ago

On List of Xiaomi products, this error occurs 100% PlatformException(FL_INIT_FAILED, com.google.android.recaptcha.RecaptchaException: Internal Error, null, null)

mcorner commented 1 year ago

@YuWenHaoqq pif you are getting an internal error 100% of the time, please open a new bug report with the full details: model of phone, os version, sitekey etc. I see you are using flutter. I don't yet know if your issue is in the flutter layer or the sdk, but please try a native implementation on you device as well. Also try the sdk on other devices so we can isolate where the problem is.

mcorner commented 1 year ago

Also double check that you are using an offplay enabled site key as you Xiaomi devices likely don't have the play store services.

aBenVip commented 1 year ago

I also encountered this problem @mcorner com.google.android.recaptcha.RecaptchaException: Internal Error can you help me ? and i need more info about this exception

sdk version: 18.2.1 brand : oppo findx

mcorner commented 1 year ago

@aBenVip See #60

mcorner commented 1 year ago

@jamesbluecrow Any thoughts about https://github.com/GoogleCloudPlatform/recaptcha-enterprise-mobile-sdk/issues/57#issuecomment-1613891870 ?

We will need a bit more information to keep this open. #60 is a separate issue that only applies to the China market.

jamesbluecrow commented 1 year ago

@jamesbluecrow Any thoughts about #57 (comment) ?

We will need a bit more information to keep this open. #60 is a separate issue that only applies to the China market.

Sorry for my late reply @mcorner. It sounds that you believe this may be related to internet connection, just surprising the error is not more informative. I don't have access to the project, I'll try to get my hands on the key and share it with you if I can.

But honestly I'm satisfied with your answer that there is known issues that the team is fixing and releasing once fixed so we will just keep the library up to date.

mcorner commented 1 year ago

Closing this in favor of #60