-
Notifications
You must be signed in to change notification settings - Fork 287
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
can not suppress the untrusted pop up with self sign certificate -- clue please! qz 2.2.4 #1315
Comments
Only one of these steps is needed. I would recommend only using one to improve your baseline testing.
Please do not do this. Our licensing bypass has nothing to do with SSL. ❤
Yes, we have it built into Site Manager now, just click the little tiny
|
Oh... make sure to setup the security before connecting please. That's probably your only problem. |
Hi @tresf , I very appreciate for your kind responses,
ok i will choose one only using the override.crt
OK, i get a safer feeling. will remove the remove the import.
yes, this morning i just find that the setup security should be earlier than the connect, the untrusted pop up suppressed and i see in the qz tray log, that the my demo site is added to allowed list, but now my printing test is just hanging, i found in the qz tray log this: 2025-02-22T15:18:13,818 [WARN] Failed to retrieve QZ CRL, skipping CRL check and i still dont know what is that mean. It seem the the process is stuck on this line ... resolve(data.result.signature); of the function: // ✅ Step 2: Set Signing Signature
qz.security.setSignaturePromise(function (toSign) {
console.log("📜 Signing Message:", toSign);
return new Promise((resolve, reject) => {
fetch('/qz-tray/sign', {
method: 'POST',
cache: 'no-store', // ✅ Prevent caching
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: "2.0",
method: "call",
params: { "message": toSign }
})
})
.then(response => {
if (!response.ok) {
throw new Error(`Server responded with ${response.status} ${response.statusText}`);
}
return response.json();
})
.then(data => {
console.log("🔍 Server Full Response:", JSON.stringify(data, null, 2));
if (data?.result?.signature) {
console.log("✅ Signature received:", data.result.signature);
resolve(data.result.signature);
} else {
const errorMessage = "❌ Error: 'signature' field is missing in response.";
console.error(errorMessage, data);
reject(new Error(errorMessage));
}
})
.catch(error => {
console.error("❌ Signature Request Failed:", error);
reject(error);
});
});
});
console.log("✅ QZ Tray Security Configured Successfully!"); and i tried to leg every step on console, here are they:
HANGING .... |
Your problem is here:
I would recommend switching your code to use a function for a baseline, then changing it to async/await once you know it's working. qz.security.setSignaturePromise(function(toSign) {
return function(resolve, reject) {
/// YOUR CODE
resolve(/** YOUR SIGNATURE **/);
};
}); |
Ok finaly i can manage for the successful signing process, Thank you @tresf for your help. Now i need to render the label printed on SATO at ZPL mode, is there any references to the parameters name or key, at now i am still getting labels's length less than i need while i specified the length already. |
The best reference for ZPL designing is Labelary: https://labelary.com/viewer.html |
--"The best reference for ZPL designing is Labelary: https://labelary.com/viewer.html"-- Yes sure, i have been there for designing the label, and have the label template layout already, when printed the length of label just not follow what is already good on labelary. Suspect on the printer config or in the parameter to pass in the printing function. |
You should replace your The label length can be set with If using fixed-size labels, running the printer's calibration will be needed for fixed-size labels that are not printing completely. Usually a series of button presses/holds (or special calibration button in the device driver) will calibrate the printer. Please contact your printer's manual for the specific procedure. QZ Tray does not send any label size information when using RAW mode unless provided -- by you -- through commands. The commands shared above do not appear to contain any label size information. Any size information passed to QZ Tray via config values is ignored when using RAW. |
Hi i found this qz tray, and i am a beginner developer, want to try this qz for direct and silent printing from web application directly to the printer without user intervention at all.
I install qz-tray version 2.2.4 on windows laptop at the moment for trial and small development task. I believe qz tray seem the right tools, But this un-trusted pop up off course make the feature dont match the objective anymore.
I have spent quite lot of time to learn to suppress the un-trusted popup. Here what i have done:
--> The site Manager on QZ has make my demo.site.tld as allowed
.......
but qz keep still keep untrused.
Question:
I read the author comment on a tutorial that overriding this untrusted pop up ca be override with Self Signing Cert without need compiling from the source, IS IT STILL THAT WAY on 2.2.4? i still believe that statement that is why i keep scratching
Need Clue or Help, please help with some clue or guidance what do i still miss or not righly done and what and how the right way is.
I understand the author is not willing to have official and followable tutorial, but some clue please.
Or community here may help me. Thank you.
The text was updated successfully, but these errors were encountered: