bitrise-steplib/steps-xcode-archive

Umlauts in company have some troubles with envman / xcode-archive / ios-auto-provision-appstoreconnect

patrickbussmann opened this issue · 10 comments

Hello,

I have a issue which is very strange.
Today I integrated the ios-auto-provision-appstoreconnect step.
Before everything wents fine.

Small explaination.

Working:
I go to Workflow and to steps-xcode-archive. There I specify the parameter manually.

ForceCodeSignIdentity: Apple Distribution: xyz (ä) (xyz)

Not working:
ios-auto-provision-appstoreconnect exports the variable.

Exporting outputs
BITRISE_EXPORT_METHOD=ad-hoc
BITRISE_DEVELOPER_TEAM=1AB12312
BITRISE_PRODUCTION_CODESIGN_IDENTITY=Apple Distribution: xyz (ä) (xyz)
BITRISE_PRODUCTION_PROFILE=1234567-1234-1234-1234-1234567

Manual envman print step says it correct, too.

BITRISE_PROFILE_DIR=/Users/vagrant/profiles
BITRISE_PRODUCTION_CODESIGN_IDENTITY=Apple Distribution: xyz (ä) (xyz)
BITRISE_STEP_DATA_FOLDER_PATH=/Users/vagrant/bitrise/stepdata

But xcode-archive fails with wrong name.

error: No certificate for team 'xyz' matching 'Apple Distribution: xyz (î) (xyz)' found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target 'App' from project 'App')

Its very interesting because when I add the name to workflow environment variables it works.
But when its automatically done its not working.

For support team:
Working: https://app.bitrise.io/build/ac33c5eb664eb0ea#?tab=log
Not working: https://app.bitrise.io/build/1690a0aef3a6c9fb#?tab=log
App: https://app.bitrise.io/app/691144e1dc73a2fb

I generated a new certificate. (old one was from Oct 2020)
And with that the umlauts are escaped.
In the CSR I also not used umlauts for Common Name.

Hi @patrickbussmann,

You would instead provide the ID of the certificate not the name of the certificate. This should fix the issue.

Some configurations will allow this information to be picked up automatically other times you need to specify it. I don't know the specifics of why unfortunately. It has to do with how the certificate is created. But if you specify it manually, it works?

Ich lerne Deutsch. Wenn Sie bereit sind, mit mir zu tragen, kann ich auf Deutsch helfen
(or if english is better, can help in that) :P

Nice ^^ But english is more helpful when other peoples have the same issue 👍

So again a small explaination of the issue.

The complete workflow in theory is:

1.) ios-auto-provision-appstoreconnect checks the configuration of project, get release mode and use the right one
Then it outputs some variables for the next step, for example:
BITRISE_PRODUCTION_CODESIGN_IDENTITY=Apple Distribution: xyz (ä) (xyz)

2.) steps-xcode-archive gets the input and use it for archiving
And here we have the conflict.
When I specify the input ForceCodeSignIdentity: Apple Distribution: xyz (ä) (xyz) manually then it works.
When I not specify it, its not working. Because its using the envman variable from export from 1.
But then the ä is shown as î.

You understand?

Manually in bitrise.yml = ä is working
Automatically getting ä from autoprovisioning = ä is now î

This is expected behaviour.

fasci commented

We stumbled accross this issue here as we experienced the same problem with an umlaut.
It took us quite some time what the actual problem was, so thanks for the workaround, @patrickbussmann!
@non-binary, I don't quite understand how this could be expected behavior. At least we definitely didn't expect our build to fail because of this...

Hello @fasci 👋

Sorry for the misunderstanding, I can confirm that this is indeed an issue recognised by the devs, and they already have this listed in the backlog and scheduled for a fix! 🙂