-
-
Notifications
You must be signed in to change notification settings - Fork 256
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 Android build is failing with error - Task :react-native-mmkv:prepareBoost FAILED #617
Comments
Have you been able to resolve this?? Execution failed for task ':react-native-mmkv:prepareBoost'.
> Could not read /.../App/node_modules/react-native-mmkv/android/build/downloads/boost_1_76_0.tar.gz.
> Not in GZIP format |
Execution failed for task ':react-native-mmkv:prepareBoost'.
Facing same issue. |
try remove node_modules, reinstall and mrousavy/react-native-vision-camera#1489 (comment) |
@deepanshu-ample @Kavahardik
|
Facing same issue :
|
Updating node version to v20.10.0 run successfully ✅ 🚀 |
For developers using older versions of Realm (realm/realm-js#5136), consider utilizing Node version v18.19.0. |
@gangadharuseline You can download then just copy it to Note: you need to do this every time you run |
See similar software-mansion/react-native-reanimated#5542 Raised boostorg/boost#849 |
We are facing the same issue . In which file did u add the node version |
The problem that you're facing is related to the general problem in the React Native Community regarding the broken download url from JFrog. A temporary fix that worked on my build have been these steps:
npm install --save-dev patch-package postinstall-postinstall
You can find this file locally on your machine here: Change this line: task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
def transformedVersion = BOOST_VERSION.replace("_", ".")
// change this line
def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
// to this
def srcUrl = "https://archives.boost.io/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
if (REACT_NATIVE_VERSION < 69) {
srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz"
}
src(srcUrl)
onlyIfNewer(true)
overwrite(false)
dest(boost_file)
}
You need to run
You need to app the following script into your "scripts": {
"postinstall": "patch-package"
} Afterwards, you can commit all files. This should fix your broken build. These changes will be applied automacially in your CI/ CD pipeline as well. There's no need to change this on every commit or push. The steps are inspired by this post |
diff --git a/node_modules/react-native-mmkv/android/build.gradle b/node_modules/react-native-mmkv/android/build.gradle
index 13eae76..bc8dc83 100644
--- a/node_modules/react-native-mmkv/android/build.gradle
+++ b/node_modules/react-native-mmkv/android/build.gradle
@@ -204,7 +204,7 @@ task createNativeDepsDirectories {
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
def transformedVersion = BOOST_VERSION.replace("_", ".")
- def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
+ def srcUrl = "https://archives.boost.io/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
if (REACT_NATIVE_VERSION < 69) {
srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz"
}
|
Instead of creating patches as comments, could you maybe create a PR so I can merge this upstream? Thanks |
the latest MMKV version (2.11) does not have this issue. |
I am trying to run npx react-native run-android
The build is failing with the below error,
PFA screenshot
Below is the some of the log
Here are Our App's few package.json versions are
Note: IOS app works fine.
Can you please help us here
The text was updated successfully, but these errors were encountered: