#sahilasopa-android

1 messages ยท Page 1 of 1 (latest)

lament baneBOT
rough narwhal
tranquil echo
#

Hi there ๐Ÿ‘‹

rough narwhal
#

The transition between this 2 state, takes around 10 seconds for the first time and 3 seconds for other

rough narwhal
tranquil echo
#

I'm doing alright, what can we help with?

rough narwhal
#

I have described my issue above

tranquil echo
#

Would you mind clarifying what your concern is about the behavior that you described? Is it the length of the initial loading time, or the difference between the two times?

rough narwhal
#

the problem is, initial loading time is a lot, which gives user a bad ux

tranquil echo
#

Gotcha, and are you running this test on a physical device or on a simulated one?

tranquil echo
#

And is it happening consistently across multiple types of network connections (cellular vs wifi)?

rough narwhal
#

yes, and multiple devices as well

#

another quick question, does stripe support google pay in india?

tranquil echo
#

No, we do not support Google Pay or Apple Pay for customers in India.

rough narwhal
tranquil echo
#

I'm not sure off-hand, but am digging into it with my team.

craggy pawn
#

Hello ๐Ÿ‘‹
Stepping in here
Would you mind sharing an example PaymentIntent ID you're using to render the PaymentSheet?

rough narwhal
craggy pawn
craggy pawn
#

that's for elements. You'd want to look for a POST request to /v1/payment_intents

#

which creates a PaymentIntent

rough narwhal
#

there are none for them, in the logs

#

wait I got them

#

but the last one according to logs was 2 days ago

craggy pawn
#

huh interesting.. Do you have multiple Stripe accounts by any chance?

rough narwhal
#

Nope

#

but yes, 2 days ago I was using one time payments, but now I am using subscriptions

craggy pawn
#

Is your server-side code creating a subscription and then returning the PaymentIntent for the latest invoice?

rough narwhal
#

Yup

#

its returning subscription.latest_invoice.payment_intent.client_secret

craggy pawn
#

Okay, pulling up the last subscription created in testmode

rough narwhal
craggy pawn
#

Nope, I looked it up based on the other request you shared

#

this request to create the subscription was completed in under 2 seconds from our end
https://dashboard.stripe.com/test/logs/req_1Tt5X1WzO1pH8M

The reason I was looking for this was to make sure that the PaymentIntent creation on our end isn't delaying the rendering of the PaymentSheet in your app.

#

So with that out of the way, the next suspects could be

  • Latency between your app and your own backend server
  • UI/Any other logic/Code that runs in the background while your app is making a request to get the PaymentIntent and render the PaymentSheet
rough narwhal
#

actually, everything until creation of subscription goes well, once the backend returns the client_secret after that I launch the PaymentSheet UI, but that UI takes around 10 seconds to load for the first time

craggy pawn
#

Have you logged out the timestamps by any chance?

rough narwhal
#

nope

craggy pawn
#

If not, I'd recommend adding print statements in client-side & server-side code

#

just to make sure

rough narwhal
#

alright, but there's no way to log the payment sheet login time as its done on the stripe end

#

I would share a screen recording to make it clear

craggy pawn
#

req_iiYYWevBhvn53k
The request ID you shared above to /v1/elements/sessions was relatively fast (completed in under ~2 seconds)

rough narwhal
# rough narwhal

as you can see I load the payment sheet at 0:13 but its loads at 0:32 for the first time
but takes around 3 seconds to load for the second time

craggy pawn
# rough narwhal

Yeah thats quite slow, do you see anything error/logs in your logcat once you click the button to present the PaymentSheet?

rough narwhal
#

there are no error/logs, but I will re check, give me a moment

#

Nope, there are no logs related to this

#

although this gets logged as soon as the payment sheet is finished loading

#
Common causes for lock verification issues are non-optimized dex code
and incorrect proguard optimizations.
Method java.lang.Object androidx.compose.runtime.snapshots.SnapshotStateList.mutate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
Method void androidx.compose.runtime.snapshots.SnapshotStateList.update(kotlin.jvm.functions.Function1) failed lock verification and will run slower
#

I am unsure if it has anything to do with stripe

craggy pawn
rough narwhal
#

I already tried cloning this repo
I tried downloading the zip as well, but for some reason the zip says the zip file is invalid and git clone gives bunch of errors, I contacted another person from stripe support they said its something wrong with windows

#

for the zip file

#

fortunately it woked this time, I will run the app and update you

craggy pawn
#

oh that's quite weird. Have you tried using a different zip program like winrar to see if that helps?
Windows' inbuilt tool may have some issues

#

ah great

rough narwhal
rough narwhal
craggy pawn
#

๐Ÿ‘

rough narwhal
#

almost done

#

I was having trouble running the project, lots of gradle error, but they were from my side, as they are fixed now the project is being build

craggy pawn
#

๐Ÿ‘

rough narwhal
#

idk why but importing project is taking too long, as the stripe-android is a huge project

craggy pawn
#

no worries, take your time

short minnow
#

sahilasopa-android