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

Got a task FAILED for the task generateCodegenSchemaFromJavaScript when executing yarn install-android-jsc with nothing modified #37353

Closed
jcdhlzq opened this issue May 10, 2023 · 8 comments
Labels
Needs: Triage 🔍 Platform: Android Android applications. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@jcdhlzq
Copy link
Contributor

jcdhlzq commented May 10, 2023

Description

Got the FAILED without modification and it just occurs suddenly.
image

React Native Version

0.72.0-rc2

Output of npx react-native info

System:
OS: macOS 13.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 127.24 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.13.1
path: /usr/local/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 8.1.2
path: /usr/local/bin/npm
Watchman:
version: 2023.03.13.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.11.3
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode:
version: 14.3/14E222b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.12
path: /usr/bin/javac
Ruby:
version: 3.0.5
path: /usr/local/opt/[email protected]/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: true
newArchEnabled: Not found

Steps to reproduce

On the main branch:

  1. yarn
  2. yarn install-android-jsc

Snack, code example, screenshot, or link to a repository

no

@jcdhlzq jcdhlzq added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels May 10, 2023
@github-actions github-actions bot added the Platform: Android Android applications. label May 10, 2023
@cipolleschi
Copy link
Contributor

Hi @jcdhlzq,
can you try to rm -rf packages/react-native-codegen/lib folder and try again?

What I think has happened is that you had an outdated version of codegen. You pulled in some changes we landed last week, and when building again, rn-tester is not rebuilding codegen as it can find an existing prebuilt already on disk.

By deleting the lib folder, we should force it to rebuild Codegen and it should work.
Let me know if that helps.

@jcdhlzq
Copy link
Contributor Author

jcdhlzq commented May 11, 2023

Hi @jcdhlzq, can you try to rm -rf packages/react-native-codegen/lib folder and try again?

What I think has happened is that you had an outdated version of codegen. You pulled in some changes we landed last week, and when building again, rn-tester is not rebuilding codegen as it can find an existing prebuilt already on disk.

By deleting the lib folder, we should force it to rebuild Codegen and it should work. Let me know if that helps.

It's helpful! Thanks!

@jcdhlzq jcdhlzq closed this as completed May 11, 2023
@harisbitsol123
Copy link

Where we have to run this command?

@ngxhuyhoang
Copy link

Where we have to run this command?

Same question

@cipolleschi
Copy link
Contributor

@harisbitsol123 @ngxhuyhoang: are you trying to run RN-Tester from the React Native repo?

If yes, you have to run it from the main folder of the repository.

This command does not work for regular apps, as regular apps don't have the packages/react-native-codegen package.

@Kavahardik
Copy link

Kavahardik commented Nov 29, 2024

Hello everyone after update my RN project from 0.70.4 to 0.75.4 react native and i am facing below error any one has any solution for this?

What went wrong:
Execution failed for task ':datadog_mobile-react-native:generateCodegenSchemaFromJavaScript'.

Process 'command 'node'' finished with non-zero exit value 7

@cipolleschi
Copy link
Contributor

cipolleschi commented Dec 4, 2024

@Kavahardik Can you try the following:

  1. run yarn install
  2. run cd android && ./gradlew clean
  3. Try to build

It could be that there are some stale files

cc. @cortinico as Gradle tasks are more his domain.

@cortinico
Copy link
Contributor

Hello everyone after update my RN project from 0.70.4 to 0.75.4 react native and i am facing below error any one has any solution for this?

Please open a new task and provide the FULL build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Platform: Android Android applications. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

6 participants