#matty_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/1428761080523522070
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is the js object I am passing with the serial number redacted.
{
"ip_address": "192.168.1.187",
"serial_number": "STR******"
}
Is there an error code that is being outputted? Can you share the serial number so I can see if there are specific logs? The serial number is not a sensitive piece of information that needs redaction in this case
No error code other than the original message I sent you. Serial is: STR70Z1C502003116
I was able to find the logs, the most recent one stated
Invalid Type. Received {
"ip_adress": "192.168.1.187",
"serial_number": "STR70Z1C502003116"
} but expected something of format: {
"ip_address": "string",
"serial_number": "string"
}. This should be a reader from the results of the `discoverReaders()` method call.
In this case ip_address is misspelled. There are several other log lines that have different misspellings. Can you double check your code to make sure there aren't any typos now?
I am trying to break it to see if their is something else wrong. That was just one of my tests.
I just tried to pass the full reader object to the connect to no avail either.
Got it, thanks for the context. I will keep investigating
Hello, have you tried running nslookup or something to check that https://192.168.1.187.stripe-terminal-local-reader.net is resolvable?
Also can you send your snippets of code for trying to call this method here? I am sure they are more or less what is in our docs but it can be helpful to double check
I pinged the IP address on the network and that responded. NSLookup shows a non-existent domain?
The terminal address should be reolvable, and resolving that is needed for this connection to happen properly, so it is definitely worth checking
When I saw this working, and it was trying to connect to another device that was on a different IP address, I received the same message, but the IP address was in the URL.
Yep, that is surprising and I'm trying to figure out how to debug that. As mentioned, having your code snippets could definitely be helpful here.
And interesting, this same code consistently works on another device but on this one it always returns that undefined error message?
Not the same code. Different setup, the other code isn't accessible at this time. Trying to get you some snippets.
Here is what I have been working with. I just kept it simple to weed out any issues.
I've checked the TerminalConnectionToken code and the token secret is set properly.
Interesting, I haven't seen the connectReader method used like that before. Does your other code construct its own object with the IP and serial like that when it is successfully connecting to readers?
I am not 100% sure. It's been a minute.
How should we connect?
Typically your code should call the discoverReaders method which returns a list of readers, then you pass the reader from that list that you want to connect to to connectReader
https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=js&reader-type=internet#discover-readers
I would say definitely try that now to see if it connects successfully. This issue could be related to some of the other data that is normally packaged with the reader object, or something else that discoverReaders is supposed to do
I'm updating quickly based on that. I think this is how I started and it failed that way as well.
Well... that is time I'll never get back. That appears to be the proper course. I can't tell you how amazing your team is and thank you enough. I appreciate all of you!
Glad we could help! Let us know if you could run in to anything else