#pro_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
Hi ๐
This isn't something I have seen reported elsewhere. Do you have errors that are logged out to the console?
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.
What kind of application are you building?
It's a React Native App using Expo
Okay so in that case the errors would be thrown from React Native. When you review those logs do you see any clear errors?
I wasn't able to find anything relevant to the app.
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.
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.
Okay but the app does crash? So it sounds like it's not the router change that is triggering the crash
Would you be okay with me sending a video of the issue?
I don't think that'll help since there aren't any clear logs or error messages
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?
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
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?
No, nothing. I even tried it with an empty page and same thing happens there.
Empty page as in the redirect page is empty
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
I can do that.
Is it worth trying React Navigation instead of Expo Router?
I am honestly not that familiar with RN myself but I would say so if it is something you can test quickly
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
Interesting. That is good to know, if you send that along with your code that should be perfect for escalating to my colleagues
Here is the code.
You need to use router.push() to this file to get started
My other solution will be to use a BottomSheet instead of a new page
Thank you, I will try to repro and file with my colleagues
So it's not a super big deal if this doesnt work out!
Thank you very much!
Glad you have a workaround! Really appreciate the effort all around