rse/node-prince

Mac download fails because download file is no longer gzipped

beaugunderson opened this issue · 4 comments

error /Users/beau/p/canvas/web-to-pdf/node_modules/prince: Command failed.
Exit code: 1
Command: node ./prince-npm.js install
Arguments:
Directory: /Users/beau/p/canvas/web-to-pdf/node_modules/prince
Output:
++ checking for globally installed PrinceXML
++ downloading PrinceXML distribution
-- download: https://www.princexml.com/download/prince-13.6-macos.zip

-- download: 10917819 bytes received.
++ locally unpacking PrinceXML distribution
node:events:346
      throw er; // Unhandled 'error' event
      ^

Error: incorrect header check
    at Zlib.zlibOnError [as onerror] (node:zlib:190:17)
Emitted 'error' event on Gunzip instance at:
    at Gunzip.onerror (node:internal/streams/readable:769:14)
    at Gunzip.emit (node:events:369:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  errno: -3,
wezm commented

Yes we (YesLogic) had to switch to zip because the macOS notarisation service does not support tar balls.

The notary service accepts disk images (UDIF format), signed flat installer packages, and ZIP archives.

https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow

wezm commented

This isn't my/YesLogic code, it's a third-party community maintained package.

My apologies @wezm; was responding via email and did not pay enough attention. Kudos for wading into the issues on community projects. :)

If anyone else hits this on macOS installing a global version of Prince is a temporary workaround.