Issues with code signing on CircleCI 2.0

ios
code-signing
fastlane
2.0
match

#1

We are in the process of migrating our CircleCI 1.0 project to 2.0 and we’re having a bumpy time. We’ve made progress and the workflows are created, but on our final test run we’ve walked into an issue that everyone would like to avoid: code signing.

So, our pipeline works with fastlane match and we’ve been able to build, sign and upload our apps for a while now with 1.0. However with 2.0 builds are getting stuck during gym when signing:

...
[09:52:49]: ▸ Generating 'MyAppNotificationServiceExtension.appex.dSYM'
[09:52:49]: ▸ Running script '[CP] Copy Pods Resources'
[09:52:49]: ▸ Touching MyAppNotificationServiceExtension.appex
[09:52:49]: ▸ Signing /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-bqwbpzspiqvwmehkyqpjdnuythhl/Build/Intermediates.noindex/ArchiveIntermediates/MyApp\ Stage/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/MyAppNotificationServiceExtension.appex

And this is where things time out after 10-15 minutes. Does anyone else experience the same issues? As I said, the lanes worked as they should before we switched to 2.0 :frowning:
Running the lane locally built the app aswell. So something is amiss and I can’t see it. Any ideas?

Update:

I’ve taken a look into my branches that still run on CircleCI 1.0 and SSHed in to execute some lanes manually to play through the two small adjustments I made during the migration to 2.0. Everything works there. If I SSH into a 2.0 branch build: no chance. It always gets stuck at the same point when trying to sign the app extension.

Could there be the possibility, that CircleCI doesn’t unlock the keychain correctly?


I think my fastlane build is trying to ask a question on the console. How do i find out?
#2

I moved this thread into the Bug Reports board as I’m getting more and more certain this is not a configuration issue on our side.
On the fastlane repo I also had a conversation with someone else experiencing this aswell.

Please advise.


#3

Thanks for reporting this. I’ll send you a DM requesting more details. We’ll update here when we have a solution.


#4

One thing to make sure is that you have the setup_circle_ci action added to your Fastfile as described here: https://circleci.com/docs/2.0/ios-codesigning/#adding-match-to-the-fastlane-lane

This will create and unlock the keychain.


#5

That was the solution! Adding setup_circle_ci did the trick.
It would be good to highlight this step in the docs. That command somewhat gets lost in the details and it looks like it’s a private lane that just does “some setting up, whatever you want”.

It’s pretty easy to overlook right now…


#6

Glad that fixed it and thanks for the feedback.


#7

I encounter exactly same problem, but it won’t resolved when I added setup_circle_ci .


#8

Try creating a support ticket with CircleCI and they will try to help you out :slight_smile:


#9

Hi, could you please share the fastlane config as well as the config.yml that you use to set up fastlane match for code signing? we are stuck at the code signing part on CircleCI 2.0 for a few days. Really need some assistance. Thank you in advance.


#10