I've got a link on a web page that should enable users to download a passbook file from a link, however when clicking on the link in Safari on an iPhone, I get the following error message:
Safari cannot download this file.
I have read similar Q&As on here, and the MIME type is set to application/vnd.apple.pkpass. The passbook can be downloaded on a Windows phone.
Any suggestions on why this is the case and how to resolve this so users can access the passbook file?
I've downloaded the passbook on a desktop and this is what it contains.
The pkpass contains the following files:
icon.png
logo.png
strip.png
manifest.json
pass.json
signature
An example of the manifest.json:
{
"icon.png": "fa6b59072ae5c8163c903d8c8b5f2e4a45fbd49b",
"logo.png": "3165c9be22cbf76e2b3118972dabaef8918390f5",
"strip.png": "5d15c45f543e8088c227fc54a6c01d1f9f0b1db3",
"pass.json": "0f536b34a6b73a7799aae43ff9861dde45a6dfc6"
}
An example of the pass.json:
{
"passTypeIdentifier":"pass.com.XXXX.sampleticket",
"formatVersion":1,
"serialNumber":"TIC1000000518",
"description":"XXXX",
"organizationName":"XXXX",
"teamIdentifier":"W9XR4FBDD4",
"logoText":"Dragon Bay",
"foregroundColor":"rgb(0,0,0)",
"backgroundColor":"rgb(255,255,0)",
"labelColor":"rgb(0,0,0)",
"eventTicket":{
"headerFields":[],
"primaryFields":[],
"secondaryFields":[{"key":"activity",
"label":"11/20/2015 12:00 AM",
"value":"One Day at the Museum"
}],
"auxiliaryFields":[],
"backFields":[{
"key":"terms",
"label":"Terms & Conditions",
"value":"XXXX"
},
{
"key":"contact",
"label":"XXXX",
"value":"XXXX"
},
{
"key":"legal",
"label":"Legal",
"value":"XXXX"
},
{
"key":"notes",
"changeMessage":"%#","label":"Notes","value":""
},
{
"key":"lastUpdated",
"label":"Last Updated",
"dateStyle":"PKDateStyleMedium",
"timeStyle":"PKDateStyleShort",
"isRelative":false,
"value":"2016-01-08T19:00Z"
}]
},
"barcode":{
"format":"PKBarcodeFormatPDF417",
"message":"1000000518",
"messageEncoding":"UTF-8",
"altText":"1000000518"
},
"authenticationToken":"0123456789ABCDEF",
"webServiceURL":"https://XXXX/passbook.svc"
}
I had a similar issue before which I resolved by ensuring the webServiceURL was https, however that is the case in this scenario.
Examining your logs, you have a problem with your signature.
Aug 4 17:08:22 pfr MobileSafari(PassKitCore)[611] <Notice>: Error evaluating trust: <private>
Aug 4 17:08:22 pfr MobileSafari(PassKitCore)[611] <Notice>: Signature validation: *** FAILED ***
Aug 4 17:08:22 pfr MobileSafari(PassKitCore)[611] <Fault>: Invalid data error reading pass <private>. <private>
Aug 4 17:08:22 pfr MobileSafari(PassKitCore)[611] <Notice>: Invalid data error reading pass <private>. <private>
Aug 4 17:08:22 pfr MobileSafari[611] <Notice>: PassBook Pass download failed: The pass cannot be read because it isn\M-b\M^#\M^Yt valid.
Things to check:
Do the SHA1 hashes of each file match the manifest?
Is the certificate revoked or expired?
Does the signature contain the updated Apple WWDR certificate (the old one expired in February)?
Does the signature contain a signing date?
Update:
After checking your signature, I can see that it was signed by the expired Apple WWDR certificate. This certificate expired 2016-02-14T18:56:35Z.
Apple Root CA0 080214185635Z 160214185635Z
Download the new certificate and try compiling the pass again.
Related
I am using Tizen SDK (2.4.0_Rev5) to launch the demo app HelloTizen (wearable-2.3) on my Gear S2 but it fails, with the following error:
Unknown Error [81]
Unknown Error [81]
When I try to install it with sdb install HelloTizen.wgt I get the following output:
pushed HelloTizen.wgt 100% 36KB 0KB/s
1 file(s) pushed. 0 file(s) skipped.
/home/user/tizen/HelloTizen/HelloTizen.wgt 114KB/s (37179 bytes in 0.318s)
path is /opt/usr/apps/tmp/HelloTizen.wgt
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[start] val[install]
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[install_percent] val[3]
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[install_percent] val[22]
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[install_percent] val[25]
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[install_percent] val[33]
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[error] val[81] error message: Non trusted certificate is used. Register valid certificate
__return_cb req_id[138540002] pkg_type[wgt] pkgid[RFZKe67scd] key[end] val[fail]
processing result : Unknown Error [81] failed
spend time for pkgcmd is [1385]ms
There is the output from sdb dlog:
W/WRT_INSTALLER(20115): task_certify.cpp: StartStep(619) > --------- <TaskCertify> : START ----------
E/WMS ( 490): wms_event_handler.c: _wms_event_handler_cb_log_package(4560) > package [_________] callback : [INSTALL, PROCESSING]
E/WMS ( 490): wms_event_handler.c: _wms_event_handler_cb_log_package(4560) > package [_________] callback : [INSTALL, PROCESSING]
E/WMS ( 490): wms_event_handler.c: _wms_event_handler_cb_log_package(4560) > package [_________] callback : [INSTALL, PROCESSING]
E/WMS ( 490): wms_event_handler.c: _wms_event_handler_cb_log_package(4560) > package [_________] callback : [INSTALL, PROCESSING]
W/CERT_SVC(20115): OCSPCertMgrUtil.cpp: getCertFromStore(97) > Error during certificate search
W/CERT_SVC(20115): WrtSignatureValidator.cpp: check(365) > signature1.xml has got unrecognized Root CA certificate. Signature will be disregarded.
W/WRT_INSTALLER(20115): task_certify.cpp: throwCertificateInvalidException(373) > Certificate is Invalid [-34]
E/WRT_INSTALLER(20115): task_certify.cpp: stepSignature(350) > Error occured in signature validator: 81
E/APP2EXT (20115): job_widget_install.cpp: SendFinishedFailure(370) > Error number: 81
E/APP2EXT (20115): job_widget_install.cpp: SendFinishedFailure(371) > Message: Non trusted certificate is used. Register valid certificate
W/WRT_INSTALLER(20115): pkgmgr_signal.cpp: sendSignal(275) > Success to send pkgmgr signal: error - 81:Non trusted certificate is used. Register valid certificate
W/WRT_INSTALLER(20115): pkgmgr_signal.cpp: sendSignal(275) > Success to send pkgmgr signal: end - fail
E/WRT_INSTALLER(20115): wrt-installer.cpp: staticWrtStatusCallback(1102) > Step failed
So, it seems to be a certificate related error. I did generate my certificate in Security Profiles with one generate author certificate and the automatic certificate for distributor. I also used Register Certificate but I do not know if it worked because when I clicked on OK, nothing happened.
The other thing I did was to enable Permit to install applications for my device. But, as for the certificate registration, I do not know if it worked because nothing happened. I checked in /home/developer and there is no device-profile.xml file.
If you run app in Emulator, then IDE generated certificate will work. But you are running app in Gear S2 which has user binary, that's why you need to get author certificate from samsung. Below link will show you the way of installing extension sdk for certificate for both emulator and device.
https://developer.tizen.org/ko/community/tip-tech/issuing-tizen-certificate-certificate-extension-ver-1.2
I have developed a game using corona. Now I get this warning while trying to build for iPhone using new provisioning profile.
warning: Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
failed to extract requirements data: 1
/Users/codemenmini2012-4/Desktop/ArcheryClassiciOS.app: invalid signature (code or signature have been modified)
failed to extract entitlements: 1
AssertMacros: entitlements_requested, At least need an application-identifier entitlements file: codesign_wrapper.c, line: 879
- (null)
warning: Unable to extract codesigning entitlements from your application. Please make sure ArcheryClassiciOS is a valid Mach executable that's properly codesigned. (-19050)
/Users/codemenmini2012-4/Desktop/ArcheryClassiciOS.app/ArcheryClassiciOS: invalid signature (code or signature have been modified)- (null)
Have you tried revoking the Profile and requesting it again with a key from your machine? Apples profiles are annoying me quite often, too....
I am having a very frustrating error. I have tested for an app upgrade by first installing the previous version (1.0.1) and then running version (1.0.2). Everything worked fine. I submitted the app and then I am getting issues people are getting crashes when they upgrade. I tried doing the same thing, which is installing the 1.0.1 and then install the binary on the app store, then it crashed. I looked at the console and crash logs and I get this:
Jul 7 08:07:45 unknown MyApp[1429] <Warning>: KeychainUtils keychainValueForKey: - Error finding keychain value for key. Status code = -25300
Jul 7 08:07:45 unknown MyApp[1429] <Warning>: AccountSession readUserDataFromDisk - Error finding keychain value for key /var/mobile/Applications/997B32E7-6FFC-4696-9CAA-129BADE2FE64/Documents/instagram_json
Jul 7 08:07:45 unknown MyApp[1429] <Warning>: UISegmentedControlStyleBezeled is deprecated. Please use a different style.
Jul 7 08:07:45 unknown MyApp[1429] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: username)'
*** First throw call stack:
(0x33ee688f 0x367e7259 0x33ee6789 0x33ee67ab 0x33e5368b 0x14fd99 0x152319 0x1530bb 0x170299 0x3270ec59 0x32711817 0x354e7dfb 0x354e7cd0)
Jul 7 08:07:45 unknown UIKitApplication:com.firesnakelabs.pinstagram[0x14e4][1429] <Notice>: terminate called throwing an exception
>
UPDATE:
I think I know what the issue is, on upgrade the filepath it was looking for is at:
/var/mobile/Applications/997B32E7-6FFC-4696-9CAA-129BADE2FE64/Documents/instagram_json
while before the upgrade (v1.0.1) the filepath of the keychain is at:
/var/mobile/Applications/CEE344F7-4FE1-4455-BD6D-A4D6EAA4F5FE/Documents/instagram_json
and hence it can't find the key on the keychain
now here's how I determine the filePath:
- (NSString *)filePath {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:#"%#_json", self.identifier]];
return filePath;
}
I am just taking the first path that I found. So how do I make the path consistent before and after upgrade or all the time?
I am basically using the filePath as the keychain name:
[attributesDictionary setObject:filePath forKey:(id)kSecAttrAccount]; // Use the key as the account name
It's not entirely clear from your question, but it sounds like one of these builds is an ad hoc distributed build and the other an app store signed binary. If that's the case, the two will have different keychain values. The keychain is linked to the app's signing which differs between the two mechanisms.
I have released two versions of my App successfully
But after third version of app is released in App Store,when i downloaded from Appstore The App is getting Crashed :
When i try to launch app it is getting crashed immediately, and no crash reports were generated in Xcode Organizer.
The Same app is Working fine in IPAD/IPHONE SIMULATORS 5.0 and 4.1 versions
and also working fine when tested in IPHONE and IPAD devices with IOS 5.1.1 installed(run through XCODE).
No Major changes are given other than some image changes and Animation changes which are working fine when locally tested.
Please find below logs, please help to resolve this issue.
Jul 5 12:16:01 unknown fairplayd.N90[41] : libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0 Jul 5
12:16:01 unknown SpringBoard[52] : Unable to obtain a task
name port right for pid 225: (os/kern) failure Jul 5 12:16:01 unknown
com.apple.launchd[1] :
(UIKitApplication:com.myCompany.myApp[0xdaa7]) Exited: Killed: 9 Jul
5 12:16:01 unknown com.apple.launchd[1] :
(UIKitApplication:com.myCompany.myApp[0xdaa7]) Throttling respawn:
Will start in 2147483647 seconds Jul 5 12:16:01 unknown
SpringBoard[52] : Application 'myApp' exited abnormally with
signal 9: Killed: 9 Jul 5 12:16:02 unknown kernel[0] :
AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42110
Actually, this is not your fault. The App Store(s) has been having trouble as of late because it is serving corrupted binaries to consumers. Contact apple through iTunes connect for resolution, or wait a few days and release an update. To all developers reading this with pending application updates:
Wait, please wait!
Other symptoms of this include:
The app crashes immediately on launch (not even a splash screen shows, just black->crash).
Affected consumers are spread across many regions (not localized), but some are unaffected.
Your app/update has been approved fairly recently.
Mac apps will show "[App] is damaged and can't be opened. Delete [App] and download it again from the App Store."
The console will print: AppleFairplayTextCrypterSession::fairplayOopen() failed, error -42110
The only fix is to delete the app and reinstall (and basically pray for a working copy). Be assured, you are not the only one! Many major apps from huge companies are being affected by this issue (Angry Birds, NOOOOO).
Corroborated by:
http://www.marco.org/2012/07/04/app-store-corrupt-binaries
http://www.appleinsider.com/articles/12/07/04/developers_suspect_app_store_mix_up_led_to_corrupt_binaries.html
http://www.imore.com/2012/07/04/newly-installed-updated-apps-reportedly-crashing-launch-due-corrupt-app-store-binary-bug/
http://www.forbes.com/sites/anthonykosner/2012/07/05/apple-app-store-encryption-glitch-causes-many-new-app-updates-to-crash-see-list/
In your Locally tested Application Please Remove it in your Device
.After u update or download your updated app in App store
Gamekit applications running under 4.0 do not properly handle removing GKSession objects. Running under 3.1.3 or 3.2, if a peer disconnects and the session is cleaned up (as in Apple demos):
[gkSession disconnectFromAllPeers];
[gkSession setAvailable:NO];
[gkSession setDelegate:nil];
[gkSession setDataReceiveHandler:nil withContext:nil];
then the other peers receive state changes and a table view of peers can be updated.
In my application, one peer starts up as a server and the other starts up as a client. The client requests to connect to the server and the client's name appears in the server's list of players. If the server chooses to accept the request, the session connection is established and they can play the game. If however the client quits before the server accepts the request, the client cleans up the session (as above) and the client disappears from the server's peer list in response (when it receives a state change). This works amazingly on 3.1–3.2
When you run the same application running under 4.0 the server and client throw an error and it takes a very long time for peers to receive the state change, and when they do, the application crashes without any errors (even with NSZombieEnabled=YES in build arguments). The server never receives a "state change" message from the client. Instead, the following errors are thrown:
Thu Jul 8 23:27:26 unknown com.apple.mDNSResponder[18] <Notice>: BTLocalDeviceRemoveData: 60 byte key, 18 byte value
Thu Jul 8 23:27:26 unknown MobileBluetooth[29] <Notice>: BTLocalDeviceRemoveData - BT_ERROR_INVALID_HANDLE
Thu Jul 8 23:27:26 unknown com.apple.mDNSResponder[18] <Notice>: Call to BTLocalDeviceRemoveData failed with error 7
Thu Jul 8 23:13:39 unknown mDNSResponder[18] <Error>: external_stop_advertising_service: 18 00Z1Tud0A\\.\\.Tonberry\M-b\M^#\M^Ys\\032iPhone._1htnu3uko0uvsp._udp.local. TXT txtvers=1\M-B\M-&state=A
Thu Jul 8 23:13:39 unknown MobileBluetooth[29] <Notice>: BTLocalDeviceRemoveData - BT_ERROR_INVALID_HANDLE
With what I think is the key error:
Tue Jul 13 21:04:50 Tonberry com.apple.mDNSResponder[21] <Notice>: Call to BTDiscoveryAgentStopScan failed with error 400
Looks to me like the session is not being made unavailable (error in stopping advertising the service). The actual crash:
Thread 3 Crashed:
0 GameKitServices 0x06352f90 gckSessionChangeStateCList + 411
1 GameKitServices 0x0635b49c gckSessionRecvProc + 1474
2 libSystem.B.dylib 0x981c181d _pthread_start + 345
3 libSystem.B.dylib 0x981c16a2 thread_start + 34
I've filed a bug with my full application in progress. The app itself is done and was almost ready to submitted and runs pretty well under 3.1.3/3.2 but with the current state of Gamekit in 4.0 I can no longer submit it. Supremely disappointed and so hoping this bug report helps in the future. If anyone understands this error or what I might be doing wrong I would be supremely grateful.
Please help if you can. I'm about to throw in the towel here on this application and it's so close.
My suggestion would be to use ultimate pre-release builds of 4.1 and to report the "new" problem (either reopen the existing bug as not fixed or create a new one). That's IMHO your best bet to get the problem entirely fixed before the final release or a decent work around from Apple.
For anyone looking for help on this, I've find a workaround for the issues on 4.0.x (4.1 remedies the crashes but not the disconnect times). Just auto-accept everything. When someone requests a GameKit connection with connectToPeer:, just accept it. Don't give the user the option to select it. Disconnecting a peer from an established connection notifies the server immediately. If you leave them in just the "available" state, when they leave the connection, it will crash the server. Connect early and accept often!