[AC-6477] I am trying to build with xcode 11 and sdk 8.3.1.GA and I am getting this message - [ERROR] Invalid "--distribution-name" value
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Appcelerator CLI, Titanium SDK & CLI |
| Labels | ios |
| Reporter | Clint Oaks |
| Assignee | Abir Mukherjee |
| Created | 2020-01-28T22:45:50.000+0000 |
| Updated | 2020-01-31T22:01:41.000+0000 |
Description
I have added the relevant environment for iOS from -L app_joseandro_version -O /Users/omadiadmin/Builds/Android/4.4.43_8.3.1.GA/4.4.43
When I try to build for iOS which I have been able to do in the past with xcode 10, and 8.0.1.GA I get this error - [ERROR] Invalid "--distribution-name" value "Omadi, Inc. (WSF7G42V5D)". I know my provisioning profile is correct and I have always used the same --distribution-name in the past, so I am not sure why I am getting failures on newer xcode with 8.3.1.GA.
appc ti --no-prompt build --log-level info --skip-js-minify --crittercism -F universal -D production -p ios --sdk 8.3.1.GA -d /Users/omadiadmin/Projects/omadi_mobile/titanium_src/Resources -P 3408b5ab-f213-4574-9ae1-bc381d7bc33c -T dist-appstore --distribution-name 'Omadi, Inc. (WSF7G42V5D)'
Can you please help me figure out what I am missing? The environment has stayed the same other then a new xcode 11 cert, xcode 11, and the new 8.3.1.GA sdk. What needs to be set for the --distribution-name? Where do I get that if not from
appc ti info in the environment section. I can build the android build fine using this command -
appc ti build --no-prompt build --platform android --sdk 8.3.1.GA --skip-js-minify --project-dir /Users/omadiadmin/Projects/omadi_mobile/titanium_src --log-level info -T dist-playstore -K /Users/omadiadmin/Projects/omadi_mobile/titanium_src/../omadi.keystore -P appc ti info?
Thanks,
Clint
[~coaks] What SDK were you previously on before updating to 8.3.1.GA? It's possible that this could be triggered by changes in TIMOB-27358. To support the new Apple certificates SDK now accepts the full name of a certificate i.e
iPhone Distribution: Omadi, Inc. (WSF7G42V5D), but if a short name (i.e.Omadi, Inc. (WSF7G42V5D)) is provided it will try to lookup the cert but in the case where both aniPhone DistributionandApple Distributioncert exist on the system it's not possible to distinguish between the two so we're forced to error. So I would maybe try the following * Ensure 8.3.1.GA is selected as your active SDKappc ti sdk select 8.3.1.GA* Runappc ti info -t iosand look for the full name of the cert you wish to use * Use this as the value for--distribution-nameThanks for the reply @eharris It could be related as I was previously using xcode 10 with sdk 8.0.1.GA. I ran appc ti info -t and tried building with the full certificate name which is - Apple Distribution: Omadi, Inc. (WSF7G42V5D) I still got the same error. Below are the logs, I hid the serial number and session key but let me know if there is anything else that should be hidden from the logs:
2020-01-29T17:46:00.882Z | TRACE | executing titanium run plugin with: ARGS: [ '--no-prompt', 'build', '--log-level', 'trace', '--skip-js-minify', '--crittercism', '-F', 'universal', '-D', 'production', '-p', 'ios', '--sdk', '8.3.1.GA', '/Users/omadiadmin/Projects/omadi_mobile/titanium_src/Resources', '-T', 'dist-appstore', '-P', '3408b5ab-f213-4574-9ae1-bc381d7bc33c', '-R', 'Apple Distribution: Omadi, Inc. (WSF7G42V5D)' ] OPTS: { projectDir: '/Users/omadiadmin/Projects/omadi_mobile/titanium_src/Resources', logLevel: 'trace', output: undefined, version: undefined, quiet: undefined, banner: true, colors: true, services: true, progressBars: true, prompt: false, promptPort: undefined, promptType: undefined, username: undefined, password: '[HIDDEN]', env: undefined, orgId: undefined, pluginPaths: '3408b5ab-f213-4574-9ae1-bc381d7bc33c', registry: undefined, vpcEnv: undefined, session: { ipaddress: '[HIDDEN]', registry: undefined, username: 'build@omadi.com', password: '[HIDDEN]', session: '[HIDDEN]', nonce: undefined, environment: { name: 'production', isProduction: true, acsBaseUrl: 'https://api.cloud.appcelerator.com', nodeACSEndpoint: 'https://admin.cloudapp-enterprise.appcelerator.com' }, token: undefined, fingerprint: '[HIDDEN]', fingerprint_description: 'Mac OSX Serial Number: [HIDDEN]', org_id: 100000645, expiry: 1580924760796 } } 2020-01-29T17:46:00.980Z | DEBUG | Titanium Downloads Last Checked: 1580318593399 2020-01-29T17:46:01.009Z | TRACE | No project alloy hook; skipping update to 1.0.1 [ERROR] Invalid "--distribution-name" value "Apple Distribution: Omadi, Inc. (WSF7G42V5D)"[~coaks], could you provide the full log output from your build and the
appc ti info -t iosoutput. If you'd prefer to not upload it to jira feel free to send it me via email (in my jira profile) or message me privately on [ti-slack](https://tislack.org/)Hi Ewan, I believe I have solved the issue. I was passing this
-R Apple Distribution: Omadi, Inc. (WSF7G42V5D) and -P 3408b5ab-f213-4574-9ae1-bc381d7bc33cto the appc ti build command but it would fail. As soon as I took off the --no-prompt from the command I got prompted with this:When I selected either one, the build would work. This led me to my keychain, where I had the same certificate with the same name installed in the System.keychain and the login.keychain. I removed the certificate from the System.keychain and re-ran the build and it worked. It worked without supplying a -R with the uuid and cert name as well as running the command with the values specified. It appears that the cli was getting confused with the two certificates in two different keychains and since I had --no-prompt it was failing with a generic --distribution-name error. We can close this issue, it might be worth updating documentation to specify that with xcode 11 and newer appc sdk, there can only be 1 certificate installed in the keychain. Thank you again for your time.[ERROR] Unable to determine correct certificate from supplied value Which distribution certificate would you like to use? /Users/omadiadmin/Library/Keychains/login.keychain-db 1) Apple Distribution: Omadi, Inc. (WSF7G42V5D) (expires Jan 6, 2021 12:45:39 pm) /Library/Keychains/System.keychain 2) Apple Distribution: Omadi, Inc. (WSF7G42V5D) (expires Jan 6, 2021 12:45:39 pm) Select a certificate by number or name: