stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.27k stars 265 forks source link

Failed to find an image named stp_card_unknown #1360

Closed eldina07 closed 1 year ago

eldina07 commented 1 year ago

Describe the bug Hello,

I try to use stripe-react-native stripe on iOS with a basic UI with just a CardField but my application stopped and I have this error:

StripeUICore/ImageMaker.swift:47: Assertion failed: Failed to find an image named stp_card_unknown

Version:

package.json
"@stripe/stripe-react-native": "^0.25.0",
"react": "18.2.0",
"react-native": "0.71.2",

pod version: 1.12.0

I did npm install and pod install

This is on iOS Simulator with an Iphone 14 pro with iOS 16.2 (same on 16.0)

This appear when I come on screen where CardField is init.

charliecruzan-stripe commented 1 year ago

Hm, can you search in Xcode for the file stp_card_unknown@3x.png?

eldina07 commented 1 year ago

I search this file on Xcode but I have nothing more than declaration in STPImageLibrary file. I miss something when I install maybe?

charliecruzan-stripe commented 1 year ago

could you try clearing your pods (maybe the cache as well), then reinstalling? https://gist.github.com/mbinna/4202236

After that, try again. If it's still not working, search in your Podfile.lock file for "StripePaymentsUI" and tell me what version it's resolved to

charliecruzan-stripe commented 1 year ago

closing for inactivity- this image is automatically included in stripe-ios so clearing your pod/xcode caches and rebuilding+reinstalling should resolve it

eliasbrazjr commented 1 year ago

I am the same problem. I hadn't found the file in xcode, but after running the cleanup commands you suggested, I was able to find the image in the StripePaymentsUI package. But I continue with the error message.

package.json
"@stripe/stripe-react-native": "^0.30.0",
"react": "18.1.0",
"react-native": "0.70.5",

Podfile.lock
StripePaymentsUI (23.12.0)
faisal-rehman19 commented 8 months ago

@charliecruzan-stripe i don't think this is merely a cache issue. I cleared the cache as per the steps mentioned here: https://gist.github.com/mbinna/4202236 but still facing the same issue. I am using the following versions:

"react-native": "0.73.1",
"react": "18.2.0",
"@stripe/stripe-react-native": "^0.35.1"

In Podfile.lock StripePaymentsUI (= 23.18.3)

There is no img named stp_card_unknown@3x.png

image

Here is the error in xcode

Screenshot 2024-02-21 at 4 19 01 PM
faisal-rehman19 commented 8 months ago

Update: This only occurs in dev mode. Works fine in release mode.

Donnana-hiveway commented 4 months ago

I am having the same issue as well, tried to clear all caches and reinstall the cocapod and pod, reinstall the react native sdk package, still the same error