Appcenter: Running appcenter login in circleci in mac executor fails

Created on 16 Oct 2019  路  3Comments  路  Source: microsoft/appcenter

Description

When trying to use CircleCI to publish APK to app center, it fails to login due to needing access to keychain.

Error: Could not add password to keychain: security: SecKeychainItemCreateFromContent (<default>): User interaction is not allowed.

Repro Steps

Please list the steps used to reproduce your issue.

  1. run conainer in CircleCi with Mac executor
  2. run `appcenter login --token= --disable-telemetry
  3. the above error occurs

Details

  1. Which SDK version are you using?
    appcenter version 2.2.1
  2. Which OS version did you experience the issue on?
    Mac Executor on CircleCI
  3. Which Cocoapods version are you using (run pod --version)?

    • e.g. 1.4.0

  4. What device version did you see this error on? Were you using an emulator or a physical device?

    • e.g. iPhone X physical device, iPhone 8 emulator

  5. What language are you using?

    • [ ] Objective C

    • [ ] Swift

  6. What third party libraries are you using?
  7. Please enable verbose logging for your app using MSAppCenter.setLogLevel(.verbose) before your call to MSAppCenter.start(...) for Swift, or [MSAppCenter setLogLevel:MSLogLevelVerbose] before [MSAppCenter start: ...] for Objective C and include the logs here:
bug

Most helpful comment

had exactly the same error and following cmd helped me get through:

security unlock-keychain /Users/xxxx/Library/Keychains/login.keychain-db

maybe it can help you too.

All 3 comments

Hi, @muhammaddadu!
Could you please open your issue inside AppCenter-CLI repo because it is in the SDK repository at the moment?

Thanks for understanding.

I'm running appcenter 2.3.3, attempting to do this using TeamCity with the BuildAgent running on a MacBookPro, and I still encounter this error.

If I manually SSH in to the MacBookPro and attempt to login with the token, I still get the error. If I open a local terminal on the MacBookPro and do it, it works fine, but then when I try to use the remote terminal or TeamCity I get:

Error: Command '<APPCENTER COMMAND>' failed with exception "Command failed: /usr/bin/security find-generic-password -a <USERNAME> -s mobile-center-cli -g
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

had exactly the same error and following cmd helped me get through:

security unlock-keychain /Users/xxxx/Library/Keychains/login.keychain-db

maybe it can help you too.

Was this page helpful?
0 / 5 - 0 ratings