Closed FranCoulibaly closed 5 years ago
I have changed the get request to this, and the signature is no longer empty however the error is still the same
app.post("/callsheet", function(request, response) {
var file = fs.createWriteStream("callsheet.pkpass");
pass.on("error", function(error) {
console.error(error);
process.exit(1);
})
pass.pipe(file);
console.log("post request sent");
pass.render(response, function(error) {
if (error)
console.error(error);
});
});
Fixed using
var signature = stdout.split(/\r\n|\n\n/)[3];
as per pull request https://github.com/assaf/node-passbook/pull/70
I've been trying to figure this out for a few days now. The .pkpass appears to build correctly however, when I drag it into Simulator the following errors are logged in Console -CMS verification error: -26275 -Signature validation: FAILED -Invalid data error reading pass pass.com.example.pass/XXXXX. Manifest signature did not verify successfully -Error Domain=PKPassKitErrorDomain Code=1 "The pass cannot be read because it isn’t valid." UserInfo={NSLocalizedDescription=The pass cannot be read because it isn’t valid., NSUnderlyingError=0x60000086e6d0 {Error Domain=PKPassKitErrorDomain Code=1 "Manifest signature did not verify successfully" UserInfo={NSLocalizedDescription=Manifest signature did not verify successfully}}}.
When I unpack the .pkpass, the signature.exe file is there but it is completely empty. I can see that its loading the signing key file but then it never seems to get validated.
Code is as follows:
In the keys folder I have AppleWWDRCA.cer, Certificates.p12, com.example.pass.pem and wwdr.pem
I'm not sure if this is a bug or something I have done incorrectly (most likely the latter) but any help would be much appreciated