Skip to content
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

Strange behavioue #82

Open
sKY02644 opened this issue Aug 16, 2022 · 7 comments
Open

Strange behavioue #82

sKY02644 opened this issue Aug 16, 2022 · 7 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@sKY02644
Copy link

Steps to Reproduce

just strange behaviour

  1. ... No idea how to as it might it working on all other machines just one

Evidences

SO EVERY THING IS WORKING FINE EVEN AFTER BUILD FOR PRODUCTION BUT THERE IS ONE MACHINE THAT SHOWS PRINTING THE DOCUMENT BUT THE DOCUMENT IS NEVER PRINTED AND NO ERRORS ARE SHOWN TO.

PLEASE ASSIST ME DEBUG IM KINDA CONFUSED

@sKY02644 sKY02644 added help wanted Extra attention is needed question Further information is requested labels Aug 16, 2022
@sKY02644
Copy link
Author

I TRIED THE PRINTER FROM A DIFFERENT MACHINE AND IT PRINTED SO THE PRINTER IS NOT FAULTY

I ALSO TRIED TO USE THE SAME JAVA VERSION GOT THE SAME BEHAVIOUR

IM REALY CONFUSED

@sKY02644
Copy link
Author

I JUST NOTICED ANOTHER MACHINE IS HAVING THE SAME PROBLEM NO ERRORS DOCUMENT IS BEEN SENT TO PRINTER BUT ITS NOT PRINTING

@anastaciocintra
Copy link
Owner

Hi @sKY02644 ,
We have some clues.

  • Some machines is printing well
  • Other ones are not printing and does not show error.

If you are not using PrinterOutputStream, disregard the answer!

Ok, if are you using PrinterOutputStream, it can be reproduced by installing one printer on system (with no real printer connected to it)

How to reproduce:
In my ubuntu machine, I have one good and real printer installed (TM-T20), and other fake printer (CUPS-BRF-Printer) as you can see on screenshot.

Both printers is listed on PrinterOutputStream.getListPrintServicesNames(), and can be used as "printer name" without error, but only TM-T20 send content to the printer!

java -jar getstart-4.1.0-jar-with-dependencies.jar 
Usage: java -jar getstart.jar ("printer name")
Printer list to use:
CUPS-BRF-Printer
TM-T20

Solution
If it is your case, the solution is simple: just ensure that the printer is correctly installed on the system.

Screenshot from 2022-08-16 10-04-52

@sKY02644
Copy link
Author

@anastaciocintra THANK YOU FOR THE QUICK REPLY

PrintService printService = PrinterOutputStream.getDefaultPrintService();

I AM ACTUALLY USING THE PrinterOutputStream AND THE PRINTERS ARE XPRINTER PRINTERS THE PRINTERS ARE INSTALLED CORRECTLY

@sKY02644
Copy link
Author

sKY02644 commented Aug 16, 2022

THE APPLICATION HANGS AWAITING FOR THE PRINTING TO COMPLETE BEFORE IT CONTINUES AND SINCE THE COMMAND IS SENT TO THE PRINTER BUT ITS NOT PRINTED

ALSO THE MACHINES PRITING , I JUST NOTICED ARE THE MACHINES WE USE FOR DEVELOPMENT WHEN WETEST THE PRODUCTION VERSION ON OTHER MACHINES IT SENDS COMMAND TO PRINTER AND SHOWS PRINTING STATUS BUT NEVER PRINTS

@anastaciocintra
Copy link
Owner

@sKY02644 ,
I could be wrong, and that we have a bug in the lib,
but, In my humble opinion, you have environment differences, something like:

  • the printer itself: same brand / model / interface, etc;
  • profile of user in production in general have less power in comparison with development profile;
  • java version and configuration on desenv / production differences;

@sKY02644
Copy link
Author

sKY02644 commented Aug 16, 2022

  1. ALL THE PRINTERS WHERE TESTED WITH THE SAME DRIVERS ON A WORKING MACHINE AND ALL WORKED

QUICK SIDE NOTE WE ARE CALLING THE JAR FILE FROM AN ELECTRON APP WHICH WE USING THE java-caller MODULE TO CALL THE JAR FILE

ALL JAVA VERSIONS ARE THE SAME ACROSS ALL THE MACHINES

THIS JAR FILE READS A .JONS FILE WHICH IT DOES AND GENERATES THE RECEIPTE AND SENDS IT TO THE DEFAULT PRINTER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants