iPhonePackager - System.Security.Cryptography.CryptographicException

I’ve done everything like said in documentation. Every time trying to package Ipa I’ve this error: System.Security.Cryptography.CryptographicException - keyset does not exist.

log:



IPhonePackager: CWD: D:\Unreal4\Unreal Engine\4.3\Engine\Binaries\DotNET\IOS

IPhonePackager: BranchPath = A_KOLOSKA/D/Unreal4/Unreal Engine/4.3/Engine/Binaries --- GameBranchPath = A_KOLOSKA/D/Unreal4/Unreal Engine/4.3/Engine/Binaries

IPhonePackager: 

IPhonePackager: ----------

IPhonePackager: Executing command 'Clean' ...

IPhonePackager: Cleaning temporary files from PC ... 

IPhonePackager:  ... cleaning: ..\..\..\..\\Engine\Intermediate\IOS-Deploy\UE4Game\Development\

IPhonePackager: 

IPhonePackager: Loaded stub IPA from 'D:\Unreal4\Unreal Engine\4.3\Engine\Binaries\IOS\UE4Game.stub' ...

IPhonePackager:  ... 'D:\Unreal4\Unreal Engine\4.3\Engine\Binaries\IOS\UE4Game.stub' -> 'C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\Binaries\IOS\HR2.ipa'

IPhonePackager:       Copy: D:\Unreal4\Unreal Engine\4.3\Engine\Binaries\IOS\UE4Game.stub -> C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\Binaries\IOS\HR2.ipa, last modified at 2014-07-21 09:31:00

IPhonePackager: Found Info.plist (C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\Saved\StagedBuilds\IOS\Info.plist) in stage, which will be merged in with stub plist contents

IPhonePackager: Using mobile provision 'hr' to code sign

IPhonePackager:  ... Writing updated embedded.mobileprovision

IPhonePackager: ... Found matching certificate 'iPhone Developer: Pawel Rohleder (VHJ4NETV3X)'

IPhonePackager: Found CFBundleVersion string '10246.0' and updated it to '10246.15'

IPhonePackager: Saving IPA ...

IPhonePackager:  ... Writing updated Info.plist

IPhonePackager: Opening source executable...

IPhonePackager: ... Initial signature step

IPhonePackager: **IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException: Zestaw kluczy nie istnieje.**

IPhonePackager: 

IPhonePackager:    w System.Security.Cryptography.Pkcs.PkcsUtils.CreateSignerEncodeInfo(CmsSigner signer, Boolean silent)

IPhonePackager:    w System.Security.Cryptography.Pkcs.SignedCms.Sign(CmsSigner signer, Boolean silent)

IPhonePackager:    w System.Security.Cryptography.Pkcs.SignedCms.ComputeSignature(CmsSigner signer, Boolean silent)

IPhonePackager:    w MachObjectHandling.CodeDirectorySignatureBlob.SignCodeDirectory(X509Certificate2 SigningCert, DateTime SigningTime, CodeDirectoryBlob CodeDirectory)

IPhonePackager:    w iPhonePackager.CodeSignatureBuilder.PerformSigning()

IPhonePackager:    w iPhonePackager.CookTime.RepackageIPAFromStub()

IPhonePackager:    w iPhonePackager.Program.Main(String] args)

CommandUtils.Run: Run: Took 5,4238282s to run IPhonePackager.exe

BuildCommand.Execute: ERROR: BUILD FAILED

Program.Main: ERROR: AutomationTool terminated with exception:

Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:1): D:\Unreal4\Unreal Engine\4.3\Engine\Binaries\DotNET\IOS\IPhonePackager.exe RepackageFromStage "Engine" -config Development -sign -stagedir "C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\Saved\StagedBuilds\IOS" -project "C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\HR2.uproject". See logfile for details: 'IPhonePackager.txt' 

Stacktrace:    w AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options)

   w IOSPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)

   w Project.Package(ProjectParams Params, Int32 WorkingCL)

   w BuildCookRun.DoBuildCookRun(ProjectParams Params)

   w BuildCommand.Execute()

   w AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)

   w AutomationTool.Automation.Process(String] CommandLine)

   w AutomationTool.Program.MainProc(Object Param)

   w AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)

   w AutomationTool.Program.Main()

Program.Main: ERROR: Command failed (Result:1): D:\Unreal4\Unreal Engine\4.3\Engine\Binaries\DotNET\IOS\IPhonePackager.exe RepackageFromStage "Engine" -config Development -sign -stagedir "C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\Saved\StagedBuilds\IOS" -project "C:\Users\akoloska\Documents\Unreal Projects\HR2 4.3\HR2.uproject". See logfile for details: 'IPhonePackager.txt' 

ProcessManager.KillAll: Trying to kill 0 spawned processes.

Program.Main: AutomationTool exiting with ExitCode=1

Domain_ProcessExit

ProcessManager.KillAll: Trying to kill 0 spawned processes.

copying UAT log files...

RunUAT.bat ERROR: AutomationTool was unable to run successfully.

BUILD FAILED



I’ve added the certificate to MMC. Using windows 7.

It seems as if something is problematic with your private/public key pair. Did you use this Windows machine to generate your CSR (Certificate Signing Request) and get the cert from developer.apple.com or another? Typically, when developing iOS apps on a Mac, you can check to make sure that you have a private/public key pair set up appropriately, but not on Windows, which is why I ask.

Try running the editor as an administrator.

Was this fixed by running as admin? Everything was fine with developer build, but running as distribution/shipping build, I’m running into this issue with 4.4.3

I had this same issue, and running the editor as Admin actually worked for me. Its strange though, I’ve been using the same certs for awhile now and this randomly now seems to be happening. Running 4.19.