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

[Android, AndroidTV, AndroidWear, FireTV, Tizen] target launch doesn't fallback to ask for all targets if chosen target is invalid #1379

Closed
pauliusguzas opened this issue Feb 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pauliusguzas
Copy link
Collaborator

pauliusguzas commented Feb 6, 2024

Describe the bug
Target launch doesn't fallback to ask for all targets if chosen target is invalid

To Reproduce

  1. Have invalid target in global renative.json
  2. Go to template-starter package (or harness)
  3. Do npx rnv target launch -p android
  4. Choose global target -> error
  5. Do npx rnv target launch -p android -t non_existing_target -> same error
pauliusguzas@MBP-de-Flexn desimt % npx rnv target launch -p android

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│        ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗       │
│        ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝       │
│        ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗         │
│        ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝         │
│        ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗       │
│        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝       │
│                                                                              │
│        Version: 1.0.0-rc.10                                                  │
│        https://renative.org                                                  │
│        🚀 Firing up!...                                                      │
│        $ npx rnv target launch -p android                                    │
│        Start Time: 2/6/2024, 5:31:55 PM                                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

[ task ] registerEngine:engine-core[1]
[ task ] configureRuntimeDefaults[1] appId:undefined
[ task ] checkAndMigrateProject[1]
[ task ] loadPluginTemplates[1]
[ task ] parseRenativeConfigs[1]
[ task ] getWorkspaceDirPath[1]
[ task ] generatePlatformTemplatePaths[1]
[ task ] checkAndBootstrapIfRequired[1]
[ task ] loadIntegrations[1]
[ task ] loadEngines[1]
[ task ] loadEnginePluginDeps[1]
[ task ] loadEnginePackageDeps[1]
[ task ] registerEngine:engine-rn[1]
[ task ] findSuitableTask[1]
[ info ] Current Engine: engine-core path: ./node_modules/@rnv/engine-core/lib
[ task ] registerMissingPlatformEngines[1]
[ task ] initializeTask[1] target launch
[ task ] => [target launch]
[ task ] [target launch] taskRnvTargetLaunch[1]
[ task ] [target launch] isPlatformSupported[1]
[ task ] [target launch] checkAndConfigureSdks[1]
[ task ] [target launch] checkAndConfigureAndroidSdks[1] (/Users/pauliusguzas/Library/Android/sdk)
[ task ] => [target launch] => [workspace configure]
[ task ] [workspace configure] taskRnvWorkspaceConfigure[1]
[ task ] <= [target launch] <= workspace configure
? Which target to use? Pixel_4_API_29a (global default)
[ task ] [target launch] checkSdk[1]
[ task ] [target launch] checkAndroidSdk[1]
[ task ] [target launch] _isSdkInstalled[1]
[ task ] [target launch] checkAndConfigureAndroidSdks[2] (/Users/pauliusguzas/Library/Android/sdk)
[ task ] [target launch] launchAndroidSimulator[1] target:Pixel_4_API_29a independentThread:false
✖ FAILED: /Users/pauliusguzas/Library/Android/sdk/emulator/emulator -avd Pixel_4_API_29a
┌──────────────────────────────────────────────────────────────────────────────┐
│  🚀  SUMMARY | 2/6/2024, 5:31:57 PM                                          │
│  $ npx rnv target launch -p android                                          │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 1.0.0-rc.10                                               │
│  Project Name ($package.name): desimt                                        │
│  Project Version ($package.version): 0.1.0                                   │
│  Workspace ($.workspaceID): rnv                                              │
│  Platform (-p): android                                                      │
│  Engine ($.platforms.android.engine): engine-core                            │
│  App Config (-c): app                                                        │
│  Build Scheme (-s): debug                                                    │
│  Env Info: darwin | x64 | node v18.17.0                                      │
│  Executed Time: 0h:0m:2s:94ms                                                │
│                                                                              │
│ [ error ] [target launch] COMMAND:

/Users/pauliusguzas/Library/Android/sdk/emulator/emulator -avd Pixel_4_API_29a

FAILED with ERROR:

Error: Command failed with exit code 1: /Users/pauliusguzas/Library/Android/sdk/emulator/emulator -avd Pixel_4_API_29a
ERROR   | Unknown AVD name [Pixel_4_API_29a], use -list-avds to see valid list.
ERROR   | HOME is defined but there is no file Pixel_4_API_29a.ini in $HOME/.android/avd
ERROR   | (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)
INFO    | Android emulator version 32.1.14.0 (build_id 10330179) (CL:N/A)
    at makeError (/Users/pauliusguzas/Desktop/desimt/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/desimt/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn desimt %

Expected behavior
All targets are displayed in a list

Desktop (please complete the following information):

  • OS: macOS Ventura 13.5.2
  • Node Version 18.19.0
  • RNV Version 1.0.0-rc.10
  • @rnv/template-starter 1.0.0-rc.10
@pauliusguzas pauliusguzas added the bug Something isn't working label Feb 6, 2024
@pavjacko pavjacko self-assigned this Feb 6, 2024
@pavjacko pavjacko added this to the 1.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants