Coder Social home page Coder Social logo

Comments (5)

szdziedzic avatar szdziedzic commented on June 27, 2024

Hey,

I suspect that you get this error because when resolving credentials for your project you don't have APP_NAME env var set locally when running eas build and we use the fallback value from package.json. Secrets are only available during cloud builds and are not accessible in EAS CLI when resolving stuff.

What I think you can do is add APP_NAME to the env section of your eas.json. I don't think that app name is a secret, is it? I would also remove it from secrets.

{
  "build": {
    "production": {
      "env": {
        "APP_NAME": "myappname"
      }
    }
  }
}

from eas-cli.

serhii-lyshchenko avatar serhii-lyshchenko commented on June 27, 2024

@szdziedzic Thanks for the response. I'm on the same page with you.
But there are two questions then:

  1. If I'm developing a multi-tenat app (same codebase, multiple Expo projects and apps in AppStore/PlayStore) - I have to store two unique identifiers (project id and project slug) for each project outside of Expo. And now it turned out that I also need to store app name for each project. I'm curious why having just project id isn't enough (for submitting a build).
  2. I'm also curious why it doesn't work the same way for app identifiers then? Even if I don't have ios.bundleIdentifier and android.package and provide fallback (see the screenshot) - I'm able to submit a build and an identifier will be taken from the EAS Secrets and used for my build.
image

from eas-cli.

szdziedzic avatar szdziedzic commented on June 27, 2024

I'm curious why having just a project ID isn't enough (for submitting a build)

The reason is that the EAS CLI is the place where the resolution of all credentials and other settings for a build. It happens based on the app.json contents and other project configurations (like whether you have ios and android directories in your project, what are the tooling versions installed, and so on). The Xcode build scheme used by the build is resolved based on the name from app.json in CLI and is used during the build process. The name + other stuff need to be correctly defined (if it doesn't match the credentials may not match during the build process, and so on) when running the eas build command, so the CLI can resolve the best build configuration for you.

Additionally, it is allowed to have multiple different sets of credentials per one project, so credentials to the project aren't 1:1 mapping.

I'm also curious why it doesn't work the same way for app identifiers then? Even if I don't have ios.bundleIdentifier and android.package and provide fallback (see the screenshot) - I'm able to submit a build and an identifier will be taken from the EAS Secrets and used for my build.

It's interesting that it even works for you because provisioning profiles are per (Apple) project 🤔 https://docs.expo.dev/app-signing/app-credentials/#provisioning-profiles

However, what I can recommend to you is using the GitHub build trigger for EAS builds. During GH-triggered builds the credentials are resolved on the server side, so you should get correct results using your current setup and it doesn't matter what you have specified for EAS CLI (because it is not used to trigger the build)
https://docs.expo.dev/build/building-from-github/

from eas-cli.

szdziedzic avatar szdziedzic commented on June 27, 2024

Does it make sense to you?

from eas-cli.

chimdie avatar chimdie commented on June 27, 2024

@szdziedzic Probably unrelated, but how can I manage secrets/environment variables for different profiles(dev, staging and production) remotely? I have configured app.config.ts and eas.json to an extent at least but figured I don't know to deal with this.

from eas-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.