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] Crash - StripeCardScan/UxModel.swift:128: Fatal error: Unexpectedly found nil while unwrapping an Optional value #2078

Closed
nickm01 opened this issue Nov 8, 2022 · 14 comments
Labels
fixed in master Fixed in master, awaiting next update kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@nickm01
Copy link

nickm01 commented Nov 8, 2022

Summary

Using 23.1.1 when trying to present the CardImageVerificationSheet

Code to reproduce

let sheet = CardImageVerificationSheet(cardImageVerificationIntentId: "xxx", cardImageVerificationIntentSecret: "yyy")
        sheet.present(from: navigationController) { result in
            print("-=- result: \(result)")
        }

iOS version

15.6.1
iPhone 7 plus

Installation method

Pods - 23.1.1

SDK version

23.1.1

Other information

this is the line it crashes on:

return bundle.url(forResource: "UxModel", withExtension: "mlmodelc")!

Trace below
image

@eurias-stripe eurias-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Nov 8, 2022
@eurias-stripe
Copy link
Contributor

Hi @nickm01, thank you for reporting this, we are looking into it.

@jaimepark-stripe
Copy link
Contributor

jaimepark-stripe commented Nov 8, 2022

Thank you @eurias-stripe , I'll take it over from here :-)

Hello @nickm01!
Thank you for bringing this to our attention. Let me take a look into it. Just to be thorough, do you mind telling me what XCode version you are using?

@nickm01
Copy link
Author

nickm01 commented Nov 9, 2022

@jaimepark-stripe Xcode 14.0. Note also this did not crash with StripeCardScan 22.6.0. Thanks for looking into this!

@nickm01
Copy link
Author

nickm01 commented Nov 10, 2022

22.8.4 also has the same problem (22.6.0 works fine)

@jaimepark-stripe
Copy link
Contributor

Apologies for the late reply @nickm01. I got sick so I was out for a few days. Picking this ticket back up! Will update you with progress.

@nickm01
Copy link
Author

nickm01 commented Nov 30, 2022

Hi @jaimepark-stripe... wondering about any updates thanks!

@jaimepark-stripe
Copy link
Contributor

Hello @nickm01!
Can you take a look into Pods project folder Pods -> StripeCardScan -> StripeCardScan -> Resources -> CompiledModels and see if the file UxModel.mlmodelc exists?

@nickm01
Copy link
Author

nickm01 commented Dec 1, 2022

@jaimepark-stripe it appears to yes (22.8.4)

@jaimepark-stripe
Copy link
Contributor

@nickm01
So I figured out what's going on. The MLModel class is an autogenerated class and the bundle it points to doesn't have the compiled ML model in its immediate directory. The compiled ML model is in another bundle, StripeCardScan.bundle, so it can't be found.

Let me put in a fix for this and will get it out by the next deploy. Let me ping you with the SDK version that contains the fix!

@nickm01
Copy link
Author

nickm01 commented Dec 2, 2022

Great thanks @jaimepark-stripe ... LMK

@nickm01
Copy link
Author

nickm01 commented Dec 2, 2022

@jaimepark-stripe when is the next deploy likely to be?

@jaimepark-stripe
Copy link
Contributor

Earliest would be next Monday 2022-12-05 if I can get this PR ready, tested, and merged by EOD. I'm rapidly getting this PR out but in all likelihood will be out by the next deploy train 2022-12-12. What I can do is schedule a mid-week deploy next week to get it out earlier than 2022-12-12.

@jaimepark-stripe
Copy link
Contributor

Hello @nickm01!
The new SDK version is slated to deploy today. I'll ping you in this thread when its out on Pods!

@jaimepark-stripe jaimepark-stripe added the fixed in master Fixed in master, awaiting next update label Dec 12, 2022
@jaimepark-stripe
Copy link
Contributor

@nickm01
The new SDK version is out! https://github.com/stripe/stripe-ios/releases/tag/23.3.1
Let me know when you try out the new version. I will close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in master Fixed in master, awaiting next update kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

3 participants