rse / node-prince

Node API for executing PrinceXML via prince(1) CLI
https://npmjs.com/prince
49 stars 24 forks source link

Mac download fails because download file is no longer gzipped #35

Closed beaugunderson closed 2 years ago

beaugunderson commented 3 years ago
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 3 years ago

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

beaugunderson commented 3 years ago

That’s fine, your code was not updated to unzip it though, it’s still trying to interpret it as a gzipped file and for that reason fails the module installation on macOS.

On Wed, Aug 4 2021 at 16:20, Wesley Moore @.***> wrote:

Yes we 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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rse/node-prince/issues/35#issuecomment-893038385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAPCX5AJI3CQMVTMP7FVXDT3HDKRANCNFSM5BRVJC7Q .

wezm commented 3 years ago

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

beaugunderson commented 3 years ago

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. ✨