Skip to content

Troubleshooting (Self help)

Alexander Cerutti edited this page Jul 4, 2023 · 4 revisions

So, if you are here, you got a problem (don't you say?).

There are two ways you can try to resolve your problems.


App Debugging

If you are using passkit-generator version higher than or equal to 3.0.0, this way is not available.

Open guide

As described in the API documentation, in many issue topics and probably somewhere else, a DEBUG system has been included into Passkit-generator to avoid logging unwanted error messages that will not block Pass creation execution flow.

The debug system used is VisionMedia's Debug (Wow, such fantasy!) and it makes available in its documentation, different ways to allow logging. The instructions are per-console type. So you'll have instructions for DOS, Powershell, and Bash consoles. Debugging is enabled through setting the environmental variable DEBUG.

Bash-like consoles (macOS, linux, wsl, ...)

If you are developing on macOS, Linux or WSL, you can set it as follows:

If you usually start your app like this

$ node app.js

instead, you'll have to start it like this

$ DEBUG=* node app.js

Please note that a lot of packages use Debug for this purpose. Therefore it might occur to see a lot of logs (are you using Express.js? Prepare yourself).

Windows

If you are developing on Windows, please look at the official documentation for Windows at Debug. It will show you how to enable it.


Through Console (Mac Only)

If you are on a Mac, you can debug you pass using this very powerful tool: Console.app (/Applications/Utility/Console.app). This is also a way Apple offers to debug passes. Here I'll guide you on how to use it easily.

Console.app is a very powerful application, as it is able to see the whole operative system logs and events, but also those coming from your iOS Devices. In fact, you can connect your devices through a USB cable and inspect them. Once connected, you'll be able to access iOS Devices' logs through the menu on the left.

Once opened, it will show you plenty of logs, so for sure you won't be able to see your pass logs. What I suggest you, is filtering the logs for passkit keyword and only then open your pass.

Logs will be presented in the following way: App that tried to open the Pass, followed by a message and, if available, an error. Usually, the errors are very clear to debug what's going on. Sometimes they might be more cryptic to understand and might be a signal of something very wrong happening. You can read an issue #82's comment as example.

PKZipArchiver error

PKZipArchiver: archive_entry with no path after sanitization encountered.

This error might appear when a PKPass is generated but it is not well-formed for several reasons. It might happen when the .pkpass file (zip file) gets written or exported, especially on AWS / serverless. We don't know yet the reason this happens but comparing two zips, one created through serverless and one created through a self-hosted application might be different.

A fix could be of forcing the format of the served .pkpass file to be encoded as a base64 string like it is done in the serverless example.


Do you still have problems or not understand something? Feel free to open an issue topic, and I and the community will be happy to help you! 😉