#khoa-h-trn_unexpected

1 messages · Page 1 of 1 (latest)

lapis aspenBOT
#

👋 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/1222214362627051570

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

cunning canyonBOT
ripe lichen
#

Hi 👋

What are you actually trying to do? What is the command/API request you are making?

onyx finch
#
#

When I get discoveredReaders and connectedReader by useStripeTerminal, it returns Reader.Type objects with all null label fields

ripe lichen
#

Can you share the request ID for an Update Reader request where you set the custom label?

onyx finch
ripe lichen
#

No the request ID. It will start with req_. You can find it in your Stripe dashboard in the Developer section

onyx finch
#

Here is the latest request
req_UykDNu10PlnCuR

ripe lichen
#

Okay great! Taking a look

#

Okay I see that label being returned in the API repsonse. So my first question is, why are you making a second request when the response to the first has the label you are looking for?

#

I can also see the label value saved to our internal system.

onyx finch
#

I updated by API from server side, and expected that I can get the updated label in our client app by using useStripeTerminal hook in @stripe/stripe-tẻminal-react-native lib

ripe lichen
#

And are you doing this during your DiscoverReaders action?

onyx finch
#

yup. discoverReaders and connectBluetoothReader

ripe lichen
#

Okay and where specifically are you looking to see the reader.label show up?

onyx finch
#

discoveredReaders contains array of Reader.Type objects and connectedReader contains a Reader.Type object

ripe lichen
#

Okay but that doesn't answer my question. Where are you attempting to access the reader.label?

onyx finch
#

I debugged and logged it

ripe lichen
#

In what part of your code?

onyx finch
#

Here is the sample code, I use React Native:
const { connectedReader } = useStripeTerminal();
useEffect(() => {
console.log(JSON.stringify(connectedReader));
}, [connectedReader]);

#

Let me run and capture the log for you

lapis aspenBOT
weak trail
#

Hello! I'm taking over and catching up...

#

What's the ID of the reader you're tyring to get the label for?

harsh hemlock
#

The reader ID is: tmr_FYH4zAvMfBtmvM

#

Hi @weak trail

weak trail
#

Okay, and what's the output of that console.log you mentioned above?

onyx finch
#

Here is the output

weak trail
#

Hm, that's very strange. I'm not sure why label is null there. Still looking around though, hang on...

#

What version of the React Native Terminal SDK are you using?

onyx finch
#

It's @stripe/stripe-terminal-react-native 0.0.1-beta.15

weak trail
#

So everything else works, you can connect and use the Reader successfully, it's just that label is always null in React Native?

onyx finch
#

That's right

weak trail
#

I'm not sure why that would be the case. Can you try v0.0.1-beta.16 and see if there's any difference?

onyx finch
#

I tried to install the version beta 16, but got this issue