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

react-native run-android command not working for specific user profile #48277

Open
sawasthij12 opened this issue Dec 16, 2024 · 3 comments
Open
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Platform: Android Android applications.

Comments

@sawasthij12
Copy link

Description

I tried to run the react-native run-android --user <userId> --device --verbose command locally and it did not pick up mentioned userID. Infact it is trying to install the app for the profiles present on the device.
I tried to debug the issue by running the above mentioned command and then running the adb command it gets translated into. I believe there is some issue in the way the command gets translated into adb command as the adb runs properly installing the app on the correct profile while the former command does not.

Steps to reproduce

  1. Create a simple android App locally.
  2. Try to run yarn react-native run-android --user <userID> --device --verbose for a physical test device with multiple profiles
  3. You will see that the app installs for all the profiles irrespective of the ID provided.
  4. Verify this again by running the adb command which is available in logs of the previous command.
  5. You will see the app getting installed for specific profile now.
    This shows that run-android command is not properly configured to install the app

React Native Version

~0.74.0

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.7
  CPU: (10) arm64 Apple M1 Pro
  Memory: 560.67 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.15.1
    path: ~/.nvm/versions/node/v20.15.1/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.15.1/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/sawasthi/.rvm/gems/ruby-3.1.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.19072.14.2412.12360217
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 3.1.4
    path: /Users/sawasthi/.rvm/rubies/ruby-3.1.4/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

info Connecting to the development server...
debug Running command "<path to adb> -s <DeviceID> reverse tcp:8081 tcp:8081"
info Installing the app on the device "<DeviceID>"...
debug Running command "cd android && adb -s <DeviceID> install -r -d --user 0 <App-Debug.apk>"
Performing Streamed Install
Success

Reproducer

https://github.com/JackZhen1324/TuneSync

Screenshots and Videos

No response

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.74.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Newer Patch Available Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. labels Dec 16, 2024
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests

2 participants