GithubHelp home page GithubHelp logo

node-passbook's Introduction

👏 Hey there, I’m Assaf.

🏖 Right now I'm “inbetween startups“, just a fancy way of saying I do some consulting/advising, while planning the next move.

☕️ I blog at https://labnotes.org/ about software design and development, people and management, culture and technology.

Feel free to subscribe.

node-passbook's People

Contributors

18601673727 avatar akadko avatar arturojain avatar assaf avatar atd-schubert avatar augustorsouza avatar juanber84 avatar madmaw avatar philipheinser avatar ream88 avatar sunsus avatar thedumbterminal avatar tomasdev avatar vodaben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-passbook's Issues

Unable to add barcode in the pass.

I have created pass using passbook library but i am unable to add barcode to my pass. Can anyone provide me help in this issue?
There is one other issue I am unable to increase the thumbnail size.Is it possible to increase thumbnail size.?

Signature parsing with regular expression failure

The regular expression used for splitting the signature accesses index 3.
stdout.split(/(\r\n|\n\n)/)[3];

This is breaking since the regular expression doesnt work as expected. The signature is actually present at index 6.

Error on signManifest call

i'm getting this error when openssl child proccess is trying to write

events.js:85
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:746:11)
at Socket._writeGeneric (net.js:690:26)
at Socket._write (net.js:709:8)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
at Socket.Writable.write (_stream_writable.js:217:11)
at Socket.write (net.js:634:40)
at signManifest (...\node_modules\passbook\lib\pass.js:360:14)
at Pass.signZip (...\node_modules\passbook\lib\pass.js:331:3)
at doneWithImages (...\node_modules\passbook\lib\pass.js:258:12)

Cannot find module async

While running ± ./node_modules/passbook/bin/node-passbook prepare-keys -p keys

module.js:340
    throw err;
          ^
Error: Cannot find module 'async'

Is it a missing reference on the package.json or I should install it globally in addition to installing it locally to the project?

ENOMEM when running node passbook

Hey,

When running node passbook on all incoming transactions on a queue, i find the following error after about the 10th passbook is created. Is there something i need to do when running this at scale?

I am
Error: spawn ENOMEM
at errnoException (child_process.js:1000:11)
at ChildProcess.spawn (child_process.js:947:11)
at exports.spawn (child_process.js:735:9)
at exports.execFile (child_process.js:617:15)
at signManifest (/home/ubuntu/insider-master-queue/node_modules/passbook/lib/pass.js:352:14)
at Pass.signZip (/home/ubuntu/insider-master-queue/node_modules/passbook/lib/pass.js:331:3)
at doneWithImages (/home/ubuntu/insider-master-queue/node_modules/passbook/lib/pass.js:258:12)
at IncomingMessage. (/home/ubuntu/insider-master-queue/node_modules/passbook/lib/pass.js:248:9)
at IncomingMessage.emit (events.js:117:20)

Support Beacons.

Currently there is no support for iBeacons. Though Apple supports iBeacons with passbook.
Adding beacons should work as the rest of the api.

pass.beacons([{
      "proximityUUID": req.business.beacon,
      "relevantText": "You are here!"
  }]);

In a small test I made it is sufficient to add "beacons" to the TOP_LEVEL var in lib/pass.js.

Images corrupted in Node.js 0.12

When using node-passbook to generate and sign a pkpass file, the latest image being added is always corrupted (see below). This issue appeared when upgrading to Node.js 0.12. Downgrading to 0.10.x solve the problem. Any idea?

Tests fail

$ npm test

> [email protected] test /home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook
> mocha


  ․․․․․․․․pass.json 196
[email protected] 9839
[email protected] 5887
logo.png 2322
icon.png 4573
strip.png 2800
[email protected] 2892
manifest.json 391
signature 3334
․․․․․․․․․

  ✖ 2 of 17 tests failed:

  1) Passbook generated should be a valid ZIP:
     Error: done() called multiple times
      at multiple (/usr/lib/node_modules/mocha/lib/runnable.js:152:31)
      at done (/usr/lib/node_modules/mocha/lib/runnable.js:158:26)
      at Zip.Runnable.run.duration (/usr/lib/node_modules/mocha/lib/runnable.js:174:9)
      at Zip.EventEmitter.emit (events.js:90:17)
      at null.<anonymous> (/home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook/lib/zip.js:39:9)
      at EventEmitter.emit (events.js:90:17)
      at WriteStream.flush (fs.js:1517:12)
      at Object.oncomplete (fs.js:297:15)

  2) Passbook generated should contain a signature:

  AssertionError: false == true
      at /home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook/test/passbook_test.js:153:9
      at ChildProcess.exithandler (child_process.js:544:7)
      at ChildProcess.EventEmitter.emit (events.js:96:17)
      at maybeClose (child_process.js:638:16)
      at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
      at Socket.EventEmitter.emit (events.js:93:17)
      at Socket._destroy.destroyed (net.js:357:10)
      at process.startup.processNextTick.process._tickCallback (node.js:244:9)


npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

First error is reasonable. at this test a streams response is piped to the done function.

About the second one, probably its because it tries to execute the signpass program, which is distributed by Apple and is OSX only.

Error opening signer certificate /etc/passbook/keys/

I've done everything that was mentioned to the letter:
1- Exported the .p12 certificate of the Pass Type.
2- Added that .p12 file into etc/passbook/keys/
3- Ran node-passbook prepare-keys -p keys
4- Entered Import Password, Entered PEM pass phrase, and Verifying Enter PEM pass phrase
5- I do see in the keys/ folder now: com.xxxx.yyy.pem, wwdr.pem and my original com.xxx.yyy.p12 file

I call the createMyPass method:

var template = createTemplate("boardingPass", {
   passTypeIdentifier:"pass.com.xxx.yyy",
   teamIdentifier:      "8XYZ876JS", // not the real one
   backgroundColor: "rgb(255,255,255)",
});
template.keys("/etc/passbook/keys", "password_when_creating_PEM"); // from step 4
template.loadImagesFrom("images"); // has icon.png and @2x as well as logo.png and @2x

function createMyPass(req, res) {

    var pass = template.createPass({
        serialNumber:   "123456",
        organizationName: "Some Org",
        description:    "20% off",
        icon:       "icon.png"
    });

    pass.fields.barcode = {
        message: "ABC123456789",
        format: "PKBarcodeFormatPDF417",
    };

    var file = fs.createWriteStream("mypass.pkpass");

    pass.on("error", function(error) {
      logger.info('Error: ' + error);
      process.exit(1);
    });

    pass.pipe(file);

    pass.render(res, function(error) {
            if (error) logger.info('Error: ' + error);
    });
};

When this method gets called, I get in the console:

 | Error: Error: Error opening signer certificate /etc/passbook/keys/com.xxx.yyy.pem
48790:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/bio/bss_file.c:356:fopen('/etc/passbook/keys/com.xxx.yyy..pem','r')
48790:error:20074002:BIO routines:FILE_CTRL:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/bio/bss_file.c:358:
unable to load certificate

Silently failing to sign zip

If a certificate pem file is not found, it doesn't complain at all. It creates the zip without the signature file.

Users should be able to see something like:

[Error: Error opening signer certificate .../keys/com.domain.demo.pem
65898:error:02001002:system library:fopen:No such file or directory:/SourceCache/OpenSSL098/OpenSSL098-52.8.1/src/crypto/bio/bss_file.c:356:fopen('.../keys/com.domain.demo.pem','r')
65898:error:20074002:BIO routines:FILE_CTRL:system lib:/SourceCache/OpenSSL098/OpenSSL098-52.8.1/src/crypto/bio/bss_file.c:358:
unable to load certificate
]

Error was being passed to callback, but not handled by the callback. Just added that in my Pull Request.

Uncaught exception while .pipe(file)

Here's my code:

// Creating the .pkpass file.
var path = 'pass/' + passId + '.pkpass';
var file = fs.createWriteStream(path);

// Signing it.
pass.on('error', function (err) {
  // Error occurd while signing file,
  // so rollback database and delete it.
  Passbook.destroy(passId, after.destroy(res));
  fs.unlink(path, function (err) {
    if (err) return res.serverError(err);
    sails.log.info('Successfully deleted file at: ' + path);
  });
  return res.serverError(err);
}).pipe(file);
Error: connect ECONNREFUSED
  at errnoException (net.js:905:11)
  at Object.afterConnect [as oncomplete] (net.js:896:19) { [Error: connect ECONNREFUSED]

Cannot switch to old mode now.

npm install passbook --save

Error: Cannot switch to old mode now.
    at emitDataEvents (_stream_readable.js:730:11)
    at IncomingMessage.Readable.resume (_stream_readable.js:715:3)
    at ClientRequest.<anonymous> (/Users/dev/repo/pass/node_modules/passbook/lib/pass.js:299:20)
    at ClientRequest.g (events.js:180:16)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
    at Socket.socketOnData [as ondata] (http.js:1583:20)
    at TCP.onread (net.js:527:27)

[Error: unable to write 'random state' ]

It's working fine on my local server but on the live server I am getting this error after trying downloading the pass file [Error: unable to write 'random state'], then I can't open the downloaded file.

When rendering a pass through a response, the callback never gets called on success

When I render a pass through the .render(response, callback) method, the callback only gets called when something fails.

I thing the issue is that the "end" event is never emitted when the zip file has been created successfully. I've done some testing, and I've seen that the "end" event on the zip variable is never fired neither.

When I add an zip.emit("end") after adding the signature is added to the zip. Still nothing happens. When i move the zip.on("end", ...) outside of the callback passed to the self.signZip(...) method, my original callback gets called.

here is how I changed the code:

in pass.js:

within the pipe function:

function doneWithImages() {
    if (lastError) {
      zip.close();
      self.emit("error", lastError);
    } else {

//This was moved up
        zip.on("end", function() {
          self.emit("end");
        });
        zip.on("error", function(error) {
          self.emit("error", error);
        });
//End of change
      self.signZip(zip, manifest, function(error) {
        zip.close();
        //the above code was taken from here
      });
    }
  }

within the signZip function:

signManifest(this.template, json, function(error, signature) {
    if (!error) {
      zip.addFile("signature").end(signature);
//The next line was added
zip.emit("end");
    }
    callback(error);
  });

Trouble getting the passes to load

Hi, I wasted half a day on this problem and found a solution that I want to share since I assume this project is unmaintained.

If you could generate the pkpass with the library but macOS/iOS refuses to load the pass, use PKPassValidator to figure out what's wrong:

https://pkpassvalidator.azurewebsites.net

In my case it highlighted "TeamIdentifer in signature matches value in pass.json" as problematic.

So I dug into PKPassValidator's source to figure out how that flag came to be. It's saying my template's teamIdentifier doesn't match up with the signature, specifically the OU field.

I opened up the certificate in my keychain and under the subject being certified, it listed Organizational Unit as WLJTXXXXXX. Copied that value into the source code (passed as an argument to createTemplate) and now the passes load correctly.

Hope this helps someone.

error installing on Windows

Hi, Is this supported? I tried on two different Windows 7 machines, same error. Here are the logs:

C:\passport>npm install https://registry.npmjs.org/passbook/-/passbook-2.0.1.tgz
npm http GET https://registry.npmjs.org/passbook/-/passbook-2.0.1.tgz
npm http 200 https://registry.npmjs.org/passbook/-/passbook-2.0.1.tgz
npm ERR! Error: ENOENT, open 'C:\Users\wcheung\AppData\Local\Temp\npm-25964-VA56BRXV\1395591982431-0.7802650819066912\package\Icon
'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\dev\nodejs\node.exe" "C:\dev\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://registry.npmjs.org/passbook/-/passbook-2.0.1.tgz"
npm ERR! cwd C:\passport
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path C:\Users\wcheung\AppData\Local\Temp\npm-25964-VA56BRXV\1395591982431-0.7802650819066912\package\Icon
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\passport\npm-debug.log
npm ERR! not ok code 0

Code=1 "Manifest signature did not verify successfully"

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:

let template = passbook('coupon', {
   formatVersion : 1,
    passTypeIdentifier: 'pass.com.example.pass',
    teamIdentifier: 'XXXXXXX',
    webServiceURL : "https://example.com",
    authenticationToken : "1234567",
    organizationName: 'Test',
    description: 'example pass'
  });
template.loadImagesFrom('./images');
template.fields.barcode = {
      'format': 'PKBarcodeFormatPDF417',
      'message': '123456789',
      'messageEncoding':'iso-8859-1'
  };
template.fields.serialNumber = 'E5982H-I2';
template.keys('./keys', 'password');
let pass = template.createPass({
  primaryFields: [
    {
      key: "pass",
      label: "Project",
      value: "please work"
    }
  ]
});
var file = fs.createWriteStream("Callsheet.pkpass");
pass.on("error", function(error) {
  console.error(error);
  process.exit(1);
})
pass.pipe(file);
app.get("/newpass", function(request, response) {
  pass.render(response, function(error) {
  if (error)
   console.error(error);
 });

});

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

Question - Need help with saved pass

Hi there

I am using your passbook package and have created a coupon pass and saved to my server. However, I am not sure how to push/return that saved pass to a user when it is requested. Here is a sample of code when I save the pass:

.
.
.
var file = File.createWriteStream(passBookFilePath);
pass.pipe(file);
.
.
.

My problem is that after creating this pass I would like to return this pass when a user clicks on a link from his/her iOS app. Really appreciate any help in this matter.

Thanks

New PassTypeID & Missing Signature Error

Hi,
My last pass certificate was revoked by mistake and I had to generate a new pass certificate. I have gone through all the steps necessary including "node-passbook prepare-keys -p" step which generates a pem and wwdr.pem files. However, I get the following error:

Invalid data error reading pass pass.distro.com.xxxx.Jan2015V1/1422325570809. Signature is missing
Jan 27 06:57:39 rays-mbp.ca.compso.org MobileSafari[22918]: PassBook Pass download failed: The pass cannot be read because it isn’t valid.

I have double checked my pass type and team ids, placed the p12 and pem files in the correct directory and still getting this error. Any help would be greatly appreciated.

Signing a passbook

I am getting the following exception: Signature is missing
How do I sign a passbook?

Can't create a boardingPass type pass.

boardingPass should has a "transitType" param under boardingPass field.

 "boardingPass" : {
   "transitType" : "PKTransitTypeAir",
   "headerFields" : ""
}

But I can't set this "transitType" param into boardingPass.

Fails to add Image to Manifest

When adding images (icon, logo, footer etc.) it fails to add the last one specified to the manifest. A simple fix is this:

for (var key in this.images) {
    var filename = key.replace(/2x$/, "@2x") + ".png";
    addImage(addFile(filename), this.images[key], function(error) {
      --expecting;
      if (error)
        lastError = error;
      if (expecting === 0)
        setTimeout(function(){
          doneWithImages();
        });
    });
    ++expecting;
  }

Notice the setTimeout before calling doneWithImages. This fixes the issue but I dont think its a proper fix.

Unable to load signing key file

i'v this problem after run my app. (i used node-passbook prepare-keys for generate my certificates, from my .p12 cert file. )

[Error: unable to load signing key file
140735227736144:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:701:Expecting: ANY PRIVATE KEY]

Remove logo as required image.

Hi,

The logo is not a required image for a valid pass. I think it should be removed from the validation check.

Would you accept my PR to remove it?

Cheers.

Error handling in doneWithImages() of pass.js

I met an error that passbook module doesn't throw out error when wwdr.pem is not stored at the key directory:

Error opening certificate file /workspaces/pass_book_server/work/data/developers/E5WU58LN/keys/wwdr.pem
139861670852256:error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen('/workspaces/pass_book_server/work/data/developers/E5WU58LN/keys/wwdr.pem','r')
139861670852256:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:172:

After debugging, I figure out that doneWithImages() doesn't handle the error from callback of self.signZip() properly, so I modify doneWithImages() as below to fix this bug.

  function doneWithImages() {
    if (lastError) {
      zip.close();
      self.emit("error", lastError);
    } else {
      self.signZip(zip, manifest, function(error) {
        // add codes: BEGIN
        if (error) {
          self.emit("error", error);          
        }
        // add codes: END
        zip.close();
        zip.on("end", function() {
          self.emit("end");
        });
        zip.on("error", function(error) {
          self.emit("error", error);
        });
      });
    }
  }

I will try to fork your repository, add test, and send pull request back to you for this issue later.

WWDR certificate expired Feb 14, 2016

I am getting issues with signing my pass with this node module.

Invalid data error reading pass pass.com.xxx.yyy/123456. The passTypeIdentifier or teamIdentifier provided may not match your certificate, or the certificate trust chain could not be verified.

I am pretty sure it has to do with the expired WWDR certificate this module is using.
The new certificate can be found here: https://developer.apple.com/support/certificates/expiration/

Current Solution:
Export the wwdr file downloaded from here: https://developer.apple.com/certificationauthority/AppleWWDRCA.cer into a .pem file from within your Keychain, and place it within the same folder as the other pem file of the pass certificate.

No 'data' event emitted.

Hi
Instead of writing the passbook to a file, I wanted it to be stored in memory as a buffer. So, I would have to catch the data events and push it to buffer. But I don't see that the 'data' event is supported in the current implementation.
On going through pass.js, I could only find implementation of the pipe function and no place where data events are emitted.
I might be wrong in my observations, please correct me if that is the case.
If not, then it would be really helpful if support for this could be added.

Thanks,
Nakul

Passes are generated fine, but can't add them to Wallet

Hi,

I'm kind of at a loss here. I'm trying to use node-passbook to generate generic passes which hold some random information. They generate fine on my Macbook, but when I try to scan them in Wallet I get a message saying that it can only read Passes which contain a Wallet code.
When I try to open a Pass through the browser on my iPhone, Safari will just say there's a problem downloading the file, whereas Chrome will at least tell me it can't add the pass to Passbook. This is most probably related to the same reason why I can't scan the pass to add it to Wallet.

I've followed the instructions to the letter. Funny thing is that I can add the pass to Passbook on my Macbook (it even says it will Update it when I add it again, so it is stored somewhere).

Any clue to what I'm doing wrong here ? Anyone encountered the same behaviour before ?

Doesn`t work locations event

Hi!
I have added couple loacations coordinars as
`createTemplate("coupon",{
.....
locations: [
{
"longitude": 49.841547,
"latitude": 24.025762
},
{
"longitude" : 49.8696262,
"latitude" : 24.0110897
}

})`

But when my phone in this locations - nothing heapenns

Signing fails without key file

When running the prepare-keys command, a file called pass.pem is generated which appears to be the key for the certificate. In the pass.js file where the signing actually happens, it seems like this file is never referenced or used. Running the function causes an error complaining about opening the signing file.

I was able to fix the issue by adding the key argument to the sign function. Here is the code as it currently is in the repository:

function signManifest(template, manifest, callback) {
  var identifier = template.passTypeIdentifier().replace(/^pass./, "");

  var args = [
    "smime",
    "-sign", "-binary",
    "-signer",    Path.resolve(template.keysPath, identifier + ".pem"),
    "-certfile",  Path.resolve(template.keysPath, "wwdr.pem"),
    "-passin",    "pass:" + template.password
  ];
  var sign = execFile("openssl", args, { stdio: "pipe" }, function(error, stdout, stderr) {
    var trimmedStderr = stderr.trim(); 
    // Windows outputs some unhelpful error messages, but still produces a valid signature
    if (error || (trimmedStderr && trimmedStderr.indexOf('- done') < 0)) {
      callback(new Error(stderr));
    } else {
      var signature = stdout.split(/\n\n/)[3];
      callback(null, new Buffer(signature, "base64"));
    }
  });
  sign.stdin.write(manifest);
  sign.stdin.end();
}

And here is my modified code:

function signManifest(template, manifest, callback) {
  var identifier = template.passTypeIdentifier().replace(/^pass./, "");

  var args = [
    "smime",
    "-sign", "-binary",
    "-signer",    Path.resolve(template.keysPath, identifier + ".pem"),
    "-certfile",  Path.resolve(template.keysPath, "wwdr.pem"),
    "-inkey",  Path.resolve(template.keysPath, "pass.pem"),
    "-passin",    "pass:" + template.password
  ];
  var sign = execFile("openssl", args, { stdio: "pipe" }, function(error, stdout, stderr) {
    var trimmedStderr = stderr.trim(); 
    // Windows outputs some unhelpful error messages, but still produces a valid signature
    if (error || (trimmedStderr && trimmedStderr.indexOf('- done') < 0)) {
      callback(new Error(stderr));
    } else {
      var signature = stdout.split(/\n\n/)[3];
      callback(null, new Buffer(signature, "base64"));
    }
  });
  sign.stdin.write(manifest);
  sign.stdin.end();
}

Notice the addition of the "-inkey", Path.resolve(template.keysPath, "pass.pem"), line added to the arguments.

Is this a necessary fix for the library? Or is there another problem that this is essentially bypassing? With my fix above, everything works as expected. But I would prefer to use the version from npm as opposed to using a version with my modifications.

Can't use the pkpass on a windows device

Hi,
First of all thank for the library, it's great piece of work.

I noticed that when I generate a passbook file and open it on a Windows Phone (8.1) with the app myPasses, the app can't read the passbook file and displays the next error: "Library cannot extract this entry. Version is required (4884)".

When I open the same passbook file on an iPhone it works without any problem. If I would send the passbook file from my iPhone via email to my windows phone then it also opens without any problem.

This would give me the impression that something is different when creating the zip file with all the included files. To further investigate this I tried to do the next thing on my mac laptop:

zip -v fails.pkpass
this gives me:

zip warning: needs unzip 2.0 on system type 19: pass.json
zip warning: needs unzip 2.0 on system type 19: background.png
zip warning: needs unzip 2.0 on system type 19: [email protected]
zip warning: needs unzip 2.0 on system type 19: icon.png
zip warning: needs unzip 2.0 on system type 19: [email protected]
zip warning: needs unzip 2.0 on system type 19: logo.png
zip warning: needs unzip 2.0 on system type 19: [email protected]
zip warning: needs unzip 2.0 on system type 19: manifest.json
zip warning: needs unzip 2.0 on system type 19: signature

If I send the same passbook file from my passbook app to my laptop and do the same:

zip -v works.pkpass
=> no warnings

Any idea if this could be fixed?

Thanks in advance

Keys error

Hi i get this error:

[Error: unable to load signing key file
7345:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:/SourceCache/OpenSSL098/OpenSSL098-52.20.2/src/crypto/evp/evp_enc.c:330:
7345:error:0906A065:PEM routines:PEM_do_header:bad decrypt:/SourceCache/OpenSSL098/OpenSSL098-52.20.2/src/crypto/pem/pem_lib.c:428:
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.