star-micronics / StarPRNT-SDK-iOS-Swift

StarPRNT SDK for iOS including libraries for supporting application development for Star printers.
https://www.star-m.jp/products/s_print/sdk/starprnt_sdk/manual/ios_swift/en/index.html
Other
42 stars 7 forks source link

The "endCheckedBlock" is neccessary? #6

Closed WenzhaoTan-Chowbus closed 1 year ago

WenzhaoTan-Chowbus commented 3 years ago

Version

StarPRNT 5.13.0 iOS 14.x

Description

When I call the endCheckedBlock of port, sometimes it throws an error EndCheckedBlock : PortException. But actually, the tickets have been printed out.

Question

Should we need to filter this error? Because it looks like the printer successfully prints the ticket.

gare-bear commented 3 years ago

@WenzhaoTan-Chowbus Thanks for your patience. begin/endCheckedBlock is optional but recommended. What printer & connection type are you using? Also, what is your endCheckedBlock timeout value set to?

It could be a combination of the length of the print job, and the timeout value. If the job is long and the timeout value is exceeded the SDK can throw an exception, but on the printer-side, the job will still continue to print.

WenzhaoTan-Chowbus commented 3 years ago

@gare-bear The printer we used is "MCP31" and the connection type is Ethernet. The timeout value is 30000mS.

So should I need to extend the timeout value?

gare-bear commented 3 years ago

That will depend on the length of your receipts but 30s should be more than sufficient. Can you help me reproduce this issue?

WenzhaoTan-Chowbus commented 3 years ago

Sorry, this issue is difficult to reproduce, we discovered it through our log system and user feedback. And port.endCheckedBlock this code return the error "EndCheckedBlock : PortException"

gare-bear commented 3 years ago

@WenzhaoTan-Chowbus We're you able to fix the issue or find the cause?

If you can reproduce the issue more reliably, it would make debugging the issue much easier. Also, it's really important that you use both begin & endCheckedBlock; you can't use one without the other.

bandit-ibayashi commented 1 year ago

This issue will be closed as there has been no movement for a long period of time. If you continue to experience similar issues, it would be appreciated if you could post another one.