#paul_api

1 messages ยท Page 1 of 1 (latest)

fast ingotBOT
#

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

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

pliant crescent
hardy iron
#

ah, perfect. So on App load, there's 2 requests for connection tokens:

  • req_rbuwkaVX5Lmt0z
  • req_g7GcNXwxuGTDBz

Then I've tried discoverying twice :

  • req_aMIcwDJ4QntvW9
  • req_lADPydNn3roAdr
pliant crescent
#

Based on our internal logs, both API requests took around 0.15 seconds to complete

#

Do you have the ID of the request that took 1 minute?

hardy iron
#

I'll see if I can reproduce, yeah.

#

hmm, it just took a while then.
connection req was this: req_z5aMkmUxkWN80M

#

another connection token: req_JHIgD6IA87OzKS

#

I can't see the terminal/readers request though ๐Ÿค”

#

(sorry, i gotta run, will be back on a bit later)

#

thanks for looking into it for me

#

ah, yeah. here they are. they took a while to show up on the logs page:

#

req_4t9J6V7NEy2tUg

#

req_36q1iimFHj4HsL

#

^^ consistently around 50 seconds, for the hook to return with an empty list of readers

pliant crescent
#

Based on what I saw, req_4t9J6V7NEy2tUg took 0.17 and req_36q1iimFHj4HsL took 0.417

hardy iron
#

hmm, interesting. Its taking 50 seconds (ish) on my end. That is the time between:

const { error } = await stripe.discoverReaders({
discoveryMethod: "internet",
simulated: false,
});

and the hook returning...

onUpdateDiscoveredReaders: async (readers) => { ...

#

Putting the timing aside for a sec, is there any obvious reason why it's not returning the reader assigned to that location?

pliant crescent
#

Is your terminal reader connected to a stable network?

#

Can you share with me the terminal serial number?

#

Or the terminial reader ID

hardy iron
#

SDR70Z1C335000135

#

yeah, it

#

's connected to my wifi.

#

Those last couple requests that took a while - I was upstairs next to my modem. Just to make sure it wasn't a poor connection downstairs.

#

I also use NetInfo which shows a wifi disconnection on screen - thats been tested successfully. Also all comms to our backend connect fine.

pliant crescent
#

I saw quite a number of com.stripe.stripeterminal.external.models.TerminalException: DiscoverReaders was canceled by the user

hardy iron
#

after it fails, I have 'search for readers' button - which calls await stripe.cancelDiscovering(); before trying to discover again

pliant crescent
#

Hmm, I realized that you didn't specify the location when calling discoverReaders, can you add in the location and try again?

#

You mentioned "after it fails", did discoverReaders return any error?

hardy iron
#

didn't return an error, no. it gets returned from onUpdateDiscoveredReaders just with an empty list (expecting 1 reader)

#

react native doesn't seem to support the location paramater, in the discoverReader request

#

(I was hoping to scope the results this way)

#

DiscoverReadersParams DiscoverReadersParams: { discoveryMethod: Reader.DiscoveryMethod; simulated?: boolean; timeout?: number }

#

for our App, if it just returns all readers - we can deal with it.

pliant crescent
#

Ah, I thought you were using the javascript SDK.

#

Yes, location isn't available in the terminal react-native SDK, and this SDK is currently in beta.

hardy iron
#

yeah, that's all good. I'm doing the location filter myself for the moment ๐Ÿ™‚

pliant crescent
#

I'd recommend you upgrading to the latest version of the SDK. If the problem persists, create an issue in github https://github.com/stripe/stripe-terminal-react-native/issues. Alternatively you can also reach out to support https://support.stripe.com/contact/email , they can forward your inquiry to the relevant team.

hardy iron
#

latest version โœ…

All good. Is it possible to reference this thead if I email support?

#

(all good, I found the copy link)

#

Thanks for your time Jack