#chaima_reactnative-identity-crash

1 messages · Page 1 of 1 (latest)

safe ravenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1268973975501803521

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

rose sandalBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rich harness
#

What Stripe docs are you following to implement this? What logs are you looking at?

timid ocean
#

I am not search for log, the problem that the app is closed without display any error

worthy saddle
#

hello, give me a minute, I can try help

#

that usually means an unhandled crash or error in the underlying native SDKs, which cause the app to crash. Looking more

timid ocean
#

I do I am trying since two days but still the same problem

worthy saddle
#

can you share your code? I want to see how you are initializing Stripe Identity SDK, how you are calling useStripeIdentity hook

#

and pls also log the fetchOptions you are passing to useStripeIdentity

#

let's start with those 2 things

#

also 3/ is itcrashing on iOS? Android? Or both?

safe ravenBOT
timid ocean
#

For now android I still didn't see ios, I kog fetchoptions is great

#

const Wallet = () => {
const { theme } = useTheme()
const { t } = useTranslation()
const { getWallet, verifySession} = useWallet()
//const { transactions } = useSelector((state: any) => state.profile)
const [fetch, setFetch] = useState(false)
const [status, setStatus] = useState("");
const [err, setError] = useState();

const fetchOptions = async () =>{
       const response = await verifySession({ email: "chaima12@gmail.com", name: "chaimaFen"})
          console.log("response123", response)
        return {
        sessionId: response?.customer?.sessionId || "",
        ephemeralKeySecret: response?.customer?.ephemeralKey || "",
        brandLogo: Image.resolveAssetSource(Logo)
        }
  };

  //const { status, present, loading } = useStripeIdentity(fetchOptions);
  const present = async () => {
    // without provided hooks implementation user has to manage error and loading states manually
    try {
        setFetch(true);
        const options = await fetchOptions();
        setFetch(false);
        console.log("options", options);
        const result = await presentIdentityVerificationSheet(options);
        console.log("result+++++++++++++", result); // Log the full result
        const { status, error } = result;
        setError(error);
      } catch (err) {
        console.error('Error presenting identity verification sheet:', err);
        setError(err);
        setFetch(false);
      }
  };
 
  

const handlePress = useCallback(() => {
    present();
}, []);

/* useEffect(() =>{
getWallet()
}, [])*/
console.log("status", status, err)
export default Wallet

worthy saddle
#

and the line of code where this is crashing is

  //const { status, present, loading } = useStripeIdentity(fetchOptions);

correct?

or does it crash on presenting sheet?

#

also what version of Stripe Identity RN SDK are you on? ]

#

@timid ocean are you still there??

timid ocean
#

Yes, 0.2.13

worthy saddle
#

gotcha and can you tell me about the other question? Which line of code it is crashing

timid ocean
#

It crush when present

worthy saddle
#

got it

timid ocean
#

The method

worthy saddle
#

there's some Material stuff required and a min Android API version