Invalid stream generated
See original GitHub issueI have following pass structure in my code: examplepass.pass (folder)
icon.png icon@2x.png logo.png logo@2x.png pass.json
keys (folder)
signerCert.pem signerKey.pem wwdr.pem
const Passkit = require("passkit-generator");
const fs = require('fs');
let pass = new Passkit.Pass({
model: "./examplepass",
certificates: {
wwdr: "./keys/wwdr.pem",
signerCert: "./keys/signerCert.pem",
signerKey: {
keyFile: "./keys/signerKey.pem",
passphrase: "mac001"
}
},
overrides: {},
shouldOverwrite: true
});
pass.generate()
.then(stream => {
var file = fs.createWriteStream("examplepass.pkpass")
stream.on('finish', () => {
console.log('done')
})
stream.on("error", function (error) {
console.error(error);
process.exit(1);
})
stream.pipe(file);
})
.catch(err => {
console.log("Error: " + err)
});
Everything is working fine and I am not getting any error. But when i try to open the pass it says unable to open the pass.
Same example structure, If I try with utility here then it is working fine and pass is created.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (9 by maintainers)
Top GitHub Comments
Hi @alexandercerutti thanks for your quick response, it was actually that my certificate setup was not done properly.
For anybody reading this, if you install your certificate & it doesn’t ask you to add it to keychain, it won’t install properly & you won’t be able to export it as a .p12 file. I exited Keychain Access app and tried to install my certificate again, and it took me through a completely different flow than it did the first time, which resolved my problem & allowed me to export as a .p12 file as per the instructions.
Thanks!
Okay, glad you solved 😄