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] when user has only 1 sim, rnv forgets to ask for sim when it should and just launches that one sim #1372

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

Comments

@pauliusguzas
Copy link
Collaborator

pauliusguzas commented Feb 1, 2024

Describe the bug
When user has only 1 sim, rnv forgets to ask for sim when it should and just launches that one sim

To Reproduce

  1. have 1 simulator installed in android studio
  2. Go to template-starter package (or harness)
  3. Do npx rnv run -p android -t -> sim is opened and app is installed and launched (should ask to choose)
  4. delete default target from global renative.json
  5. Do npx rnv run -p android -> sim is opened and app is installed and launched (should ask to choose)
  6. Do npx rnv run -p android -t random_non_existing_name -> sim is opened and app is installed and launched (should ask to choose)

Expected behavior
rnv asks to choose from all targets

Desktop (please complete the following information):

  • OS: macOS Ventura 13.5.2
  • Node Version 18.19.0
  • RNV Version 1.0.0-rc.10
@pauliusguzas pauliusguzas added the bug Something isn't working label Feb 1, 2024
@pauliusguzas pauliusguzas changed the title [Android, AndroidTV, Androidwear] when user has only 1 sim, it is launched even though user specifies -t [Android, AndroidTV, Androidwear] when user has only 1 sim, it is launched even though user specifies -t or has no default sim defined Feb 1, 2024
@pauliusguzas pauliusguzas changed the title [Android, AndroidTV, Androidwear] when user has only 1 sim, it is launched even though user specifies -t or has no default sim defined [Android, AndroidTV, Androidwear] when user has only 1 sim, rnv forgets to ask for sim when it should and just launches that one sim Feb 5, 2024
@mihaiblaga89 mihaiblaga89 added this to the 1.0 milestone Feb 6, 2024
@ElenaDiachenko ElenaDiachenko self-assigned this Feb 11, 2024
@mihaiblaga89 mihaiblaga89 modified the milestones: 1.0, 1.1 Feb 12, 2024
@ElenaDiachenko ElenaDiachenko modified the milestones: 1.1, 1.0 Apr 10, 2024
@pavjacko pavjacko removed this from the 1.0 milestone Apr 15, 2024
@pauliusguzas
Copy link
Collaborator Author

Only 5th point at the moment is valid

@GabrieleKaceviciute
Copy link
Collaborator

1.1.0-rc.0
If there is no default targets and at least one simulator is active -> app is installed and launched on active simulator (should ask to choose)

➜  template-starter git:(1.1.0-rc.0) ✗ npx rnv run -p android

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ 🚀 v:1.0.0 | renative.org | 9/3/2024, 4:55:42 PM                │
│ $ rnv run -p android                                            │
└─────────────────────────────────────────────────────────────────┘
info: Current platform: android
info: Current engine: @rnv/engine-rn (../engine-rn)
task: ○ run ↺1
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
task: ○ workspace configure ↺1
warn: ○ project configure: You're missing defaultTargets in your config ../../../../../.rnv/renative.json. Let's add them!
task: ✔ workspace configure
task: ○ app configure ↺1
info: Current app config: template
task: ✔ app configure
info: ../../node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/[email protected]
info: ../../node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
info: ../../node_modules/react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js overriden by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json
task: ✔ project configure
info: Current Build Scheme: debug
task: ○ sdk configure ↺1
task: ✔ sdk configure
task: ✔ platform configure
info: Found custom assetSources at ../../node_modules/@flexn/assets-renative-outline/assets/android. Will be used to generate assets.
task: ✔ configure
✔ Executing: "/Users/gabriele/Library/Android/sdk/platform-tools/adb" devices -l
✔ Executing: "/Users/gabriele/Library/Android/sdk/emulator/emulator" -list-avds
✔ Waiting for emulator to boot...
✔ Executing: "/Users/gabriele/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell wm size
✔ Executing: "/Users/gabriele/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell wm density
✔ Executing: "/Users/gabriele/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell getprop
info: Found only one active target: Pixel_7_API_30. Will use it.
task: ○ start ↺1
task: ○ configureSoft ↺1
task: ○ app configure ↺2
task: ✔ app configure
info: Current Build Scheme: debug
task: ○ sdk configure ↺2
task: ✔ sdk configure
task: ✔ configureSoft

Dev server running at: http://0.0.0.0:8083/index.bundle?platform=android

task: ✔ start
⠇ Waiting for bundler to finish...warn =================================================================================================
warn From React Native 0.73, your project's Metro config should extend '@react-native/metro-config'
warn or it will fail to build. Please copy the template at:
warn https://github.com/facebook/react-native/blob/main/packages/react-native/template/metro.config.js
warn This warning will be removed in future (https://github.com/facebook/metro/issues/1018).
warn =================================================================================================
info Welcome to React Native v0.73
info Starting dev server on port 8083...

                        ▒▒▓▓▓▓▒▒
                     ▒▓▓▓▒▒░░▒▒▓▓▓▒
                  ▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
                 ▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
                 ▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
                 ▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓
                 ▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓
                  ▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒
                     ▒▓▓▓▒░░░░▒▓▓▓▒
                        ▒▒▓▓▓▓▒▒


                Welcome to Metro v0.80.9
              Fast - Scalable - Integrated


⠹ Waiting for bundler to finish...info React Native v0.75.2 is now available (your project is running on v0.73.4).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.75.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.75.2
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
warning: Watchman `watch-project` returned a warning: Recrawled this watch 5 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative/packages/template-starter' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative/packages/template-starter'`

✔ Waiting for bundler to finish...
warning: Watchman `watch-project` returned a warning: Recrawled this watch 5 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative/packages/template-starter' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative/packages/template-starter'`

warning: Watchman `watch-project` returned a warning: Recrawled this watch 3 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative'`

warning: Watchman `watch-project` returned a warning: Recrawled this watch 3 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative'`

warning: Watchman `query` returned a warning: Recrawled this watch 5 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative/packages/template-starter' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative/packages/template-starter'`

warning: Watchman `query` returned a warning: Recrawled this watch 3 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative'`

Recrawled this watch 5 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/gabriele/Desktop/tests/renative/packages/template-starter' ; watchman watch-project '/Users/gabriele/Desktop/tests/renative/packages/template-starter'`


  WARNING: You should run npx react-native@latest to ensure you're always using the most current version of the CLI. NPX has cached version (0.73.4) != current release (0.75.2)

info Building the app...

> Task :app:installDebug
Installing APK 'app-debug.apk' on 'Pixel_7_API_30(AVD) - 11' for :app:debug
Installed on 1 device.

BUILD SUCCESSFUL in 5s
63 actionable tasks: 2 executed, 61 up-to-date
info Connecting to the development server...
8083
info Installing the app on the device "emulator-5554"...
Performing Streamed Install
Success
info Starting the app on "emulator-5554"...
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=renative.helloworld.debug/.SplashActivity }
┌─────────────────────────────────────────────────────────────────┐
│ ⚠ BUNDLER STARTED | 9/3/2024, 4:55:55 PM | [email protected]            │
│ $ rnv run -p android                                            │
├─────────────────────────────────────────────────────────────────┤
│ Project: @rnv/[email protected]                            │
│ Workspace: rnv                                                  │
│ Platform (-p): android                                          │
│ Engine: @rnv/engine-rn                                          │
│ App Config (-c): template                                       │
│ Build Scheme (-s): debug                                        │
│ Supported Platforms: ios, android, androidtv, firetv, androidwear, web, tizen, tvos, webos, macos, tizenwatch, kaios, chromecast, linux, windows
│ Env Info: darwin | arm64 | node v18.19.0                        │
│ Executed Time: 0h:0m:12s:935ms                                  │
│ warn: ○ project configure: You're missing defaultTargets in your config ../../../../../.rnv/renative.json. Let's add them!
│ Project location: ./platformBuilds/template_android             │
└─────────────────────────────────────────────────────────────────┘
 BUNDLE  ./index.js

 LOG  Running "RNVApp" with {"rootTag":11}

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

5 participants