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

Local credentials cannot be used on only one of the platforms #2723

Open
tamasoszko opened this issue Nov 23, 2024 · 0 comments
Open

Local credentials cannot be used on only one of the platforms #2723

tamasoszko opened this issue Nov 23, 2024 · 0 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@tamasoszko
Copy link

Build/Submit details page URL

No response

Summary

I need to use local credential only on iOS (due to multi target app) and still want to use remote credentials for Android build.
iOS builds just fine with local credentials, however, Android fails.
In the Android build it seems to use the credentials properly:

✔ Using remote Android credentials (Expo server)
✔ Using Keystore from configuration: Default (default)

Yet it still seems to try to read android properties of the credentials.json even though it should use remote. In credentials.json I only define ios since Android should be remote.
Then in the build I got the error : Cannot read properties of undefined (reading 'keystore')
If I specify and empty Android props in the credentials.json like "android": {}, then it fails on the next embedded prop of it:
Cannot read properties of undefined (reading 'keystorePath').
It only builds if I delete the credentials.json file, but then iOS will fail.

Managed or bare?

bare

Environment

expo-env-info 1.2.1 environment info:
    System:
      OS: Linux 6.5 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
      Shell: 5.1.16 - /bin/bash
    Binaries:
      Node: 18.20.5 - /usr/local/bin/node
      Yarn: 1.22.22 - /usr/local/bin/yarn
      npm: 10.8.2 - /usr/local/bin/npm
    SDKs:
      Android SDK:
        API Levels: 31, 32, 33, 33, 33, 34, 34, 34, 34, 34, 35
        Build Tools: 31.0.0, 32.0.0, 33.0.0, 33.0.1, 33.0.2, 33.0.3, 34.0.0, 35.0.0
        Android NDK: 27.2.12479018
    npmPackages:
      expo: ^52.0.0 => 52.0.7 
      expo-router: ~4.0.7 => 4.0.7 
      react: 18.3.1 => 18.3.1 
      react-dom: 18.3.1 => 18.3.1 
      react-native: 0.76.2 => 0.76.2 
    Expo Workflow: bare

Error output

Cannot read properties of undefined (reading 'keystore')

Reproducible demo or steps to reproduce from a blank project

build command that fails:

eas build --local --non-interactive --platform=android --profile=stage --output=build/app-stage.apk

eas.json:

{
    "build":
    {
        "stage":
        {
            "android":
            {
                "credentialsSource": "remote"
            },
            "env":
            {
               ...
            },
            "ios":
            {
                "credentialsSource": "local"
            }
        },
        ...
    }
}

credentials.json:

{
  "ios": {
    "target-1": {
      "provisioningProfilePath": "...",
      "distributionCertificate": {
        "path": "...",
        "password": "..."
      }
    },
	"target-2": {
      "provisioningProfilePath": "...",
      "distributionCertificate": {
        "path": "...",
        "password": "..."
      }
    },
    "target-3": {
      "provisioningProfilePath": "...",
      "distributionCertificate": {
        "path": "...",
        "password": ".."
      }
    },
  }
}
@tamasoszko tamasoszko added the needs review Issue is ready to be reviewed by a maintainer label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant