expo-cli
expo-cli copied to clipboard
expo client:install:android --non-interactive --latest fails with SDKv44 app
Summary
We have an expo app based on SDK v44 at the moment - SDK v45 has just been released.
We use expo client:install:android --non-interactive --latest
with our CI but this has been failing recently due to the client upgrade introduced by SDK v45. Previously this was working (it broke today).
When attempting to use expo client:install:android --non-interactive
(i.e. dropping --latest
) installation fails with:
[14:28:53] Input is required, but Expo CLI is in non-interactive mode.
Required input:
> You are currently using SDK 44.0.0. Would you like to install client 2.23.2 released for this SDK?
While this is probably expected behaviour however we can't seem to supply a yes
response to the prompt in interactive or non-interactive mode and I can see no configuration or other parameter that can be added to allow the installation to proceed.
Note - expo client:install:ios --non-interactive --latest
works with the same application so I actually think this is a bug in the client not our app (it was working).
Environment
expo-env-info 1.0.3 environment info:
System:
OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.15.0 - ~/.asdf/installs/nodejs/16.15.0/bin/node
Yarn: 1.22.18 - ~/.asdf/shims/yarn
npm: 8.5.5 - ~/.asdf/plugins/nodejs/shims/npm
SDKs:
Android SDK:
API Levels: 30, 32
Build Tools: 32.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64
npmPackages:
expo: ^44.0.6 => 44.0.6
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: ~0.17.7 => 0.17.7
Expo Workflow: managed
Please specify your device/emulator/simulator platform, model and version
Android Pixel 5 API v30
Error output
[14:28:53] Input is required, but Expo CLI is in non-interactive mode.
Required input:
> You are currently using SDK 44.0.0. Would you like to install client 2.23.2 released for this SDK?
Reproducible demo or steps to reproduce from a blank project
As noted, this is a problem with expo client:install:android --non-interactive
and the inability to accept a result in non-interactive mode. This is forced upon us by the app currently not working with Expo client latest on Android (but does on iOS).
Can you show the exact output when ran without the --non-interactive
flag? And can you share what terminal you are using?
@kbrandwijk :
Bash GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Each time I attempt any stdin redirection, the cli assumes non-interactive mode and won't accept the input.
Various attempts both with and without a newline:
echo 'y' | expo client:install:android
[14:28:03] Input is required, but Expo CLI is in non-interactive mode.
Required input:
> You are currently using SDK 44.0.0. Would you like to install client 2.23.2 released for this SDK?
yes | expo client:install:android
[15:09:04] Input is required, but Expo CLI is in non-interactive mode.
Required input:
> You are currently using SDK 44.0.0. Would you like to install client 2.23.2 released for this SDK?
printf 'y\n' | expo client:install:android
[15:09:32] Input is required, but Expo CLI is in non-interactive mode.
Required input:
> You are currently using SDK 44.0.0. Would you like to install client 2.23.2 released for this SDK?
expo client:install:android <<< "y"
[15:09:55] Input is required, but Expo CLI is in non-interactive mode.
Required input:
> You are currently using SDK 44.0.0. Would you like to install client 2.23.2 released for this SDK?
Hi guys, Any update on this issue?
Please note that this issue still exists on expo-cli
version 6.0.1
(current)
For anyone looking for a way to force expo-cli
install the Expo Go client linked to the current version of the installed SDK, here's a script that doesn't cause Expo's commander to think we're in the non-interactive mode and exit (e.g. in CI):
# install-script.sh
#!/usr/bin/env expect
spawn yarn expo client:install:ios
expect -re "Would you like to install client"
send "y"
expect eof
Then run ./install-script.sh
This needs the expect command to be installed (it's preinstalled on Mac).
The expo client:install:ios
command was never built to run in non-interactive mode. Instead, you can use it manually to install Expo Go on one of your devices.
That was before we added a check to npx expo start --android|ios
/npx expo run:android|ios
. When you run these commands, it will check for an installed Expo Go app, if there isn't one it will download and install automatically.
Closing because of the workaround provided by @tyom.