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

Unknown Error return while checkPrinterStatus #11

Open
AlexThoh88 opened this issue Jul 14, 2022 · 3 comments
Open

Unknown Error return while checkPrinterStatus #11

AlexThoh88 opened this issue Jul 14, 2022 · 3 comments

Comments

@AlexThoh88
Copy link

AlexThoh88 commented Jul 14, 2022

Hi,

I had tried the sample provided and getting "Unknown Error" when the code pass through checkPrinterStatus. After my further study, the message return from read() is 'Unauthorized device detected'. Any advise?

Thank you.

@issabm
Copy link

issabm commented Sep 1, 2022

Hi,
u got the same errors as you.
i guess i skiped the status check because i think there are some issues with it.
i just called browserPrint.print despite having "unkown error" and it's printing without issues.

@AlessandroSoci
Copy link

Hi,
I had the same problem.
I resolved the 'Unauthorized device detected' by changing the uid. Because I found out that it's necessary the :9100 even in the uid, and they parse ":" from the json given by the function "getDefaultPrinter" (const uid = this.cleanUpString(deviceRaw[4]); )
What I did is modifying the function clenUpString from

  cleanUpString = (str: string): string => {
    const arr = str.split(':');
    const result = arr[1].trim();
    return result;
  };

to:

  cleanUpString = (str: string): string => {
    const arr = str.split(':');
    const result = arr.slice(1).join(":").trim();
    return result;
  };

I still get "Unknown Error" in the response, but at least I can print the labels as @issabm suggests.

@JoshSGman
Copy link

I'm having the unknown error issue too, I'm seeing ~HQES get printed - not sure what that means. Any help would be appreciated! Printing on a ZD421 and using Browser Print v1.3.1.445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants