alexandercerutti / passkit-generator

The easiest way to generate custom Apple Wallet passes in Node.js
MIT License
829 stars 104 forks source link

Error: Invalid PEM formatted message #192

Closed Leykwan132 closed 5 months ago

Leykwan132 commented 6 months ago

Running OS

MacOS Sonoma 14.3.1

Running Node Version

v21.6.2

Description

Error: Invalid PEM formatted message. I am kinda lost when dealing with certs. There is no clear instructions on how to proceed with certs. The wiki stated the key files can be .key but I saw some issues submitted have key ending with .pem. I am puzzled.

image

Expected behavior

Steps to reproduce

let wwdr = "certs/wwdc.pem"; let signerCert = "certs/signerCert.pem"; let signerKey = "certs/signerKey.key"; let signerKeyPassphrase = "certs/signerKeyPassphrase.key"; const pass = await PKPass.from({ model: "models/sample.pass", certificates: { wwdr, signerCert, signerKey, signerKeyPassphrase, },

alexandercerutti commented 6 months ago

Hi @Leykwan132, thanks for using passkit-generator!

Have you tried, as documentation says, to pass the content of the files instead of their paths?

Let me know!

Leykwan132 commented 6 months ago

Yes. It's working now but the Console.App is giving me

signature verification failed for signer 0 Invalid data error reading pass pass.com.quickcard/8j23fm3. Manifest signature did not verify successfully Failed to add pass: 'file:///Users/leykwanchoo/Downloads/Test<decode: can't compose [%20P]>

I followed the cert generation in terminal which gives me signedKey.key and did "123456" for the generation phrase. I will retry the generation of certs but with macOs this time.

alexandercerutti commented 6 months ago

That's a weird error. Let me know if you are able to make it work. I'm not sure why it happened to you but that "0" does not seem good. Did you check your certificates contents?

alexandercerutti commented 5 months ago

Hi @Leykwan132 were you able to solve? Can we close this?