sparkfabrik / ios-build-action

Build iOS project (.xcodeproj, .xcworkspace), export .ipa, optional upload to BrowserStack App Live.
MIT License
129 stars 24 forks source link

No value found for 'app_identifier' #26

Closed sunzhongliangde closed 6 months ago

sunzhongliangde commented 6 months ago

Hi! this is my workflow

  name: build
        uses: sparkfabrik/ios-build-action@v2.3.0
        with:
            upload-to-testflight: false
            increment-build-number: false
            build-pods: true
            pods-path: Podfile
            configuration: Release
            export-method: ad-hoc
            workspace-path: ${{ github.GITHUB_WORKSPACE }}
            project-path: ${{ github.GITHUB_WORKSPACE }}
            scheme: QMSPad
            output-path: build-${{ github.sha }}.ipa
            apple-key-id: ${{ secrets.APPLE_KEY_ID }}
            apple-key-issuer-id: ${{ secrets.APPLE_KEY_ISSUER_ID }}
            apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }}
            team-id: ${{ secrets.TEAM_ID }}
            #team-name: ${{ secrets.TEAM_NAME }}
            match-password: ${{ secrets.MATCH_PASSWORD }}
            match-git-url: ${{ secrets.MATCH_GIT_URL }}
            match-git-basic-authorization: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
            match-build-type: adhoc
            browserstack-upload: false
            browserstack-username: ${{ secrets.BROWSERSTACK_USERNAME }}
            browserstack-access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
            fastlane-env: stage
            ios-app-id: com.qms.exfresh

When I tried to run on GitHub Action, an error occurred. I am not sure if it is related to the configuration variable of the script, and I cannot find where to set this variable

[11:13:36]: fastlane detected a Gemfile in the current directory
[11:13:36]: However, it seems like you didn't use `bundle exec`
[11:13:36]: To launch fastlane faster, please use
[11:13:36]: 
[11:13:36]: $ bundle exec fastlane build
[11:13:36]: 
[11:13:36]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
+-------------------------------------------------------------------------------------------------------------------------+
|                                                      Used plugins                                                       |
+----------------------------------------+---------+----------------------------------------------------------------------+
| Plugin                                 | Version | Action                                                               |
+----------------------------------------+---------+----------------------------------------------------------------------+
| fastlane-plugin-increment_version_code | 0.4.3   | increment_version_code                                               |
| fastlane-plugin-browserstack           | 0.3.2   | upload_to_browserstack_app_automate, upload_to_browserstack_app_live |
+----------------------------------------+---------+----------------------------------------------------------------------+
[11:13:38]: In the config file './fastlane/Matchfile' you have the line app_identifier, but didn't provide any value. Make sure to append a value right after the option name. Make sure to check the docs for more information
[11:13:38]: Sending anonymous analytics information
[11:13:38]: Learn more at https://docs.fastlane.tools/#metrics
[11:13:38]: No personal or sensitive data is sent.
[11:13:38]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[11:13:38]: ------------------------------
[11:13:38]: --- Step: default_platform ---
[11:13:38]: ------------------------------
[11:13:38]: Driving the lane 'ios build' 🚀
[11:13:38]: -----------------------------
[11:13:38]: --- Step: create_keychain ---
[11:13:38]: -----------------------------
[11:13:38]: $ security list-keychains -d user
[11:13:38]: ▸ "/Users/runner/Library/Keychains/ios-build.keychain-db"
[11:13:38]: Found keychain '/Users/runner/Library/Keychains/ios-build.keychain-db' in list-keychains, adding to search list skipped
[11:13:38]: -----------------------
[11:13:38]: --- Step: cocoapods ---
[11:13:38]: -----------------------
...............
................
.................
[11:14:30]: ---------------------------------------
[11:14:30]: --- Step: app_store_connect_api_key ---
[11:14:30]: ---------------------------------------
Key :storage already exists. It will be replaced. at /usr/local/lib/ruby/gems/3.0.0/gems/google-cloud-storage-1.47.0/lib/google-cloud-storage.rb:166:in `<top (required)>'
[11:14:30]: -------------------
[11:14:30]: --- Step: match ---
[11:14:30]: -------------------
[11:14:30]: In the config file './fastlane/Matchfile' you have the line app_identifier, but didn't provide any value. Make sure to append a value right after the option name. Make sure to check the docs for more information
[11:14:30]: Successfully loaded '/Users/runner/work/QMS/QMS/fastlane/Matchfile' 📄
+----------------------------------------------------------------------------------------+
|                      Detected Values from './fastlane/Matchfile'                       |
+-------------------+--------------------------------------------------------------------+
| git_url           | *** |
| storage_mode      | git                                                                |
| type              | adhoc                                                              |
| keychain_name     | ios-build.keychain                                                 |
| keychain_password | ***78                                                           |
| team_id           | ***                                                         |
+-------------------+--------------------------------------------------------------------+
+-------------------------------------------------------------------------------------------------------------+
|                                          Summary for match 2.219.0                                          |
+----------------------------------------+--------------------------------------------------------------------+
| type                                   | adhoc                                                              |
| api_key                                | ********                                                           |
| readonly                               | false                                                              |
| generate_apple_certs                   | true                                                               |
| skip_provisioning_profiles             | false                                                              |
| team_id                                | ***                                                         |
| storage_mode                           | git                                                                |
| git_url                                | *** |
| git_branch                             | master                                                             |
| shallow_clone                          | false                                                              |
| clone_branch_directly                  | false                                                              |
| git_basic_authorization                | ********                                                           |
| skip_google_cloud_account_confirmation | false                                                              |
| s3_skip_encryption                     | false                                                              |
| gitlab_host                            | https://gitlab.com/                                                 |
| keychain_name                          | ios-build.keychain                                                 |
| keychain_password                      | ********                                                           |
| force                                  | false                                                              |
| force_for_new_devices                  | false                                                              |
| include_mac_in_profiles                | false                                                              |
| include_all_certificates               | false                                                              |
| force_for_new_certificates             | false                                                              |
| skip_confirmation                      | false                                                              |
| safe_remove_certs                      | false                                                              |
| skip_docs                              | false                                                              |
| platform                               | ios                                                                |
| derive_catalyst_app_identifier         | false                                                              |
| fail_on_name_taken                     | false                                                              |
| skip_certificate_matching              | false                                                              |
| skip_set_partition_list                | false                                                              |
| verbose                                | false                                                              |
+----------------------------------------+--------------------------------------------------------------------+
[11:14:30]: Cloning remote git repo...
[11:14:30]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[11:14:31]: Checking out branch master...
[11:14:31]: 🔓  Successfully decrypted certificates repo
[11:14:31]: Verifying that the certificate and profile are still valid on the Dev Portal...
[11:14:31]: Creating authorization token for App Store Connect API
+---------------------------------------------------------------------------------+
|                                  Lane Context                                   |
+---------------------------+-----------------------------------------------------+
| DEFAULT_PLATFORM          | ios                                                 |
| PLATFORM_NAME             | ios                                                 |
| LANE_NAME                 | ios build                                           |
| KEYCHAIN_PATH             | ~/Library/Keychains/ios-build.keychain              |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/runner/Library/Keychains/login.keychain-db" |
+---------------------------+-----------------------------------------------------+
[11:14:31]: No value found for 'app_identifier'
+------------------------------------------------+
|                fastlane summary                |
+------+---------------------------+-------------+
| Step | Action                    | Time (in s) |
+------+---------------------------+-------------+
| 1    | default_platform          | 0           |
| 2    | create_keychain           | 0           |
| 3    | cocoapods                 | 51          |
| 4    | app_store_connect_api_key | 0           |
| 💥   | match                     | 0           |
+------+---------------------------+-------------+
[11:14:31]: fastlane finished with errors

[!] No value found for 'app_identifier'
Error: The process '/bin/bash' failed with exit code 1
Richie911 commented 3 months ago

@sunzhongliangde , how did you solve this issue

michakfromparis commented 3 months ago

Having the same issue here

michakfromparis commented 3 months ago

@Richie911 Upgrade the action to v2.3.2

Richie911 commented 3 months ago

@michakfromparis Thanks. I had to put the ios-app-id value in quotes

sunzhongliangde commented 3 months ago

There are many reasons for this error,

  1. First, check that setup_ci if ENV ['CI '] needs to be executed before executing the script
  2. Ensure that the app_id and certificate configured in the. xcodeproj file are consistent with the workflow file configuration. If multiple app_ids need to be built, you can use update_code_signing_settings({xxx:xxx})