iOS - Unable to find valid certificate when importing Provision file

Hey Guys!

I have recently been having trouble importing my provision file via the Project Settings > Platforms - iOS setting, with the common error being “No Valid Certificate Found” displaying next to my imported (and Valid) Provisionary file.

The certificate uploaded also shows a valid status (not green though?) and they were both created together. I have tried several paired (Old and New) Provisions and certificates, but with no luck.

The logs when displaying the platform settings and importing the provisioning file:


LogTemp:Display: Executing iPhonePackager certificates Engine -bundlename *
LogTemp:Display: CWD: C:\Program Files\Epic Games\4.7\Engine\Binaries\DotNet\IOS
LogTemp:Display: Initial Dir: C:\Program Files\Epic Games\4.7
LogTemp:Display: Env CWD: C:\Program Files\Epic Games\4.7\Engine\Binaries\DotNet\IOS
LogTemp:Display: BranchPath = AARON-PC/C/Program Files/Epic Games/4.7/Engine/Binaries — GameBranchPath = AARON-PC/C/Program Files/Epic Games/4.7/Engine/Binaries
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: A SCOTT (T7K6LB4LRM),Validity:VALID,StartDate:2014-07-13T12:19:10.0000000+10:00,EndDate:2015-07-13T12:19:10.0000000+10:00
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: A SCOTT (T7K6LB4LRM),Validity:VALID,StartDate:2015-05-21T20:52:46.0000000+10:00,EndDate:2016-05-20T20:52:46.0000000+10:00
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: A SCOTT (T7K6LB4LRM),Validity:VALID,StartDate:2015-05-20T21:46:19.0000000+10:00,EndDate:2016-05-19T21:46:19.0000000+10:00
LogTemp:Display: MATCHED-Provision:,File:,Cert:
LogTemp:Display: Executing iPhonePackager Install Engine -project C:/Users/Aaron/Documents/Unreal Projects/Drop_Ship/Drop_Ship.uproject -provision C:/Users/Aaron/Documents/AppleDev/DropShip/UE4iOSTest.mobileprovision -bundlename *
LogTemp:Display: CWD: C:\Program Files\Epic Games\4.7\Engine\Binaries\DotNet\IOS
LogTemp:Display: Initial Dir: C:\Program Files\Epic Games\4.7
LogTemp:Display: Env CWD: C:\Program Files\Epic Games\4.7\Engine\Binaries\DotNet\IOS
LogTemp:Display: BranchPath = AARON-PC/C/Program Files/Epic Games/4.7/Engine/Binaries — GameBranchPath = AARON-PC/C/Program Files/Epic Games/4.7/Engine/Binaries
LogTemp:Display: … ‘C:/Users/Aaron/Documents/AppleDev/DropShip/UE4iOSTest.mobileprovision’ → ‘C:/Users/Aaron/AppData/Local/Apple Computer/MobileDevice/Provisioning Profiles/UE4iOSTest.mobileprovision’
LogTemp:Display: Copy: C:\Users\Aaron\Documents\AppleDev\DropShip\UE4iOSTest.mobileprovision → C:/Users/Aaron/AppData/Local/Apple Computer/MobileDevice/Provisioning Profiles/UE4iOSTest.mobileprovision, last modified at 21/05/2015 9:04:26 PM
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: A SCOTT (T7K6LB4LRM),Validity:VALID,StartDate:2014-07-13T12:19:10.0000000+10:00,EndDate:2015-07-13T12:19:10.0000000+10:00
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: A SCOTT (T7K6LB4LRM),Validity:VALID,StartDate:2015-05-21T20:52:46.0000000+10:00,EndDate:2016-05-20T20:52:46.0000000+10:00
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: A SCOTT (T7K6LB4LRM),Validity:VALID,StartDate:2015-05-20T21:46:19.0000000+10:00,EndDate:2016-05-19T21:46:19.0000000+10:00
LogTemp:Display: Looking for a certificate that matches the application identifier ‘LZ4PTV4BP5.*’
LogTemp:Display: … Provision entry SN ‘0CD958803FCAD65A’ matched 1 installed certificate(s)
LogTemp:Display: … … Installed certificate ‘iPhone Developer: A SCOTT (T7K6LB4LRM)’ is valid (choosing it) (range ‘21/05/2015 8:52:46 PM’ to ‘20/05/2016 8:52:46 PM’)
LogTemp:Display: PROVISION-File:UE4iOSTest.mobileprovision,Name:UE4iOSTest,Validity:NO_CERT,StartDate:21/05/2015 11:04:22 AM,EndDate:20/05/2016 11:04:22 AM,Type:DEVELOPMENT
LogTemp:Display: MATCHED-Provision:,File:,Cert:

Im not sure if I am reading the logs wrong, but from what I see the certificate is matched and valid, yet the Provision is showing with ‘Validity:NO_CERT’.

Other posts that have had this similar issue comes down to the Bundle Identifier being incorrect, but as suggested in a UE4 forum post, I created this as a wildcard using both ‘com.dropship.(asterix)’ and ‘(asterix)’, but both still do not work when entering them into the corresponding field.

Running on the Windows 7 Launcher Editor, version UE4.7.6.

Any feedback or help is greatly appreciated!

Actually, this looks like you may have run into a bug with the certificate and provision being created and then immediately trying to use it. Could you try to see if it works now? It looks like in the code we check local time for certificate validity and then UTC time for whether or not the certificate start and end date matches the provision start and end date, but the certificate date is still in local time.

-Pete

That looked to be exactly it! Checked again this morning and everything was in working order except for some other build issues which are now also fixed.

I am now able to smoothly deploy to my device :slight_smile:

Thanks Pete!

I ran into exactly the same issue with 4.8.1. So what’s the workaround? I have to wait a few hours and it’ll fixed itself?

At this point, yes. The fix is in for the next release, just hasn’t been deemed critical enough for a hot fix.

-Pete

Could you post a log from the editor? That can potentially show me what is wrong.

-Pete

When you created the new certificate, did you update the provision to derive from that certificate? It looks like the certificate has ID:L352AR3EKH and the provision is looking for certificates with ID: 9ZU3927CBN. That has happened to me before when I updated the certificate, but didn’t use the right certificate when I regenerated the provision.

-Pete

Well, I’ve waited about 24h and it still does not work…

Here is the screenshot of my iOS settings…

And the log:

LogTemp:Display: Executing iPhonePackager certificates Engine -bundlename com.YourCompany.ColibriMobile
LogTemp:Display: CWD: C:\Program Files\Epic Games\4.8\Engine\Binaries\DotNet\IOS
LogTemp:Display: Initial Dir: C:\Program Files\Epic Games\4.8
LogTemp:Display: Env CWD: C:\Program Files\Epic Games\4.8\Engine\Binaries\DotNet\IOS
LogTemp:Display: BranchPath = COLIBRI1/C/Program Files/Epic Games/4.8/Engine/Binaries — GameBranchPath = COLIBRI1/C/Program Files/Epic Games/4.8/Engine/Binaries
LogTemp:Display: CERTIFICATE-Name:iPhone Developer: Olivier Comas (L352AR3EKH),Validity:VALID,StartDate:2015-07-03T15:20:13.0000000-04:00,EndDate:2016-07-02T15:20:13.0000000-04:00
LogTemp:Display: Looking for a certificate that matches the application identifier ‘9ZU3927CBN.
LogTemp:Display: … Provision entry SN ‘0ED47160BE16E060’ matched 0 installed certificate(s)
LogTemp:Display: … Failed to find a valid certificate that was in date
LogTemp:Display: PROVISION-File:ColibriMobile.mobileprovision,Name:Profile Colibri,Validity:NO_CERT,StartDate:03/07/2015 7:18:26 PM,EndDate:02/07/2016 7:18:26 PM,Type:DEVELOPMENT
LogTemp:Display: Looking for a certificate that matches the application identifier '9ZU3927CBN.

LogTemp:Display: … Provision entry SN ‘0ED47160BE16E060’ matched 0 installed certificate(s)
LogTemp:Display: … Failed to find a valid certificate that was in date
LogTemp:Display: PROVISION-File:Profile_Colibri.mobileprovision,Name:Profile Colibri,Validity:NO_CERT,StartDate:03/07/2015 7:18:26 PM,EndDate:02/07/2016 7:18:26 PM,Type:DEVELOPMENT
LogTemp:Display: MATCHED-Provision:,File:,Cert:

I could not fix it… I guess i must have mixed up something in the process. I just took my provision and my certificate from another machine and import them in Unreal. I restarted the whole process (as described here: Quick start) and it worked. Thanks for your help anyway!

Good day,

I am having the same problems.
When i try the solution it diddnt work, i cant get the IDs to match.
Ive tried creating new provisions and certificates from scatch but thats also not working.

Maybe you could show me how to update the provision?

-Tom

I had a similar problem and it was a problem from apple:
This may help some people:
http://stackoverflow.com/questions/35390072/this-certificate-has-an-invalid-issuer-apple-push-services