Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passes not adding to Passbook #12

Closed
128keaton opened this issue Sep 25, 2012 · 31 comments
Closed

Passes not adding to Passbook #12

128keaton opened this issue Sep 25, 2012 · 31 comments

Comments

@128keaton
Copy link

Whenever I generate a pass and I tap add, it disappears instead of showing the adding animation. I checked my book and it doesn't show. I even tried your example online and that doesn't work either.

@ptz0n
Copy link
Contributor

ptz0n commented Sep 27, 2012

This happens when the Pass is invalidated by Passbook.

Have you followed all the steps in README.md; added the correct certificates, passTypeIdentifier and teamIndentifier or modified the example in any way?

You can check your iPhone log (in Xcode) or use the PHP PKValidate class.

PS. Did you solve the issue with this commit? DS.

@javipagan
Copy link

I have the same problem. The pass is loaded fine but not saved in passbook. Your example online has the same problem.

@ptz0n
Copy link
Contributor

ptz0n commented Sep 27, 2012

I may be able to help if you answer my questions above.

@javipagan
Copy link

Solved, problem was in $pass->setWWDRcertPath('AppleWWDRCA.pem'); The version of PKPass.php that I had downloaded didn't have this property. Thanks

@ptz0n
Copy link
Contributor

ptz0n commented Sep 27, 2012

Great & good job! The method setWWDRcertPath was recently added in a pull request.

@tschoffelen closing this one?

@newtoios
Copy link

newtoios commented Oct 4, 2012

I'm referring to the starbucks_example and still facing the same problem. i given the reference to AppleWWDRCA.pem and generated the pass. when im trying to open it in my iphone, its not showing as pass. can you help me?

@ptz0n
Copy link
Contributor

ptz0n commented Oct 4, 2012

Hi newtoios,

The Starbucks sample lacks error output. Try edit index.php and replace (line 65)

$pass->create(true); // Create and output the PKPass

with

if(!$pass->create(true)) { // Create and output the PKPass
    echo 'Error: '.$pass->getError();
}

@SimonWaldherr
Copy link

i have the same problem, too. I use the newest version of php-pkpass and did every step from the readme, but i can't add passes to passbook. In the console i see this warning: "Invalid data error reading card passTypeIdentifier / serialNumber. Manifest signature did not verify successfully"
any ideas, how i can get it work?

@ptz0n
Copy link
Contributor

ptz0n commented Oct 8, 2012

@SimonWaldherr Are you referring to starbucks_sample/index.php or example.php?

Are you sure the passTypeIdentifierand serialNumber keys are entered correctly?

@SimonWaldherr
Copy link

I have this warning on all examples full_sample, starbucks_sample and example.php. passTypeIdentifier is entered as in iOS Provisioning Portal / Pass Type IDs overview.
I think, there was a misunderstanding, the console warning was: passd[6139] <Warning>: Invalid data error reading card pass.com.weventa.demo/980425-104-660. Manifest signature did not verify successfully

For test purposes, i deleted the $this->clean(); lines and discovered that the signature file is empty.

@Shalling
Copy link

Got a same problem here. Certificated and WWDR verified. and changed the passTypeIdentifier as well as teamIdentifier, but still not fix. Using PKValidate checking json file but it show no error.
Here is sample of json.
Where $passTypeIdentifier, $teamIdentifier, $authToken are variable

{
"description":"Business card, powered by Sirimedia Co,Ltd.",
"formatVersion":1,
"organizationName":"Sirimedia Co, Ltd.",
"passTypeIdentifier": $passTypeIdentifier,
"serialNumber":"50a5b7484ae9c",
"teamIdentifier": $teamIdentifier,
"generic":{
"headerFields":[],
"primaryFields":[{
"key":"name",
"label":"Name",
"value":"Phakphum Visetnut",
"textAlignment":"PKTextAlignmentLeft"
}],
"secondaryFields":[{
"key":"phone",
"label":"",
"value":"",
"textAlignment":"PKTextAlignmentLeft"
},{
"key":"position",
"label":"",
"value":"",
"textAlignment":"PKTextAlignmentRight"
}],
"auxiliaryFields":[{
"key":"email",
"label":"",
"value":"",
"textAlignment":"PKTextAlignmentLeft"
}],
"backFields":[{
"key":"address",
"label":"",
"value":"",
"textAlignment":"PKTextAlignmentLeft"
}]
},
"barcode":{
"format":"PKBarcodeFormatQR",
"message":"BEGIN:VCARD\nN:Phakphum Visetnut;\nADR:\nEMAIL:\nTEL:\nTITLE:\nEND:VCARD\n",
"messageEncoding":"iso-8859-1",
"altText":""
},
"backgroundColor":"rgb(240,240,240)",
"logoText":"Sirimedia",
"webServiceURL":"",
"authenticationToken": $authToken
}

@tschoffelen
Copy link
Owner

Try the example at http://apps.tomttb.com/pkpass/example.php. Does that one work on your iPhone?

@ptz0n
Copy link
Contributor

ptz0n commented Nov 16, 2012

Hand-written JSON can be hard, I see several errors;

  • $passTypeIdentifier, $teamIdentifier, and $authToken are strings. Wrap them with "".
  • You have specified authenticationToken which also needs a webServiceURL to be valid data in Passbook

Please get the latest version of the example file. Using the PHP data format that then encodes into JSON is more fail-safe.

@kaurharpreet
Copy link

i got downloaded file but the file is not opened in IOS .....it display error (The pass “pass.pkpass” could not be opened.)

@ptz0n
Copy link
Contributor

ptz0n commented May 13, 2014

@kaurharpreet What do the logs tell you?

@kaurharpreet
Copy link

openssl_x509_read() [function.openssl-x509-read]: supplied parameter cannot be coerced into an X509 certificate!
openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting cert in
file_get_contents(/tmp/PKPass5371f96a521c41.79777861/signature) [function.file-get-contents]: failed to open stream: No such file or directory

this error is displayed in .pass file

@ptz0n
Copy link
Contributor

ptz0n commented May 13, 2014

@kaurharpreet Looks like a problem with the cert. Have it worked before?

@kaurharpreet
Copy link

no it didn't work..

@ptz0n
Copy link
Contributor

ptz0n commented May 13, 2014

@kaurharpreet Then please double check your certificate. Follow the instructions here: https://github.com/tschoffelen/PHP-PKPass#requesting-the-pass-certificate

@kaurharpreet
Copy link

i create the certificate again ..it works now...thank u for your help

@himanshu4994
Copy link

used example.php and Pkpass.php from https://github.com/tschoffelen/PHP-PKPass and getting an error openssl_pkcs7_sign(): error opening the file, WWDR.pem in C:/xampp/htdocs/PkPass.php on line ***
Please help resolve it

@tschoffelen
Copy link
Owner

Hi! Sounds like that file is missing, have you downloaded it? See the instructions in the README of this repo, specifically concerning the WWDR intermediate certificate.

@himanshu4994
Copy link

himanshu4994 commented Jun 7, 2016

Sir i am sure that i have the file in there............downloaded the certificate from apple developer site and then extracted it from the keychain

@himanshu4994
Copy link

moreover , an invalid pkpass file is also
getting generated

@rajud521
Copy link

rajud521 commented Aug 3, 2018

unable to add
this file cannot be added to passbook(wallet).
above error is showing, how to solve this.

@rajud521
Copy link

rajud521 commented Aug 3, 2018

Hi i am getting this error:
Warning: openssl_pkcs7_sign(): error opening the file, ../certificates/AppleWorldwideDeveloperRelationsCertificationAuthority.pem in E:\xampp\htdocs\passbox_1\PKPass\PKPass.php on line 317

please how to remove above error.

@tschoffelen
Copy link
Owner

tschoffelen commented Aug 3, 2018

@rajud521 Did you overwrite the wwdrCertPath? Because that's indeed not the correct filename. You shouldn't need to change that, since there's a version of that certificate shipped alongside the library: https://github.com/tschoffelen/php-pkpass/blob/master/src/PKPass.php#L104

Also, please open a new issue of this problem persists without your code customisation, since it's not related to this already-closed issue.

@rajud521
Copy link

rajud521 commented Aug 4, 2018

@tschoffelen, it is working fine in Android phone, but it is showing in Apple IPhone that "unable to add
this file cannot be added to passbook" So, please how to remove this error.

@tschoffelen
Copy link
Owner

tschoffelen commented Aug 4, 2018

@rajud521 That is because Android doesn’t check if the pass certificate is valid. See the Debugging section in the Readme to figure out what’s going wrong exactly.

@rajud521
Copy link

again created the certificate, it is working fine now. Thank you!

@lock
Copy link

lock bot commented Nov 10, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants