#al_api
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/1427624617752793180
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
Hi!
The full error log from the app on device trying to discover the reader:
which code are you running exacrtly that returns this error?
This is my discover reader method, I started with the code from the Stripe example app.
This code is suffered a couple of rounds of guesses
It checks the initialization of the terminal, I noticed that the Terminal initializes when I use both React package and the native Android package.
But the discovery always says "can't connect to Stripe"
thanks, having a look
thanks. I am doing something wrong, I am not sure what exactly.
I can connect to the devkit reader from Sripe, and from our web server.
But the app on the devkit said it cannot connect to Stripe to discover the reader.
Hey! Taking over for my colleague. in the logs, could you add how are you fetching the connection token and that the app to your server is good ?
Also can you log the response of discoverReaders ?
sure, let me try that, 30 minutes
Yeah, I've been stupid when I moved code form React to a native Android.
I haven't setup the auth properly, as you guessed above.
When I set up connection token correctly, I get this.
Now I can connect to Stripe, but I cannot discover the readers.
Hey there, my colleague had to step away so i'm taking a look at this now
What does your discover config look like? (in discoverReaders(config, ... ))
val config = DiscoveryConfiguration.HandoffDiscoveryConfiguration() - I copied it from https://github.com/stripe-samples/terminal-apps-on-devices/blob/main/app/src/main/java/com/stripe/aod/sampleapp/model/MainViewModel.kt#L42
You know, maybe I asked for help too early.
I've been guessing and doing trial and error for a while.
I think my code is not as solid as it should be.
I still cannot discover the handoff reader, but I will try more and go back to this conversation later.
Sure, that sounds like a good plan. I'm not aware of any reason you wouldn't be able to discover the host reader, though.
"pst_test_YWNjdF8xS3BhblNRM3VraG9sMWJaLE1rVzBQbU1yTE9HVERkb2JyQ1lHT1JrVG9ZUVBDaTA_00LJkeuBKJ" - my connection token looks ok
Just so I can check a couple of things, can you please share the reader SN?
SDR70Z1C430003028
I will investigate these two log messages
10-14 06:34:03.887 4234 4443 D StripeTerminal: class=AdapterRepository message="Switching adapters" from=null to=RemoteReaderAdapter
10-14 06:34:03.887 4234 4443 D StripeTerminal: class=RemoteReaderAdapter message=discoverReaders
10-14 06:34:03.889 4234 4443 I StripeTerminal: class=HandoffReaderController message=discoverReaders location=null readerAidlServer=Reader(appPackageName=Reader(value=com.stripe.reader))
- why does it "Switching adapters" from=null to=RemoteReaderAdapter
2 )location=null - maybe I need to setup the location id somewhere
Could it be an issue that the company is located in the USA.
And I, the developer, is located in Czech Republic?
Hmm looking at the pst token you shared and the reader SN, it looks like the reader is registered to a location on your platform but the token is on a snadbox express connected account
Can you try creating a location on that same connected account and registering the reader to that location, then discover again?
huh, this could be the answer
thank you very much
I will check our sandboxes in about 4 hours and come back to you with the result