Password for p12 file

Hi,

The first time I built the standalone app, I let Expo handle everything.
Now I want to do another build (about 4 months later) and I need to upload those files that expo generated but I dont know the password for p12 file.

Is there a default value for that? How can I recover this now?

Thanks in advance

Hi @homolog_ess,

Is expo-cli asking you for your p12 password? I would’ve assumed it would have generated a p8 file, and not a p12 (as that’s the older approach)

Hi @charliecruzan,

Yes. CLI is asking for a password for the .p12 file. These certificates have been generated by exp tool back in february.
After that we upgraded to the new tool (expo-cli)
I think one colleague might have run expo build:ios -c
That would clear all the credentials on Expo servers, right?
Is there a way that I can recover its password?

Unfortunately, that would’ve cleared them from our servers. I’d suggest taking a look at your Apple Developer console?

Hi @charliecruzan,
We recovered the password!
Still no lucky on the build though :confused:

I have the following files generated by Expo some time ago:

essilor-em-dobro.mobileprovision
essilor-em-dobro_dist.p12
essilor-em-dobro_push.p12
essilor-em-dobro_push_cert_private.key

Building on the command line I choose the option: Expo handles all credentials, you can still provide overrides

and then:

Please provide your Apple Distribution Certificate:
? Path to P12 file: /path/to/essilor-em-dobro_dist.p12
? P12 password: [hidden]
Please provide your Apple Push Notifications service key:
? Path to P8 file: /path/to/essilor-em-dobro_push.p12
? Key ID: ???
Please provide your Apple Provisioning Profile:
? Path to .mobile provisioning profile: /path/to/essilor-em-dobro.mobileprovision

And it failed with the error: Error: validateProvisioningProfile: provisioning profile is not associated with uploaded distribution certificate

I dont know what to fill in Key ID, after providing the push cert.

I suggest taking a look at this thread, which dives into what I think is the same issue

Thanks for your help and sorry to keep bothering you, @charliecruzan

Now I have a strange scenario:

The .p12 file that Expo created at my root directory doesn’t match with any Distribution certificate that I see on Apple console.

I ran these command to find out certification expiration date and it showed:

$ openssl pkcs12 -in essilor-em-dobro_dist.p12 -out certificate.pem -nodes
$ cat certificate.pem | openssl x509 -noout -enddate

notAfter=Oct  9 16:58:11 2019 GMT

On the apple certificates portal, I only see three certs for distribution:

The only certificate that matches this expiration date is a iOS Development type
My understand was that it must have been an Distribution certificate, that’s right?

How can I do another build with this certificate since the mobileprovision file doesn’t match this development cert?

You can fetch certs and provide the paths to them at build time, while electing to let Expo handle the process for others

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.