nowsecure / node-applesign

NodeJS module and commandline utility for re-signing iOS applications (IPA files).
https://www.nowsecure.com
MIT License
420 stars 77 forks source link

Error: Cannot find plist #152

Open Azair79 opened 1 year ago

Azair79 commented 1 year ago

Hi i am trying to resign an file with my provisioning profile but i keep getting the following error

Error: Cannot find plist
    at findIdentityFromProvisionSync (/opt/homebrew/lib/node_modules/applesign/lib/idprov.js:11:11)
    at Object.fromOptions (/opt/homebrew/lib/node_modules/applesign/lib/config.js:137:19)
    at new Applesign (/opt/homebrew/lib/node_modules/applesign/index.js:28:26)
    at main (/opt/homebrew/lib/node_modules/applesign/bin/applesign.js:20:14)
    at Object.<anonymous> (/opt/homebrew/lib/node_modules/applesign/bin/applesign.js:70:1)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)

my syntax for running applesign is

bin/applesign.js -i 13A6BDE0419813AXXXXXXXXXXX -b funky-dude -m ~/test/ready.zip -o ~/test/ready.ipa

any clues as to what may be going wrong here?

ditorri1 commented 1 year ago

I will be interested in the solution as well, thank you

trufae commented 1 year ago

This error is probably not very clear, but by reading the line and the code this happens when you provide an invalid file as argument to -m. this option expects a .mobileprovision file, but in your case you are passing a .zip file so it's unable to identify the signing key from there.

For user compiled apps the key is derived from the identifier by picking it from the keychain, so as a first try i would say to remove the -m ~/test/ready.zip from your line and check if it works.

Azair79 commented 1 year ago

Hi @trufae

Thanks for getting back to me i have just given this a try and i am now getting the following error

bin/applesign.js -i 13A6BDE0419813AXXXXXXXXXXX -b funky -m embedded.mobileprovision ready.ipa

File: /iOS/ipa/ready.ipa
Outdir: /iOS/ipa/ready.ipa.1b5cdb14-cb8e-43a9-a63a-bb81fa53cf4f
Cleaning up /iOS/ipa/ready.ipa.1b5cdb14-cb8e-43a9-a63a-bb81fa53cf4f
Unzipping /iOS/ipa/ready.ipa
Cleaning up /iOS/ipa/ready.ipa.1b5cdb14-cb8e-43a9-a63a-bb81fa53cf4f
Error: This IPA is encrypted
    at Applesign.signAppDirectoryInternal (/Users/git/node-applesign/index.js:154:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Cleaning up temp dir /var/folders/8h/pmlzd3t162dd08fq6ytszxfr0000gq/T/applesign/1d5b8b28-8f35-4d04-9734-a2151193b00c
Cleaning up /iOS/ipa/ready.ipa.1b5cdb14-cb8e-43a9-a63a-bb81fa53cf4f

Any suggestions?