Подпись кода iOS Ошибка Fastlane Match - PullRequest
0 голосов
/ 03 мая 2018

При попытке развернуть приложение в iTunes Connect с помощью Fastlane я получаю следующее.

Это работало не так давно, и я не уверен, почему внезапно теперь это терпит неудачу. Я недавно обновил с CircleCI 1.0 до CircleCI 2.0, и это примерно, когда он начал отказывать. Последнее развертывание на CircleCI 1.0 было успешным, но все на CircleCI 2.0 потерпели неудачу.

Есть идеи, как исправить ошибку подписания кода с помощью Fastlane?

+-----------------------+-------------------------------------------------+
|                        Summary for match 2.94.0                         |
+-----------------------+-------------------------------------------------+
| type                  | appstore                                        |
| app_identifier        | ["com.charliefish.ios.test"]             |
| force                 | true                                            |
| git_url               | https://github.com/fishcharlie/myprivatedataA.git |
| git_branch            | master                                          |
| username              | charlie@test.com                              |
| keychain_name         | login.keychain                                  |
| readonly              | false                                           |
| team_id               | 86LATJ1793                                      |
| verbose               | false                                           |
| skip_confirmation     | false                                           |
| shallow_clone         | false                                           |
| clone_branch_directly | false                                           |
| force_for_new_devices | false                                           |
| skip_docs             | false                                           |
| platform              | ios                                             |
+-----------------------+-------------------------------------------------+

[11:38:04]: Cloning remote git repo...
[11:38:04]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[11:38:10]: Installing certificate...
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
[11:38:11]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)

+-------------------+------------------------------------------------+
|                       Installed Certificate                        |
+-------------------+------------------------------------------------+
| User ID           | 86LATJ1793                                     |
| Common Name       | iPhone Distribution: Charlie Fish (86LATJ1793) |
| Organisation Unit | 86LATJ1793                                     |
| Organisation      | Charlie Fish                                   |
| Country           | US                                             |
| Start Datetime    | 2018-05-03 18:13:05 UTC                        |
| End Datetime      | 2019-05-03 18:13:05 UTC                        |
+-------------------+------------------------------------------------+


+-------------------------------------+------------------------------------------------+
|                               Summary for sigh 2.94.0                                |
+-------------------------------------+------------------------------------------------+
| app_identifier                      | com.charliefish.ios.test                |
| username                            | charlie@test.com                             |
| force                               | true                                           |
| cert_id                             | PQ8B8T1T54                                     |
| provisioning_name                   | match AppStore com.charliefish.ios.test |
| ignore_profiles_with_different_name | true                                           |
| team_id                             | 86LATJ1793                                     |
| platform                            | ios                                            |
| adhoc                               | false                                          |
| development                         | false                                          |
| skip_install                        | false                                          |
| skip_fetch_profiles                 | false                                          |
| skip_certificate_verification       | false                                          |
| readonly                            | false                                          |
+-------------------------------------+------------------------------------------------+

[11:38:12]: Starting login with user 'charlie@test.com'
[11:38:13]: Successfully logged in
[11:38:13]: Fetching profiles...
[11:38:14]: Verifying certificates...
[11:38:14]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
[11:38:14]: Certificate for Provisioning Profile 'match AppStore com.charliefish.ios.test' not available locally: PQ8B8T1T54, skipping this one...
[11:38:14]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[11:38:15]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
[11:38:15]: No certificates for filter: Certificate ID: 'PQ8B8T1T54' 
+------------------+-------------+
|          Lane Context          |
+------------------+-------------+
| DEFAULT_PLATFORM | ios         |
| PLATFORM_NAME    | ios         |
| LANE_NAME        | ios release |
+------------------+-------------+
[11:38:15]: Could not find a matching code signing identity for type 'AppStore'. It is recommended to use match to manage code signing for you, more information on https://codesigning.guide. If you don't want to do so, you can also use cert to generate a new one: https://fastlane.tools/cert

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| ?   | match            | 11          |
+------+------------------+-------------+

[11:38:15]: fastlane finished with errors

[!] Could not find a matching code signing identity for type 'AppStore'. It is recommended to use match to manage code signing for you, more information on https://codesigning.guide. If you don't want to do so, you can also use cert to generate a new one: https://fastlane.tools/cert

EDIT

Теперь я получаю другую ошибку после добавления задачи настройки CircleCI в первую очередь.

Похоже, что репо добавляет .mobileprovision в конец профиля. Но он ищет не .mobileprovision версию.

+-----------------------+-------------------------------------------------+
|                        Summary for match 2.94.0                         |
+-----------------------+-------------------------------------------------+
| type                  | appstore                                        |
| app_identifier        | ["com.charliefish.ios.test"]             |
| force                 | true                                            |
| git_url               | https://github.com/fishcharlie/myprivatedataA.git |
| git_branch            | master                                          |
| username              | charlie@test.com                              |
| keychain_name         | fastlane_tmp_keychain                           |
| readonly              | true                                            |
| team_id               | 08RTYN1272                                      |
| verbose               | false                                           |
| skip_confirmation     | false                                           |
| shallow_clone         | false                                           |
| clone_branch_directly | false                                           |
| force_for_new_devices | false                                           |
| skip_docs             | false                                           |
| platform              | ios                                             |
+-----------------------+-------------------------------------------------+

[14:04:47]: Cloning remote git repo...
[14:04:47]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[14:04:48]: ?  Successfully decrypted certificates repo
[14:04:48]: Installing certificate...
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
[14:04:49]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)

+-------------------+------------------------------------------------+
|                       Installed Certificate                        |
+-------------------+------------------------------------------------+
| User ID           | 08RTYN1272                                     |
| Common Name       | iPhone Distribution: Charlie Fish (08RTYN1272) |
| Organisation Unit | 08RTYN1272                                     |
| Organisation      | Charlie Fish                                   |
| Country           | US                                             |
| Start Datetime    | 2018-05-03 18:13:05 UTC                        |
| End Datetime      | 2019-05-03 18:13:05 UTC                        |
+-------------------+------------------------------------------------+

[14:04:49]: No matching provisioning profiles found for 'AppStore_com.charliefish.ios.test'
[14:04:49]: A new one cannot be created because you enabled `readonly`
[14:04:49]: Provisioning profiles in your repo for type `appstore`:
[14:04:49]: - 'AppStore_com.charliefish.ios.test.mobileprovision'
[14:04:49]: If you are certain that a profile should exist, double-check the recent changes to your match repository
+---------------------------+--------------------------------------------------------+
|                                    Lane Context                                    |
+---------------------------+--------------------------------------------------------+
| DEFAULT_PLATFORM          | ios                                                    |
| PLATFORM_NAME             | ios                                                    |
| LANE_NAME                 | ios release                                            |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/distiller/Library/Keychains/login.keychain-db" |
+---------------------------+--------------------------------------------------------+
[14:04:49]: No matching provisioning profiles found and can not create a new one because you enabled `readonly`. Check the output above for more information.

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | setup_circle_ci            | 0           |
| ?   | match                      | 2           |
+------+----------------------------+-------------+

[14:04:49]: fastlane finished with errors

[!] No matching provisioning profiles found and can not create a new one because you enabled `readonly`. Check the output above for more information.

Ответы [ 2 ]

0 голосов
/ 20 июня 2018

Я смог решить эту проблему, вернувшись назад и посмотрев мою конфигурацию v1.0. На моем конфиге CI установлено read_only: false. Что я не считаю лучшей практикой. Но теперь он не выдает никаких ошибок и работает нормально. Я почти уверен, что все еще получаю предупреждение security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain., но оно работает даже с этим предупреждением.

У меня действительно есть setup_circle_ci в моей конфигурации.

0 голосов
/ 05 мая 2018

Эта ошибка может иметь много причин, некоторые вещи, которые вы должны попробовать:

  • Убедитесь, что вы устанавливаете сертификат локально, а не в системе.
  • Проверьте срок действия сертификата WWDR.
  • Убедитесь, что в целях вашего проекта определена действительная идентификация подписи кода. Это может произойти, если в качестве идентификатора подписи кода выбран параметр «Не подписывать код».

Я прочитал ваш пост в Upwork.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...