#pro_code

1 messages ยท Page 1 of 1 (latest)

lethal kilnBOT
#

๐Ÿ‘‹ 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/1310671936736722965

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

upbeat quest
#

Hi ๐Ÿ‘‹

This isn't something I have seen reported elsewhere. Do you have errors that are logged out to the console?

limpid violet
#

Hello!

I am not receiving any errors at all when it occurs.

The only thing I've received is the Mac Error Window when an app crashes, but nothing related to the actual code.

upbeat quest
#

What kind of application are you building?

limpid violet
#

It's a React Native App using Expo

upbeat quest
#

Okay so in that case the errors would be thrown from React Native. When you review those logs do you see any clear errors?

limpid violet
#

I wasn't able to find anything relevant to the app.

upbeat quest
#

Sorry but I have absolutely nothing to go on right now so I cannot offer much guidance.

Since you are saying the error only occurs when you manipulate the CardField, I recommend adding logging statements to capture what variables change. i woudl also wrap your redirection attempts in some try { } catch(err) { } blocks to capture the crash and examine what error is thrown.

limpid violet
#

I did wrap the redirection in a try-catch-block and logged the error but no error was actually logged in the console.

#

So I understand that it's difficult for you to help, since the issue isn't logging anywhere.

upbeat quest
#

Okay but the app does crash? So it sounds like it's not the router change that is triggering the crash

limpid violet
#

Would you be okay with me sending a video of the issue?

upbeat quest
#

I don't think that'll help since there aren't any clear logs or error messages

limpid violet
#

Yeah I get it.

#

Well I appreciate your time, I'll keep looking!

upbeat quest
#

But it sounds to me like your app is trying to do something

#

When you do the redirect

#

Is the page looking for a value that doesn't exist yet?

limpid violet
#

I actually tried re-direct without a button press. In apps you can actually drag the page from left to right to head back to the old page. Same result there

upbeat quest
#

Right. That and the fact that the try/catch didn't stop the app from crashing both suggest to me it isn't the navigation that is the problem

#

Are there automatic actions like setting state that occur when your app loads the page you are navigating to?

lethal kilnBOT
limpid violet
#

No, nothing. I even tried it with an empty page and same thing happens there.

#

Empty page as in the redirect page is empty

old holly
#

Unfortunately we are not finding much else to test or try at the moment. Can you write in to our support team and provide the code for your empty page app that reproduces this error? If we can reproduce this on our side with your code, we can escalate to the team that works on the payment element

limpid violet
#

I can do that.

Is it worth trying React Navigation instead of Expo Router?

old holly
#

I am honestly not that familiar with RN myself but I would say so if it is something you can test quickly

limpid violet
#

So after some more testing, seems like it only crashes with router.back(). What I did test before was directing to an empty page. Directing to any page works, but router.back() causes it to crash after interacting with the CardField element from Stripe

#

router.back() works perfectly fine prior to the CardField interaction

old holly
#

Interesting. That is good to know, if you send that along with your code that should be perfect for escalating to my colleagues

limpid violet
#

My other solution will be to use a BottomSheet instead of a new page

old holly
#

Thank you, I will try to repro and file with my colleagues

limpid violet
#

So it's not a super big deal if this doesnt work out!

limpid violet
old holly
#

Glad you have a workaround! Really appreciate the effort all around