infoxicator / react-native-star-prnt

React-Native bridge to communicate with Star Micronics Bluetooth/LAN Printers
MIT License
67 stars 65 forks source link

[iOS] Exception 'Native GetParsedStatusEx failed' when Printer Turned Off #24

Open kevinvangelder opened 5 years ago

kevinvangelder commented 5 years ago

Attempting to run StarPRNT.checkStatus after connecting to a printer and then turning the printer off causes

Exception 'Native GetParsedStatusEx failed' was thrown while invoking checkStatus on target RNStarPrnt with params(...)

Maybe this line needs to be wrapped in a try/catch? https://github.com/infoxicator/react-native-star-prnt/blob/3a371b61765bd1c13cfa9226d627c96d5909bf95/ios/RNStarPrnt.m#L109

AkshatGiri commented 5 years ago

I have the same issue. @kevinvangelder did you find a fix that could be implemented on javascript side? I don't think I can use the checkStatus method if there is a possibility of crash.

Help is appreciated. 🙃

kevinvangelder commented 5 years ago

I don't think I did, sorry.