-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 20001: StarIO10IllegalDeviceStateError #115
Comments
I would like to ask you a few questions to confirm the situation. My understanding is that there are 5 terminals (Castle S1F2) connected to 1 printer (mC-Print3) via LAN. Is that so? Also, regarding StarIO10IllegalDeviceStateError I would like to check the following:
The flow when connecting the printer and device is "PortOpen → Status acquisition → PortClose".
|
We use this library to discover. Using
It works for some terminals and some not in the same network. This is consistent across different venues so it doesnt seem to be a local thing.
We dont even get to that state. It simply doesnt return any printers during discovery. |
We're seeing this with 'Network Unavailable' even when the network is available (we observe traffic to our backend succeed, at the same time as this error). We see it across Android 12 and 13, on the latest version of star-io10. The devices are Lenovo YT-J706F and Lenovo TB125FU. The printer is TSP100iii on Bluetooth but this occurs during discovery. We also began seeing it in May '24, at the time on version 1.3.0. The error is persistent. So far we have not found a solution. |
@joarwilk @nuzayets This SDK ver.1.7.0 fixed an issue where StarIO10IllegalDeviceStateError(message: "Network Unavailable.") could occasionally be thrown even though the device is actually connected to the network. Thank you. |
The fix there said it's only for iOS. We're on Android 12 & 13, no effect there (we did try 1.7.0 before I commented). I did find a workaround: if we get Network Unavailable we scan without LAN and that works. Of course that will only work if people don't genuinely need LAN printers -- lucky for us that scenario hasn't happened since we don't officially support LAN printers (though some customers do use them). My thinking was their network is blocking UDP multicast or something since that's usually how printer autodiscovery works (for normal desktop printers anyway), it does seem to be specific to a customer location and we can't repro it in-house. Since the workaround (not scanning LAN if we get Network Unavailable) works, we haven't put resources into reproducing it in the lab as of yet. |
We apologize for the long wait. @joarwilk Printer: MCP31LB (F/W ver.3.81) Device: StarXpand SDK for ReactNative: 1.8.0
|
Yeah we couldn't reproduce it either. It happened at a customer site reliably even after switching hardware (both printer and Android device). We don't control their network so it's entirely possible something on their network was causing the LAN discovery to throw. There is likely a bug in handling unexpected behaviour in LAN discovery but I don't have any ideas. |
Since this does not occur in the lab, there may be a problem with the end-user's network environment. As shown previously, error 2001 is NetworkUnavailable. If you have any comments please let us know. |
Description
When discovering, it fails with error 2001: StarIO10IllegalDeviceStateError.
When shipping a batch of, say, 5 terminals, this can happen on 1-5 of those. It seems to be random.
How can we debug this invalid state?
Your device where the bug occurs
Castle S1F2
Verifone / Adyen, not sure about version
Your printer
mC-Print3
Unsure
LAN
To Reproduce
Start discovery. An error is caught with error code 2001 and description StarIO10IllegalDeviceStateError.
Sometimes its error 2000, with description "y"
Expected behavior
Printers are found
The text was updated successfully, but these errors were encountered: