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

Crash when executing token request #44

Closed
1 of 4 tasks
andrewjmeier opened this issue Apr 24, 2023 · 14 comments
Closed
1 of 4 tasks

Crash when executing token request #44

andrewjmeier opened this issue Apr 24, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@andrewjmeier
Copy link

Describe the bug

A clear and concise description of what the bug is.
Since updating to 18.1.2 (from 18.1.0) we've seen a large number of crashes within the recaptcha sdk.

<compiler-generated> line 0 in @objc completion handler block implementation for @escaping @callee_unowned @convention(block) (@unowned RecaptchaToken?, @unowned RecaptchaError?) -> () with result type (RecaptchaToken?, RecaptchaError?) first-element-marker

reCAPTCHA Site Key

6Le4vpccAAAAALSv76KLkDl8YY9LaLqZAgQ7DZ6b

Integration Method

Select the method used to integrate with reCAPTCHA Mobile.

  • SPM (iOS)
  • Cocoapods (iOS)
  • Direct Download (iOS)
  • GMaven (Android)

SDK Version (e.g. 18.0.1):
18.1.2

To Reproduce

I've been unable to reproduce this so far. It's happened ~60 times in the last week. For some sense of scale, we've had 43k errors Failed to fetch captcha token for action: login. With error: The operation couldn’t be completed. (com.google.recaptcha error 100.) in that same time period. (I'm already working with Mark to fix that).

Expected behavior

A clear and concise description of what you expected to happen.

Xcode version for iOS (please complete the following information):

  • Version Xcode 14.2

Device (please complete the following information):

  • Model: Wide range of iPhones
  • OS: Wide range of iOS 15/16
  • Real Device

Additional context
Here's the Xcode crash report:
2023-04-19_01-14-03.2449_-0500-42bdec26b0a46deb27d79650978dc4e512c7d31c.txt

@andrewjmeier andrewjmeier added the bug Something isn't working label Apr 24, 2023
@mcorner
Copy link
Collaborator

mcorner commented Apr 24, 2023

Excellent, great bug report. It gives us a few ideas, we will dig and get back to you. Lmk about the beta sdk fix for #43 when you get a chance.

@andrewjmeier
Copy link
Author

Thanks for taking a look @mcorner. I'll share updates about the beta sdk when I have something. I haven't been successful at reproducing all the time so I need to sort that out first.

@mcorner
Copy link
Collaborator

mcorner commented Apr 25, 2023

60 times in a week sounds like a fraction of a percentage? Any crashes are too many and we will find it, but just trying to figure out how hard it will be to reproduce it. Almost certainly there is a race condition when throwing an error.

@mcorner
Copy link
Collaborator

mcorner commented Apr 25, 2023

@andrewjmeier I want to confirm something you said in the original report... Did this crash happen in 18.1.0 at at all? There is some code that we introduced between those versions that may be the culprit.

@mcorner
Copy link
Collaborator

mcorner commented Apr 25, 2023

And are you using objc or swift?

@andrewjmeier
Copy link
Author

We did not see the crash in 18.1.0 at all. We're using Swift.

60 crashes a week is a tiny, tiny number of users but it's also our largest crash currently.

@ihnatmoisieiev
Copy link

@mcorner could we expect a fix for this problem in the coming release?

@mcorner
Copy link
Collaborator

mcorner commented Apr 29, 2023

Yes, we have a "probable" fix in the next release. It is difficult to repro, so we welcome your feedback after it goes out.

@mcorner
Copy link
Collaborator

mcorner commented May 1, 2023

18.2.0 is out. Release notes on the official page will follow, but draft release notes below.

I am closing this bug for now, but please reopen it if you see the same behavior in 18.2.0

  • The SDK is now built with Xcode 14
  • Deprecated the existing API, which will be removed in the next major release. Added a new API that:
    • Returns a String instead of a RecaptchaToken in execute calls.
    • Adds a timeout parameter to both execute and getClient public APIs.
  • Fixed a bug where the client would become unusable in some situations (Recaptcha Error 100 after several hours of inactivity #43)
  • Speculative fix for a rare crash (Crash when executing token request #44)
  • Added a new Interop Pod dependency in support of future Firebase integration.

@mcorner
Copy link
Collaborator

mcorner commented Jun 28, 2023

We believe this crash is still occurring and are actively trying to repro/fix.

@mcorner
Copy link
Collaborator

mcorner commented Jul 7, 2023

18.2.2 is out that may/should? fix this issue. Waiting for feedback to confirm the fix.

@mcorner
Copy link
Collaborator

mcorner commented Jul 13, 2023

@andrewjmeier any news on the crash?

@andrewjmeier
Copy link
Author

The release started rolling out yesterday, still at 1% but not seeing any crashes at the moment.

@mcorner
Copy link
Collaborator

mcorner commented Jul 18, 2023

@andrewjmeier I am going to close this issue, please let me know if you see the crash again.

@mcorner mcorner closed this as completed Jul 18, 2023
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

3 participants