#beeeeeeeeeeee2

1 messages ยท Page 1 of 1 (latest)

storm riverBOT
#

Hello! We'll be with you shortly. 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.

tough geode
#

the previous threads arent relevant to this question I dont think ๐Ÿ‘

glad kraken
#

Hi ๐Ÿ‘‹ I'm not too familiar with Android specifically, but that doesn't look like enough context to understand what could be going wrong.

#

What is the crash you're seeing?

tough geode
#

I've been trying to use the CardField component in your stripe-react-native package and when I place it inside of a Modal component from the react native package it just crashes instantly

#

no js errors, straight android crash

#

and I was wondering if anyone can reproduce this or is there something wrong with my setup more fundamentally. because the snippet i provided above is literally all it takes for it to crash on my end. If the CardField component is not placed inside a Modal component it works fine. And on iOS it works fine regardless.

#

and yes hello to you as well ๐Ÿ˜Š ๐Ÿ‘‹

glad kraken
#

I'm not familiar enough with RN on Android to know what questions to be asking to try to get more context, so I'm asking a teammate to take a look.

tough geode
#

thanks I appreciate it ๐Ÿ™

wicked verge
#

๐Ÿ‘‹

#

jumping in to help here

#

Can you share the logs you're seeing when the app crashes?

tough geode
#

adb logs?

wicked verge
#

yup

tough geode
#

do you need more context? the logs are huge and i'm not sure what is significant

wicked verge
#

If you take out the <Modal> and switch to a <View>

#

does that make a difference?

tough geode
#

Yeah, wrapping it with a View doesnt cause a crash

wicked verge
#

Seems like Modal is the issue here.
However, React Native SDK shouldn't crash without any specifics logs.

That makes things more difficult to debug

tough geode
#

The collaboration of modal and cardfield seem to really tip it over the edge. just having a modal with content also works fine for me. and just having a cardfield is fine as well ๐Ÿ‘€

wicked verge
#

yeah probably some sort of context is getting dropped when you embed CardField in a Modal

#

Logcat has couple of Exceptions but I suspect the crash is due to
ReactNative: java.lang.IllegalStateException: Cannot locate windowRecomposer; View androidx.compose.ui.platform.ComposeView{a594bf3 V.E...... ......I. 0,0-0,0 #7f0a03ee app:id/icon} is not attached to a window

tough geode
#

i suppose yeah. im not very experienced with android but ill google it see if anything pops up

wicked verge
#

I'd say clear out the logcat before loading the Modal OR try and load the Modal on a button click

#

that should let you confirm if this is the exception that's causing the crash

#

before you look too deep, should make sure we're looking at the right thing

tough geode
#

i'll try to render it after a button click

#

even after a button click the app still crashes with a "APP keeps stopping /n app info /n close app" android message

wicked verge
#

yeah look into the logs if you're seeing the same exception there

#

I'd say keep the logcat command running when you click on the button

tough geode
#

ah ok gotcha, 1sec

#

looks like the same error yeah

wicked verge
#

actually it might be the other one

as the second exception is categorised as fatal one

11-07 16:15:30.450  4246  4246 E AndroidRuntime: Process: de.bisonapp, PID: 4246
11-07 16:15:30.450  4246  4246 E AndroidRuntime: java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.FrameLayout{706ec96 V.E...... ......I. 0,0-0,0}```
#

Is this a brand new app you're building?

tough geode
#

ah yes youre right

#

nope not brand new

#

ive encountered these issues when upgrading to the latest stripe-react-native

#

we were on 0.27.2 before and that works fine with the modals

wicked verge
tough geode
#

i can try to but it might take a while ive never setup a RN app from scratch

wicked verge
#

That's fine. Take your time.

tough geode
#

for what its worth we do have:

    implementation ("androidx.appcompat:appcompat:1.3.1") {
         version {
             strictly '1.3.1'
         }
     }
// ...

}```

in our build.gradle
wicked verge
#

gotcha. Yeah that issue is about a year old so won't be surprised if anything changed

tough geode
#

its funny they mention the "appearance" prop in the issue as that is the very reason i was trying to upgrade to the latest stripe-react-native

#

we have a dark mode and google's platformpay button is strictly black unless you have stripe 0.34.0+

wicked verge
#

๐Ÿ˜… yeah google tends to change things randomly