star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
83 stars 54 forks source link

Intermittent Printer open fails with error code: 0 #28

Closed anshah closed 2 years ago

anshah commented 2 years ago

Failure is happening when we call open on the printer:

let printer = new StarPrinter(printerConfig.connectionSettings);
await printer.open();

The exception we get is below:

"error":"{\n  \"name\": \"v\"\n}",

"error":{"_errorCode":0,"name":"v","line":63,"column":331,"sourceURL":"index.android.bundle"

Initially Printer open and print works fine for some time and then it starts failing continuously with this error. If we reinstall it gets fixed.

bandit-ibayashi commented 2 years ago

We are sorry not to response for a long time. If you continue to have this problem, please let our staff in your region know along with the model, interface, and device information from this page.

Frankiz123 commented 2 years ago

@bandit-ibayashi what is the solution of Invalid resource not printing

Frankiz123 commented 2 years ago

@bandit-ibayashi any solution?

gare-bear commented 2 years ago

@Frankiz123 error code: 0 means there is no error.

https://github.com/star-micronics/react-native-star-io10/blob/83ad5d7a4acd444a2fcc1db05d2d7ee9d001c3ad/src/StarIO10ErrorCode.ts#L1-L9

We'll need more information to debug the issue.