#matty_api

1 messages ยท Page 1 of 1 (latest)

gaunt archBOT
#

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

fleet oriole
#

Here is the js object I am passing with the serial number redacted.

{
"ip_address": "192.168.1.187",
"serial_number": "STR******"
}

runic osprey
#

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

fleet oriole
#

No error code other than the original message I sent you. Serial is: STR70Z1C502003116

runic osprey
#

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?

fleet oriole
#

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.

runic osprey
#

Got it, thanks for the context. I will keep investigating

proven shadow
#

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

fleet oriole
#

I pinged the IP address on the network and that responded. NSLookup shows a non-existent domain?

proven shadow
#

The terminal address should be reolvable, and resolving that is needed for this connection to happen properly, so it is definitely worth checking

fleet oriole
#

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.

proven shadow
#

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?

fleet oriole
#

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.

proven shadow
#

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?

fleet oriole
#

I am not 100% sure. It's been a minute.

How should we connect?

gaunt archBOT
proven shadow
#

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

fleet oriole
#

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!

proven shadow
#

Glad we could help! Let us know if you could run in to anything else