expo / eas-cli Goto Github PK
View Code? Open in Web Editor NEWFastest way to build, submit, and update iOS and Android apps
Home Page: https://docs.expo.dev/eas/
License: MIT License
Fastest way to build, submit, and update iOS and Android apps
Home Page: https://docs.expo.dev/eas/
License: MIT License
This is a follow-up to expo/expo-cli#2069.
A comment from @brentvatne:
just an idea - an alternative might be to look in cwd for something that matches this format, or is a json file and contains "type": "service_account", and suggest that one, then only use this value as a fallback if we can't find anything.
another option (and could be done in addition to the above) would be that after the first submission of the app we save away the most recently used service account location to .expo and populate the default with that. but this may be overkill for a small thing like this, and it doesn't really help as much with the first submission
I think that I prefer the first option - we should try to find the service account file and suggest the path in the prompt.
speedway π eas build -p ios
β Ensuring @expo-turtle/ejbtest10 is created on Expo
Warning! Your git working tree is dirty.
This operation needs to be run on a clean working tree, please commit all your changes before proceeding.
β Commit changes to git? β¦ yes
? Commit message: βΊ
This should suggest something. IMO it would be nice for this to be formatted like a publish commit, so maybe Publish iOS <build number>
or something like that. Mostly I don't care and I end up just doing wip
At the moment this part synchronously reads every asset file from disk to memory, potentially blocking the process for a long time. I think we should consider preparing for a few optimizations (some of these we've already been doing in expo publish
):
uploadWithPresignedPostAsync(fs.createReadStream(filename))
, ...)Perhaps we should already make RawAsset
have a filename
field instead of buffer
. This way we don't keep every asset of the app (which could easily be hundreds of megabytes) in memory for the duration of the command, but instead they're only read as needed and can be garbage collected as soon as that particular asset is done.
Originally posted by @fson in #147 (comment)
Can be done in a separate PR, but let's move this to project/projectUtils
because it's not only for submissions and rename it to getAppIdAsync
?
Originally posted by @fson in #71 (comment)
should settle on one for networking. iirc we've tried to stick to axios or got in expo-cli.
ensureProjectExists
crashes with cryptic HTTP 500 in the following situation:
userABC
- this name is registered in user databaseapp.json
i have different username:{
"owner": "userXYZ""
}
userXYZ
doesn't exists on wwwensureProjectExists
is called, it tries to create non existing project @userXYZ/my-app
and fails with HTTP 500 with no messageWe should handle these cases in some way and at least show a proper error message.
You should be able to run a command like curl https://expo.io/install.sh | sh
to get EAS CLI, without having to install any dependencies first.
This script would download a tarball that includes the Node.js binary (https://oclif.io/docs/releasing#standalone-tarballs) and install it on your computer.
After letting Expo set up credentials, and verifying that those credentials are correct according to expo credentials:manager -p ios
, the eas build
command will fail on the "fetching provisioning profile" step:
If you sync your credentials with eas credentials
and run another build, this time relying on your local credentials.json file, the build succeeds
Every "see code" link under each command redirects to 404 not found.
For example:
See code: build/commands/account/login.ts
If required I can help you with this.
Feel free to edit/update this issue.
There are cryptic error messages when API requests fail, for example:
β Creating @barthap10/barthap-dogfood on Expo
HTTPError: Response code 500 (Internal Server Error)
Since we reach API in two ways, we should handle both:
got
APIWe should at least display error message from www by default. Also, maybe full stacktrace should be printed when given e.g. EXPO_DEBUG
env variable.
List of other related issues
Should include these flags:
--platforms
: Can take ios
, android
and web
, likely comma separated. Then the CLI will only upload updates for these platforms.
--message
or -m
: Sets the message on the update group.
β°β$ easd build -p ios --non-interactive --skip-credentials-check 130 β΅
β Ensuring @notbrent/barew is created on Expo
Using credentials stored on the Expo servers
If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them.
This is optional, but without Apple account access you will need to provide all the values manually and we can only run minimal validation on them.
β Do you want to log in to your Apple account? β¦ yes
This appears to be related to just passing in an empty object as options here: https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/build/ios/credentials.ts#L47
If I thread through nonInteractive
then it will work as expected for that case, however we need to also be sure to thread through skipCredentialsCheck
, and I decided I'd leave this to someone more familiar with the code.
We should implement some mechanisms to try and prevent redundant binary uploads:
#115 (comment)
I see that the eas whoami
command uses this logger. But I also see that the eas login
and eas logout
both use this.log
. Which one is preferred?
unify the packages π€
Wouldn't it be possible to get credentials from fastlane match to generate ios build, so that we don't have to do it manually.
eas-cli uses fastlane gem to build the ipa file, it should be possible to use match credentials in there somewhere, right?
There's an issue with regenerating the provisioning profile when building an app for internal distribution (I haven't verified it's broken for app store builds too). The provisioning profile is generated for a different distribution certificate than the chosen one.
Repo steps:
turtle-dev
apple id and the Alicja WarchaΕ
teamexpo-turtle
(ask me for the password) "android": {
"package": "com.expo.turtle.tutorial.internal.abc"
},
"ios": {
"bundleIdentifier": "com.expo.turtle.tutorial.internal.abc"
}
eas build:configure
and complete all stepseas-cli/packages/eas-cli/src/build/create.ts
to add process.exit(1);
on line 20 to not spam turtle with test builds{
"builds": {
"android": {
"release": {
"workflow": "generic"
}
},
"ios": {
"release": {
"workflow": "generic",
"distribution": "internal"
}
}
}
}
eas build -p ios
and follow all the steps, EAS CLI will regenerate the profileMostly copied from slack and grouped together
Steps I took to verify that issue is contained to appstore api implementation
listProvisioningProfilesAsync
was called with org.reactjs.native.example.testapp.turt
createProvisioningProfilesAsync
was called with org.reactjs.native.example.testapp.turt
, it's called only when you select explicitly to create new profile and after doing that next call to listProvisioningProfilesAsync
returns one more profile, if I'm only reusing profile new profile is not added to the listChanges after fix #127
@EvanBacon I saw failed build on your account, it was for adhoc builds, but error was the same as I'm getting, so you are probably hitting the same problem.
If it's the same issue you can verify that by running Ensure all credentials for project are valid
twice, if during second run it will warn you about invalid profile that means you are hitting that case.
We should save the hassle of extracting the tar.gz and installing it in the simulator then running it by just doing this automatically. The code for this should be basically the same as installing the Expo client app in the simulator.
Adding coverage reports is easy while a codebase is new and there isn't a lot of code to cover. It will also make it easier for code reviewers to ask authors to include tests if they haven't.
Low priority. Sometimes developers have connectivity issues that prevent them from sending requests to GCP or AWS. Some kind of diagnostics is often useful for them to determine whether there's a bug with the CLI or if their network is having issues.
See related issue: expo/expo-cli#806
When you finish publishing an app you may want to open it in the client. Usually I open up Expo client and go to Profile tab for this. But it may be easier to just prompt the user if they want to open it in simulator/emulator directly. Or some other solution like this? Or use terminal-link
and have an 'Open on iOS' and 'Open on Android' button that you can cmd+clink to open? We would need to register URI schemes with the OS to do this but we should do that anyways.
The output when an icon is missing is messy and could be improved.
tape-warm π easd submit
β Choose a platform to submit to βΊ iOS
β Ensuring @bacon/tape-warm is created on Expo
Ensuring your app exists on App Store Connect. This step can be skipped by providing the --asc-app-id
param. Learn more: https://expo.fyi/asc-app-id
Please enter your Apple Developer Program account credentials. These credentials are needed to manage
certificates, keys and provisioning profiles in your Apple Developer account.
The password is only used to authenticate with Apple and never stored on Expo servers
Learn more here https://docs.expo.io/distribution/security/#apple-developer-account-credentials
β Apple ID: β¦ [email protected]
Using password from your local Keychain. Learn more https://docs.expo.io/distribution/security#keychain
Restoring session /Users/evanbacon/.app-store/auth/[email protected]/cookie
Logged in Local session restored
Ensuring that bundle ID "org.name.tapewarm" is registered on Apple Dev Center...
Checking App Store Connect for "tape-warm" (org.name.tapewarm)...
Creating app "tape-warm" (org.name.tapewarm) on App Store Connect...
App "tape-warm" (org.name.tapewarm) on App Store Connect is ready for your binary.
β What would you like to submit? βΊ The latest build from Expo servers
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β iOS Submission Summary β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Archive URL β https://turtle-v2-artifacts.s3.amazonaws.com/ios/7 β
β β 9a38488-7eb9-4ebc-9728-f02a842cc887-6eee499fda774f β
β β 98847316edbfcc541b.ipa β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Apple ID β [email protected] β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Apple app-specific β [hidden] β
β password β β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β App Store Connect App β 1543439387 β
β ID β β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Project ID β cab65372-b7f1-4448-96af-00061fa92cae β
βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Scheduling submission
β Something went wrong when submitting your app to Apple App Store.
Please see logs
[logs] Starting iOS app upload
[logs] Downloading archive
[logs] Uploading iOS app to TestFlight...
[logs] [09:35:48]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[logs] [09:35:50]: -------------------
[logs] [09:35:50]: --- Step: pilot ---
[logs] [09:35:50]: -------------------
[logs] [09:35:50]: Ready to upload new build to TestFlight (App: 1543439387)...
[logs] [09:35:53]: Fetching password for transporter from environment variable named `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`
[logs] [09:35:53]: Going to upload updated app to App Store Connect
[logs] [09:35:53]: This might take a few minutes. Please don't interrupt the script.
[logs] [09:37:12]: [Transporter Error Output]: ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"
[logs] [09:37:12]: [Transporter Error Output]: ERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'org.name.tapewarm'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."
[logs] [09:37:12]: [Transporter Error Output]: ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
[logs] [09:37:12]: Transporter transfer failed.
[logs] [09:37:12]: ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"
[logs] ERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'org.name.tapewarm'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."
[logs] [09:37:12]:
[logs] ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
[logs] [09:37:12]: [iTMSTransporter] [2020-12-04 09:37:12 PST] <main> ERROR: ERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'org.name.tapewarm'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."
[logs] [09:37:12]: [iTMSTransporter] [2020-12-04 09:37:12 PST] <main> ERROR: ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
[logs]
[logs] [09:37:12]: [iTMSTransporter] [2020-12-04 09:37:12 PST] <main> DBG-X: The error code is: 1102
[logs]
[logs] [09:37:12]: [iTMSTransporter] [2020-12-04 09:37:12 PST] <main> INFO: Done performing authentication.
[logs]
[logs] [09:37:12]: [iTMSTransporter]
[logs] [09:37:12]: [iTMSTransporter]
[logs]
[logs] [09:37:12]: [iTMSTransporter]
[logs]
[logs] [09:37:12]: [iTMSTransporter] Package Summary:
[logs]
[logs] [09:37:12]: [iTMSTransporter]
[logs]
[logs] [09:37:12]: [iTMSTransporter] 1 package(s) were not uploaded because they had problems:
[logs]
[logs] [09:37:12]: [iTMSTransporter] /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/d20201204-82539-1mwei59/1543439387.itmsp - Error Messages:
[logs]
[logs] [09:37:12]: [iTMSTransporter] ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"
[logs]
[logs] [09:37:12]: [iTMSTransporter] ERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'org.name.tapewarm'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."
[logs]
[logs] [09:37:12]: [iTMSTransporter] ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
[logs]
[logs] [09:37:12]: [iTMSTransporter] [2020-12-04 09:37:12 PST] <main> DBG-X: Returning 1
[logs]
[logs] [09:37:12]: iTunes Transporter output above ^
[logs] [09:37:12]: ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"
[logs] ERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'org.name.tapewarm'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."
[logs] ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
[logs] Return status of iTunes Transporter was 1: ERROR ITMS-90022: "Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_inter\nERROR ITMS-90713: "Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'org.name.tapewarm'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for t\nERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
[logs] The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
[logs] [!] Error uploading ipa file, for more information see above
[logs] fastlane pilot failed
In a managed project (no ios or android folder), running the following produces an error message that doesn't seem right.
client π easd build:create -p ios
β Ensuring @bacon/pillar-valley is created on Expo
We've found multiple schemes in your Xcode project:
You can specify the scheme you want to build at builds.ios.PROFILE_NAME.scheme in eas.json.
I'd expect the project to not have any schemes, but here it says it found multiple.
eas.json
{
"builds": {
"android": {
"release": {
"workflow": "generic"
}
},
"ios": {
"release": {
"distribution": "internal",
"workflow": "generic"
}
}
}
}
Fails after running eas build -p ios
Failed to setup credentials.
CombinedError: [GraphQL] Unexpected server error.
Re running throw a different error message in the same place
β Synced capabilities
Failed to setup credentials.
Error: Run 'eas device:create' to register your devices first
this is something I've implemented on CRNA and it works nicely for detecting when updating packages causes the bundle size to increase in an unexpected way https://github.com/expo/create-react-native-app
We need to warn the developer that this is likely not the command they want. They likely want release:republish
.
Deleting an update group will indeed remove the update group. Any end-users with the update already will continue to see the deleted update since, after the update group is deleted, the newest one on the release is older than the end-user's update, so they will not get a new update.
After deleting an update group, the developer needs to run release:republish
or release:publish
to force all their end-users to download a new update.
E.g. eslint-plugin-import
I think we can in many cases have them just default to returning whatever the default selection is.
eg:
eas build --non-interactive
-> no platform provided, default to "All" which is the default selection in the prompt
Move the commands from expo-cli to eas-cli.
eas:build:init
eas:build
eas:build:status
I realised that we use @expo/config
extensively, almost always this way:
const { exp } = getConfig(ctx.projectDir, { skipSDKVersionRequirement: true });
In some commands (e.g. eas submit
) this is called multiple times during one command execution, meaning the same app.json
is unnecessarily read twice, see here:
https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/project/projectUtils.ts#L7-L24
The getProjectIdAsync()
gets config, then calls getAccountNameAsync()
which does the same again.
I don't think it would have a huge performance impact, but maybe we can cache it globally the way it's done in expo-cli
upload command:
https://github.com/expo/expo-cli/blob/8dac437905be780f2f4d7fd48f77680351fecb78/packages/expo-cli/src/commands/upload/submission-service/utils/config.ts#L19-L26
Or just use lodash/once
Of course it cannot be done everywhere:
https://github.com/expo/eas-cli/blob/8dac437905be780f2f4d7fd48f77680351fecb78/packages/eas-cli/src/credentials/context.ts#L87-L88
It would also need to rework this test case:
https://github.com/expo/eas-cli/blob/8dac437905be780f2f4d7fd48f77680351fecb78/packages/eas-cli/src/project/__tests__/projectUtils-test.ts#L43-L95
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.