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

Metro gets incorrect mode #48128

Closed
longvt96 opened this issue Dec 5, 2024 · 2 comments
Closed

Metro gets incorrect mode #48128

longvt96 opened this issue Dec 5, 2024 · 2 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed.

Comments

@longvt96
Copy link

longvt96 commented Dec 5, 2024

Description

info React Native v0.76.3 is now available (your project is running on v0.74.3).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.3
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.3
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
info Dev server ready

i - run on iOS
a - run on Android
d - open Dev Menu
r - reload app

info Opening app on Android...
info A dev server is already running for this project on port 8081.
info Installing the app...

Task :gradle-plugin:checkKotlinGradlePluginConfigurationErrors
Task :gradle-plugin:compileKotlin UP-TO-DATE
Task :gradle-plugin:compileJava NO-SOURCE
Task :gradle-plugin:pluginDescriptors UP-TO-DATE
Task :gradle-plugin:processResources UP-TO-DATE
Task :gradle-plugin:classes UP-TO-DATE
Task :gradle-plugin:jar UP-TO-DATE

Configure project :app
Reading env from: .env

Configure project :react-native-reanimated
Android gradle plugin: 8.2.1
Gradle: 8.6

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
5 actionable tasks: 1 executed, 4 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

What went wrong:
Cannot locate tasks that match 'app:installDebug' as task 'installDebug' is ambiguous in project ':app'. Candidates are: 'installInhouseDebug', 'installInhouseDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest', 'installStagingDebug', 'installStagingDebugAndroidTest'.

Try:

Run gradlew tasks to get a list of available tasks.
For more on name expansion, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org/.

BUILD FAILED in 3s
info Run CLI with --verbose flag for more details.
info Stopping server
not able to run an app after adding build flavours

Steps to reproduce

Run the command line: ENVFILE=.env.inhouse react-native run-android --mode=inhouseDebug --appIdSuffix 'dev'
On the Metro server, start the Android app.

React Native Version

0.75.4

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
OS: macOS 14.0
CPU: (8) x64 Apple M1 Pro
Memory: 29.41 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.0.0
path: ~/.nvm/versions/node/v20.0.0/bin/node
Yarn:
version: 3.6.4
path: /opt/homebrew/bin/yarn
npm:
version: 9.6.4
path: ~/.nvm/versions/node/v20.0.0/bin/npm
Watchman:
version: 2024.12.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK:
API Levels:
- "34"
- "35"
Build Tools:
- 34.0.0
- 35.0.0
System Images:
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.21829.142.2421.12409432
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 23.0.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.4
wanted: 0.75.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Stacktrace or Logs

info React Native v0.76.3 is now available (your project is running on v0.74.3).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.3
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.3
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
info Dev server ready

i - run on iOS
a - run on Android
d - open Dev Menu
r - reload app

info Opening app on Android...
info A dev server is already running for this project on port 8081.
info Installing the app...

Task :gradle-plugin:checkKotlinGradlePluginConfigurationErrors
Task :gradle-plugin:compileKotlin UP-TO-DATE
Task :gradle-plugin:compileJava NO-SOURCE
Task :gradle-plugin:pluginDescriptors UP-TO-DATE
Task :gradle-plugin:processResources UP-TO-DATE
Task :gradle-plugin:classes UP-TO-DATE
Task :gradle-plugin:jar UP-TO-DATE

Configure project :app
Reading env from: .env

Configure project :react-native-reanimated
Android gradle plugin: 8.2.1
Gradle: 8.6

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
5 actionable tasks: 1 executed, 4 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

What went wrong:
Cannot locate tasks that match 'app:installDebug' as task 'installDebug' is ambiguous in project ':app'. Candidates are: 'installInhouseDebug', 'installInhouseDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest', 'installStagingDebug', 'installStagingDebugAndroidTest'.

Try:

Run gradlew tasks to get a list of available tasks.
For more on name expansion, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org/.

BUILD FAILED in 3s
info Run CLI with --verbose flag for more details.
info Stopping server
not able to run an app after adding build flavours

Reproducer

company project

Screenshots and Videos

No response

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

Warning

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

@cortinico cortinico added the Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed. label Dec 6, 2024
@react-native-bot
Copy link
Collaborator

Caution

Invalid issue: This issue is not valid, either is not a bug in React Native, it doesn't match any of the issue template, or we can't help further with this.

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. Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed.
Projects
None yet
Development

No branches or pull requests

3 participants