Closed kmarrip closed 3 years ago
signature validation does happen even when the .pkpass is opened in mac right ??
Hey there @chaithanyaMarripati, thanks for using passkit-generator!
I currently don't know what could cause this issue, but there's one way to discover what is going on. You can follow the document I added to Wiki to debug on mac: https://github.com/alexandercerutti/passkit-generator/wiki/Self-help#through-console-mac-only
Yes, signature validation happen when it is opened. I don't know if mac has a different validation system, but it should be the same of iPhones.
Let me know what you find out!
Invalid data error reading pass pass.com.derwentapp/{id}. Pass dictionary must contain key 'description'.
PassBook Pass download failed: Error Domain=PKPassKitErrorDomain Code=1 "(null)"
these are the logs for passkit @alexandercerutti i already have the description key in pass.json
{
"formatVersion" : 1,
"passTypeIdentifier" : "${passtype}",
"serialNumber" : "nmyuxofgna",
"teamIdentifier" : "${teamId}",
"webServiceURL" : "https://example.com/passes/",
"authenticationToken" : "vxwxd7J8AlNNFPS8k0a0FfUFtq0ewzFdc",
"relevantDate" : "2011-12-08T13:00-08:00",
"barcode" : {
"message" : "123456789",
"format" : "PKBarcodeFormatPDF417",
"messageEncoding" : "iso-8859-1"
},
"organizationName" : "Derwent London Plc",
"description" : "Apple Event Ticket",
"foregroundColor" : "rgb(255, 255, 255)",
"backgroundColor" : "rgb(60, 65, 76)",
"eventTicket" : {
"primaryFields" : [
{
"key" : "event",
"label" : "EVENT",
"value" : "The Beat Goes On"
}
],
"secondaryFields" : [
{
"key" : "loc",
"label" : "LOCATION",
"value" : "Moscone West"
}
]
}
}
this is the pass.json i have been using @alexandercerutti
@chaithanyaMarripati What you can do is to rename the .pkpass
file to .zip
, unzip it and check if the generated pass.json
file has the description field or not... if it doesn't have, this might be a bug of passkit-generator...
@alexandercerutti i have done what you have said description is present in the pass.json file
@chaithanyaMarripati this is really weird... I've never experienced such issue. I guess that, passType and teamId are just placeholders you inserted for Github, aren't they?
yes, they are placeholders @alexandercerutti actual values are different
I guess you'll have to do few tests, because I sadly don't know how can I help you. You can maybe generate with different certificates.
Also, what does sendIosWalletToBlob
do?
sendIosWalletToBlob just converts the stream to buffer and then uploads the buffer to azure blob storage giving back a unique link
Can you test with one of the examples provided within the project if you are able to generate successfully the pass?
All instructions are provided within the examples
folder.
Clone the repo, pick one example, edit it with your data and certificates and try to download it and open it from both iPhone and Mac.
This is were we are going to exclude things in the attempt of isolating the issue.
Let me know.
i have overwritten the description and now im getting an altogether different error
Invalid data error reading pass pass.com.{APP_NAME}/{ID}. The passTypeIdentifier or teamIdentifier provided may not match your certificate, or the certificate trust chain could not be verified.
this is happens only in iphones, in mac i could open the .pkpass file. which makes me conclude that signature verification doesn't happen in mac at all @alexandercerutti
i may have to recheck the certificates again..
It might have different checks, but signature verification still should happen. I remember I had issues with passes on mac due to wrong certificates. Or maybe it is less strict with some checks on Mac. You could attempt to open your pass in mac with Console.app
open and see which logs are printed.
Where did you overwrite the description? In the final bundle or before generating? Please note that if you overwrite it in the final bundle, you might experience issue with manifest validation.
const eventPass = await createPass({
model: './Event.pass',
certificates: {
wwdr: './certs/wwdr.pem',
signerCert: './certs/DerwentSignerCert.pem',
signerKey: {
keyFile: './certs/DerwentSignerKey.pem',
passphrase: iosWallet.signerKeyPasword,
},
},
overrides: {
passTypeIdentifier: iosWallet.passIdentifier,
teamIdentifier: iosWallet.teamIdentifier,
serialNumber: eventBookingId,
description: "this is the description for pass"
},
});
this is what i mean by overriding @alexandercerutti
Okay great. Let me know if by checking again the certificates you are able to fix the issue. Then, if you are able to fix the issue, you can try to remote description override and see it that happens again.
Hey there, @chaithanyaMarripati, have you been able to solve it? If so, which was the issue?
hey @alexandercerutti the issue wasn't with certificates Event.pass was missing event@3x.png image file, so iphones refused to open the pass while macs had no problem thanks for you help, appreciate it.
@chaithanyaMarripati that was really weird for that error! Glad you have solved!
Anyway, what is event@3x.png? Did you mean the icon@3x.png perhaps?
Could create a .pkpass file, that works fine in mac but the file fails to download in iphone
screen shot attached @alexandercerutti