microsoft / app-store-vsts-extension

Visual Studio Team Services (VSTS) extension for performing continuous delivery to the App Store store from your automated CI builds
Other
94 stars 53 forks source link

getting a errors when trying to upload ios artifact to test flight using App Store Release task #369

Open UvinduS opened 3 months ago

UvinduS commented 3 months ago

Screenshot 2024-06-28 145815

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/microsoft/app-store-vsts-extension/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Question

Enter Task Name: App Store Release

list here (V# not needed):
https://github.com/microsoft/app-store-vsts-extension/tree/master/Tasks

Environment

Issue Description

[Include task name(s), screenshots and any other relevant details]

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

##[debug]Exit code 1 received from tool '/usr/local/lib/ruby/gems/3.0.0/bin/fastlane'
##[debug]STDIO streams have closed for tool '/usr/local/lib/ruby/gems/3.0.0/bin/fastlane'
##[debug]task result: Failed
##[error]Error: The process '/usr/local/lib/ruby/gems/3.0.0/bin/fastlane' failed with exit code 1
##[debug]Processed: ##vso[task.issue type=error;]Error: The process '/usr/local/lib/ruby/gems/3.0.0/bin/fastlane' failed with exit code 1
##[debug]Processed: ##vso[task.complete result=Failed;]Error: The process '/usr/local/lib/ruby/gems/3.0.0/bin/fastlane' failed with exit code 1
##[debug]Clearing API Key file
Finishing: AppStoreRelease
UvinduS commented 3 months ago

here is my azure pipeline file

trigger:
  - test-nj

jobs:
  - job: ios
    pool:
      vmImage: 'macOS-latest'
    variables:
      - name: configuration
        value: "Release"
      - name: sdk
        value: "iphoneos"
      - name: scheme
        value: "Runner"
      - name: system.debug
        value: true

    steps:

      - task: FlutterInstall@0
        displayName: "Install Flutter SDK"
        inputs:
          mode: 'auto'
          channel: 'stable'
          version: 'latest'

      - task: FlutterBuild@0
        displayName: "Flutter Build Apps - iOS"
        inputs:
          target: "ios"
          buildName: "$(Build.BuildNumber)"
          entryPoint: "lib/main.dart"
          iosCodesign: false

      - task: InstallAppleCertificate@2
        inputs:
          certSecureFile: 'appCertificate.p12'
          certPwd: $(appCertificatePassword)
          keychain: 'temp'
          deleteCert: true

      - task: InstallAppleProvisioningProfile@1
        inputs:
          provProfileSecureFile: 'app.mobileprovision'
          removeProfile: true

      - task: Xcode@5
        inputs:
          actions: 'build'
          scheme: '$(scheme)'
          sdk: '$(sdk)'
          configuration: '$(configuration)'
          xcWorkspacePath: '**/ios/Runner.xcworkspace'
          xcodeVersion: 'default'
          signingOption: 'manual'
          signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
          provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
          packageApp: true

      - task: CopyFiles@2
        inputs:
          contents: '**/*.ipa'
          targetFolder: '$(build.artifactStagingDirectory)'
          overWrite: true
          flattenFolders: true

      - task: PublishBuildArtifacts@1
        inputs:
          pathtoPublish: '$(build.artifactStagingDirectory)'
          artifactName: 'drop'
          publishLocation: 'Container'

      - task: Bash@3
        displayName: "listing copied files"
        inputs:
          targetType: "inline"
          script: |
            ls  $(build.artifactstagingdirectory)/

      - task: AppStoreRelease@1
        inputs:
          serviceEndpoint: 'AppStoreRelase'
          releaseTrack: 'TestFlight'
          appIdentifier: 'com.cicd.smsforwarder'
          appType: 'iOS'
          ipaPath: '$(build.artifactstagingdirectory)/smsforwarder.ipa'
          shouldSkipWaitingForProcessing: true
          shouldSkipSubmission: true
          appSpecificId: '12345678'
          installFastlane: true
          additionalFastlaneArgs: '--verbose'
DenisRumyantsev commented 3 months ago

Hi @UvinduS can you please describe in more detail how to reproduce your error?

UvinduS commented 3 months ago

I have flutter app and trying to build ios app using above mentioned pipeline file and in the last step AppStoreRelease@1, I'm getting the error in above screen shot. I've created token based authentication for the task. I can't figure out the error, is there any specific way to configure this task.

Manraj45 commented 2 months ago

@UvinduS If you didn't already fix your issue, the following helped me: https://github.com/fastlane/fastlane/issues/21531#issuecomment-1873633417 You have to convert the private key into base 64 encoding and add it to your service connection.