Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ipa or pkg file given while uploading to app store #21884

Closed
arpitmishra-eaton opened this issue Feb 21, 2024 · 7 comments
Closed

No ipa or pkg file given while uploading to app store #21884

arpitmishra-eaton opened this issue Feb 21, 2024 · 7 comments

Comments

@arpitmishra-eaton
Copy link

arpitmishra-eaton commented Feb 21, 2024

New Issue Checklist

Issue Description

We are uploading an app to the Apple app store using Azure pipeline and authenticating it using api_key. but as a result,
"No ipa or pkg file " received.

Command executed
  • task: DownloadSecureFile@1
    displayName: Download secure file
    name: p8file
    inputs:
    secureFile: authkey.p8
  • script: >-
    fastlane ios release
    key_id: $(API Key ID) issuer_id: $(API Issuer ID) filepath: "$(p8file.secureFilePath)" build_number: ** app_version:** team_id:** app_identifier:'' metadata_path:'$(Build.SourcesDirectory)/ios/fastlane/metadata/en-US/release_notes.txt' ipa:'$(build.artifactstagingdirectory)//*.ipa'
    displayName: Promote build to prod release
    workingDirectory: $(Build.SourcesDirectory)/ios/

Note: in the ipa path, there are 2 asterisks in between the slash followed by *.ipa, but I believe it is taken as bold here in the issue.

Fastlane:

default_platform(:ios)

platform :ios do

desc "Release Testflight Build"
lane :release do |options|

deliver(
  api_key = app_store_connect_api_key(
  key_id: options[:key_id],
  issuer_id: options[:issuer-id],
  key_filepath: options[:filepath],
  ),
  pilot(api_key: api_key),
  ipa: options[:ipa],
  automatic_release: true,
  skip_binary_upload: false, 
  force: true,
  build_number: options[:build_number],
  submit_for_review: true,
  team_id: options[:team_id],
  app_version: options[:app_version],
  app_identifier: options[:app_identifier],
  metadata_path: options[:metadata_path],
  skip_screenshots: true,
  overwrite_screenshots: false,
  precheck_include_in_app_purchases: false,
  # https://github.com/artsy/eigen/blob/faa02e2746194d8d7c11899474de9c517435eca4/fastlane/Fastfile#L131-L149
  submission_information: {
    add_id_info_uses_idfa: false,
    }      
  )

end
end

Complete output when running fastlane, including the stack trace and command used
 [2024-02-21T09:22:59.4449970Z ##[section]Starting: Promote build to prod release
2024-02-21T09:22:59.4455880Z ==============================================================================
2024-02-21T09:22:59.4456090Z Task         : Command line
2024-02-21T09:22:59.4456190Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2024-02-21T09:22:59.4456360Z Version      : 2.231.1
2024-02-21T09:22:59.4456470Z Author       : Microsoft Corporation
2024-02-21T09:22:59.4456580Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2024-02-21T09:22:59.4456740Z ==============================================================================
2024-02-21T09:22:59.8985300Z Generating script.
2024-02-21T09:22:59.9140380Z Script contents:
2024-02-21T09:22:59.9155060Z fastlane ios release key_id:*** issuer_id:*** filepath:"/Users/runner/work/_temp/AuthKey_***.p8" build_number:** app_version:** team_id:** app_identifier:'**' metadata_path:'/Users/runner/work/1/s/ios/fastlane/metadata/en-US/release_notes.txt' ipa:'/Users/runner/work/1/a/**/*.ipa'
2024-02-21T09:22:59.9175530Z ========================== Starting Command Output ===========================
2024-02-21T09:23:00.2108910Z [command]/bin/bash --noprofile --norc /Users/runner/work/_temp/7e06c170-10a6-4dda-a64d-045a6966cc18.sh
2024-02-21T09:23:02.1377280Z [09:23:02]: �[33mfastlane detected a Gemfile in the current directory�[0m
2024-02-21T09:23:02.1380110Z [09:23:02]: �[33mHowever, it seems like you didn't use `bundle exec`�[0m
2024-02-21T09:23:02.1383930Z [09:23:02]: �[33mTo launch fastlane faster, please use�[0m
2024-02-21T09:23:02.1384930Z [09:23:02]: 
2024-02-21T09:23:02.1387240Z [09:23:02]: �[36m$ bundle exec fastlane ios release key_id:*** issuer_id:*** filepath:/Users/runner/work/_temp/AuthKey_***.p8 build_number:** app_version:** team_id:** app_identifier:** metadata_path:/Users/runner/work/1/s/ios/fastlane/metadata/en-US/release_notes.txt ipa:/Users/runner/work/1/a/**/*.ipa�[0m
2024-02-21T09:23:02.1390130Z [09:23:02]: 
2024-02-21T09:23:02.1392440Z [09:23:02]: �[33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile�[0m
2024-02-21T09:23:04.1420200Z [09:23:04]: Sending anonymous analytics information
2024-02-21T09:23:04.1434780Z [09:23:04]: Learn more at https://docs.fastlane.tools/#metrics
2024-02-21T09:23:04.1436090Z [09:23:04]: No personal or sensitive data is sent.
2024-02-21T09:23:04.1437480Z [09:23:04]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
2024-02-21T09:23:04.1518510Z [09:23:04]: �[32m------------------------------�[0m
2024-02-21T09:23:04.1521170Z [09:23:04]: �[32m--- Step: default_platform ---�[0m
2024-02-21T09:23:04.1522410Z [09:23:04]: �[32m------------------------------�[0m
2024-02-21T09:23:04.1524280Z [09:23:04]: �[32mDriving the lane 'ios release' 🚀�[0m
2024-02-21T09:23:04.1527560Z [09:23:04]: �[32m---------------------------------------�[0m
2024-02-21T09:23:04.1529500Z [09:23:04]: �[32m--- Step: app_store_connect_api_key ---�[0m
2024-02-21T09:23:04.1531210Z [09:23:04]: �[32m---------------------------------------�[0m
2024-02-21T09:23:04.1787690Z [09:23:04]: �[32m-------------------�[0m
2024-02-21T09:23:04.1788410Z [09:23:04]: �[32m--- Step: pilot ---�[0m
2024-02-21T09:23:04.1789000Z [09:23:04]: �[32m-------------------�[0m
2024-02-21T09:23:04.1791730Z [09:23:04]: Creating authorization token for App Store Connect API
2024-02-21T09:23:04.1809280Z +--------------------------------+
2024-02-21T09:23:04.1810460Z |          �[33mLane Context�[0m          |
2024-02-21T09:23:04.1811500Z +------------------+-------------+
2024-02-21T09:23:04.1811910Z | DEFAULT_PLATFORM | ios         |
2024-02-21T09:23:04.1813290Z | PLATFORM_NAME    | ios         |
2024-02-21T09:23:04.1813860Z | LANE_NAME        | ios release |
2024-02-21T09:23:04.1814500Z +------------------+-------------+
2024-02-21T09:23:04.1815180Z [09:23:04]: �[31mNo ipa or pkg file given�[0m
2024-02-21T09:23:04.1854710Z 
2024-02-21T09:23:04.1860920Z +------------------------------------------------+
2024-02-21T09:23:04.1861790Z |                �[32mfastlane summary�[0m                |
2024-02-21T09:23:04.1862460Z +------+---------------------------+-------------+
2024-02-21T09:23:04.1862980Z | Step | Action                    | Time (in s) |
2024-02-21T09:23:04.1863910Z +------+---------------------------+-------------+
2024-02-21T09:23:04.1864290Z | 1    | default_platform          | 0           |
2024-02-21T09:23:04.1864840Z | 2    | app_store_connect_api_key | 0           |
2024-02-21T09:23:04.1865240Z | 💥   | �[31mpilot�[0m                     | 0           |
2024-02-21T09:23:04.1865580Z +------+---------------------------+-------------+
2024-02-21T09:23:04.1865720Z 
2024-02-21T09:23:04.1866030Z [09:23:04]: �[31mfastlane finished with errors�[0m
2024-02-21T09:23:04.1866310Z �[31m
2024-02-21T09:23:04.1866530Z [!] No ipa or pkg file given�[0m
2024-02-21T09:23:04.3757440Z 
2024-02-21T09:23:04.3793840Z ##[error]Bash exited with code '1'.
2024-02-21T09:23:04.3812240Z ##[section]Finishing: Promote build to prod release] 

Environment

 [ [2024-02-15T06:54:52.4234750Z ### Stack
2024-02-15T06:54:52.4307440Z 
2024-02-15T06:54:52.4408590Z | Key                         | Value                                            |
2024-02-15T06:54:52.4510300Z | --------------------------- | ------------------------------------------------ |
2024-02-15T06:54:52.4611480Z | OS                          | 12.7.3                                           |
2024-02-15T06:54:52.4712620Z | Ruby                        | 3.0.6                                            |
2024-02-15T06:54:52.4814130Z | Bundler?                    | false                                            |
2024-02-15T06:54:52.4915220Z | Git                         | git version 2.43.0                               |
2024-02-15T06:54:52.5016380Z | Installation Source         | /usr/local/lib/ruby/gems/3.0.0/bin/fastlane      |
2024-02-15T06:54:52.5117600Z | Host                        | macOS 12.7.3 (21H1015)                           |
2024-02-15T06:54:52.5218730Z | Ruby Lib Dir                | /usr/local/Cellar/ruby@3.0/3.0.6_1/lib           |
2024-02-15T06:54:52.5301360Z | OpenSSL Version             | OpenSSL 3.1.1 30 May 2023                        |
2024-02-15T06:54:52.5329800Z | Is contained                | false                                            |
2024-02-15T06:54:52.5402820Z | Is homebrew                 | false                                            |
2024-02-15T06:54:52.5438640Z | Is installed via Fabric.app | false                                            |
2024-02-15T06:54:52.5494480Z | Xcode Path                  | /Applications/Xcode_14.2.app/Contents/Developer/ |
2024-02-15T06:54:52.5537880Z | Xcode Version               | 14.2                                             |
2024-02-15T06:54:52.5569630Z | Swift Version               | 5.7.2                                            |
Gem	Version	Update-Status

fastlane 2.219.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

| ipaddr | 1.2.2 |

| io-wait | 0.2.0 |

| zlib | 2.0.0 |

| resolv | 0.2.1 |

| time | 0.1.1 |

| open-uri | 0.1.0 |

| mutex_m | 0.1.1 |

| net-protocol | 0.1.1 |

| ostruct | 0.3.1 |

| english | 0.7.1 |

| erb | 2.2.0 |

| strscan | 3.0.1 |

| abbrev | 0.1.0 |

| io-console | 0.5.7 |

| tempfile | 0.1.1 |

| delegate | 0.2.0 |

| fileutils | 1.5.0 |

| tmpdir | 0.1.2 |

| base64 | 0.1.0 |

| singleton | 0.1.1 |

| net-http | 0.1.1 |

| open3 | 0.1.1 |

| nkf | 0.1.0 |

| prettyprint | 0.1.1 |

| pp | 0.2.1 |

| find | 0.1.0 |

| yaml | 0.1.1 |

| psych | 3.3.2 |

] ]

@lucgrabowski
Copy link
Contributor

Deliver option ipa takes a path to a specific file instead of a glob (*), so please use a path to one file instead of ipa:/Users/runner/work/1/a/**/*.ipa.
Also, make sure that you that ipa file is in build.artifactstagingdirectory.

@arpitmishra-eaton
Copy link
Author

@lucgrabowski ipa file is in build.artifactstagingdirectory directory only. but when it execute in pipeline, it take the system path liek /users/runner/work/1/a/**/*.ipa

however, let me try with one specific path and revert back to you

@arpitmishra-eaton
Copy link
Author

arpitmishra-eaton commented Feb 21, 2024

Hi @lucgrabowski - I have copied the IPA file and pasted it in "$(build.artifactstagingdirectory)" directory.

  • task: CopyFiles@1
    inputs:
    SourceFolder: '$(build.artifactstagingdirectory)/output/$(Configuration)'
    TargetFolder: '$(build.artifactstagingdirectory)'
    Contents: 'xxx.ipa'

    image

and modify the path
ipa:'$(build.artifactstagingdirectory)/BrightlayerHome.ipa' but still same error

2024-02-21T13:55:19.7614270Z [13:55:19]: �[32m------------------------------�[0m
2024-02-21T13:55:19.7639450Z [13:55:19]: �[32m--- Step: default_platform ---�[0m
2024-02-21T13:55:19.7682580Z [13:55:19]: �[32m------------------------------�[0m
2024-02-21T13:55:19.7708360Z [13:55:19]: �[32mDriving the lane 'ios release' 🚀�[0m
2024-02-21T13:55:19.7736480Z [13:55:19]: �[32m---------------------------------------�[0m
2024-02-21T13:55:19.7772480Z [13:55:19]: �[32m--- Step: app_store_connect_api_key ---�[0m
2024-02-21T13:55:19.7814610Z [13:55:19]: �[32m---------------------------------------�[0m
2024-02-21T13:55:19.8086190Z [13:55:19]: �[32m-------------------�[0m
2024-02-21T13:55:19.8086990Z [13:55:19]: �[32m--- Step: pilot ---�[0m
2024-02-21T13:55:19.8087390Z [13:55:19]: �[32m-------------------�[0m
2024-02-21T13:55:19.8096370Z [13:55:19]: Creating authorization token for App Store Connect API
2024-02-21T13:55:19.8123130Z +--------------------------------+
2024-02-21T13:55:19.8124530Z | �[33mLane Context�[0m |
2024-02-21T13:55:19.8125100Z +------------------+-------------+
2024-02-21T13:55:19.8125350Z | DEFAULT_PLATFORM | ios |
2024-02-21T13:55:19.8125550Z | PLATFORM_NAME | ios |
2024-02-21T13:55:19.8125710Z | LANE_NAME | ios release |
2024-02-21T13:55:19.8126010Z +------------------+-------------+
2024-02-21T13:55:19.8126370Z [13:55:19]: �[31mNo ipa or pkg file given�[0m
2024-02-21T13:55:19.8846710Z
2024-02-21T13:55:19.8857050Z +------------------------------------------------+
2024-02-21T13:55:19.8864640Z | �[32mfastlane summary�[0m |
2024-02-21T13:55:19.8865940Z +------+---------------------------+-------------+
2024-02-21T13:55:19.8866640Z | Step | Action | Time (in s) |
2024-02-21T13:55:19.8867320Z +------+---------------------------+-------------+
2024-02-21T13:55:19.8867980Z | 1 | default_platform | 0 |
2024-02-21T13:55:19.8868620Z | 2 | app_store_connect_api_key | 0 |
2024-02-21T13:55:19.8869450Z | 💥 | �[31mpilot�[0m | 0 |
2024-02-21T13:55:19.8871570Z +------+---------------------------+-------------+
2024-02-21T13:55:19.8872760Z
2024-02-21T13:55:19.8874210Z [13:55:19]: �[31mfastlane finished with errors�[0m
2024-02-21T13:55:19.8874970Z �[31m

@lucgrabowski
Copy link
Contributor

I don't think that it's fastlane related issue. I think that you should debug your pipeline. Try publishing build artifacts with PublishBuildArtifacts and check if ipa files is published.

@arpitmishra-eaton
Copy link
Author

arpitmishra-eaton commented Feb 21, 2024

@lucgrabowski I'm able to download the same artifact published from the build pipeline. I tried to modify the Fastlane file as well but didn't work.

Can you kindly help with fixing this issue and validate whether we have correctly configured Fastlane and the path to upload IPA to App Store?

@lucgrabowski
Copy link
Contributor

lucgrabowski commented Feb 21, 2024

Have you tried putting your lane code to editor that is coloring syntax for ruby? There are 2 issues:

  1. Use either pilot or deliver as it's an alias to the same action. Take a look at examples at: http://docs.fastlane.tools/actions/pilot/.
  2. There is an issue with parenthesis, you should remove the second one from pilot(api_key: api_key), - leave pilot(api_key: api_key,
api_key = app_store_connect_api_key(
    key_id: options[:key_id],
    issuer_id: options[:issuer-id],
    key_filepath: options[:filepath],
    ),
pilot(
    api_key: api_key,
    ipa: options[:ipa],
    automatic_release: true,
    skip_binary_upload: false, 
    force: true,
    build_number: options[:build_number],
    submit_for_review: true,
    team_id: options[:team_id],
    app_version: options[:app_version],
    app_identifier: options[:app_identifier],
    metadata_path: options[:metadata_path],
    skip_screenshots: true,
    overwrite_screenshots: false,
    precheck_include_in_app_purchases: false,
    # https://github.com/artsy/eigen/blob/faa02e2746194d8d7c11899474de9c517435eca4/fastlane/Fastfile#L131-L149
    submission_information: {
        add_id_info_uses_idfa: false,
    }      
)

@lacostej
Copy link
Collaborator

@arpitmishra-eaton In the example above, it seems that you still have the syntax error in the :issuer-id symbol I pointed to in #21883. So I suspect your issue description is out of sync with the current state of your code.

I recommend that you try to run fastlane lanes or fastlane doc on your project. I believe it should fail if you have a syntax error. Start by making sure you have a properly written fastfile and helper code. To make sure your output isn't cluttered, do FASTLANE_SKIP_UPDATE_CHECK=y fastlane doc

Note: this is the 4th issue you have opened in a few days for errors that do not reside in fastlane. I prefer if we reserve the issue tracker for real issues in fastlane. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants