qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Firefox intermittently works with HTTPS #46

Closed tresf closed 9 years ago

tresf commented 9 years ago

HTTPS pages require a special certificate installation into Firefox. Currently QZ Tray installs or deletes the certificate at launch time, depending on the current install state of QZ Tray (uninstall forces certificate removal).

There seems to be a race condition on the loading of Firefox which causes the browser to start before the certificate has completed being uninstalled and reinstalled. This race condition is likely to affect all Firefox versions on all platforms (Mac, Windows, Linux).

A temporary solution is to delete C:\Program Files (x86)\Mozilla Firefox\defaults\pref\firefox-prefs.js after Firefox has loaded the first time.

A permanent solution will require some more elaborate logic in terms of when to install and when to delete the certificate. Should be ready by the time 1.9.2 is released.

Edit: 1.9.2 is released, grab it here: https://qz.io/download

tresf commented 9 years ago

Tested on Windows, MacOS and Linux with 100% success.

The new method uses a timestamp in the Firefox preferences area (about:config) which stores the timestamp of the last install. This prevents redundant and unecessary re-installation and re-uninstalls of the certificate each time Firefox loads.

image

On install, it stores the timestamp since 1/1/1970 in milliseconds. On uninstall, it stores -1.