credentialsSource local for iOS is getting ignored in eas.json - using remote iOS credentials

Hello. I’m trying to understand what changed in the past month and my scripts for building an (bare workflow) iOS does not work.

This is my credentials.json, that was working like a charm one month ago.

{
    "android": {...},
    "ios": {
      "XXX": {
        "credentialsSource": "local",
        "provisioningProfilePath": "ios/certs/distribution/XXX.mobileprovision",
        "distributionCertificate": {
          "path": "ios/certs/distribution/distribution.p12",
          "password": "*******"
        }
      },
      "OneSignalNotificationServiceExtension": {
        "credentialsSource": "local",
        "provisioningProfilePath": "ios/certs/distribution/one_signal.mobileprovision",
        "distributionCertificate": {
          "path": "ios/certs/distribution/distribution.p12",
          "password": "*******"
        }
      }
    }
  }

note: it had not the credentialsSrouce: local but it was working. I just added this now line trying to make it work.

My CI script will launch:

npx eas-cli build --platform ios --non-interactive --profile ZZZ --no-wait

And I will get the following error:

✔ Linked to project @XXXX/XXXX
✔ Using remote iOS credentials (Expo server)
Failed to setup credentials.
    Error: You're in non-interactive mode. EAS CLI couldn't find 
    any credentials suitable for internal distribution. Please run 
    again in interactive mode.

It clearly seems to ignore my credentialsSrouce: local directive in the JSON. I have not setup credentials on Expo server.

Or am I doing something wrong?
Any who can, please help.

Thanks in advance

yes, there was breaking change there (for genric projects)
behavior before was to

  • if only local credentials exist use them
  • if only remote credentials exist use them
  • if both exist ask which to use

we changed it now to default to remote credentials and if you want to use local ones you need to set credentialsSrouce: local. Now behaviour is the same for both managed and generic projects.

It does not work for you because credentialsSrouce: local needs to be set in eas.json not in credenitals.json

1 Like

Thanks @wkozyra .

:man_facepalming: I suspected it would be something simple !

But I would suggest that update documentation there, to be more clear that you need to set this in eas.json. so

...specifying“credentialsSource”: “local”or“credentialsSource:” “remote” on a build profile.

can become
...specifying“credentialsSource”: “local”or“credentialsSource:” “remote” on a build profile (eas.json).

Thanks again for your immediate response :slight_smile:

:man_facepalming: It was even simpler than that.
I had a typo: I used credentialSource key (missing an s). But it was working due to default policy being local. Now that the default changed to remote the bug kicked-in.

Thanks for your help!