react-native-reanimated: The boost_1_76_0.tar.gz file is not in GZIP format

Description

Getting following error on android build creation:

Execution failed for task ':react-native-reanimated:prepareBoost'.
13:32:31 > Could not read /home/ubuntu/workspace/Feature-Testing-D11/Feature-testing/AndroidAdhocBuildsNew_FLIP/node_modules/react-native-reanimated/android/build/downloads/boost_1_76_0.tar.gz.
13:32:31    > Not in GZIP format

Steps to reproduce

Execution is failing for the step where boost is prepared, because the downloaded tar.gz file (https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz) is not present in gzip format. Please check the screenshot attached. Screenshot 2023-12-31 at 1 55 48 PM

Snack or a link to a repository

github.com/eternal_mercy_2/test-reanimated

Reanimated version

3.3.0

React Native version

0.69.1

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Reactions: 10
  • Comments: 75 (2 by maintainers)

Commits related to this issue

Most upvoted comments

For Android, one quick workaround is to create patch-package for package react-native-reanimated.

Just replace

    task downloadBoost(dependsOn: resolveBoost, type: Download) {
        def transformedVersion = BOOST_VERSION.replace("_", ".")
        def artifactLocalName = "boost_${BOOST_VERSION}.tar.gz"
        def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
        if (REACT_NATIVE_MINOR_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(new File(downloadsDir, artifactLocalName))
    }

in /node_modules/react-native-reanimated/android/build.gradle with

task downloadBoost(dependsOn: resolveBoost, type: Download) {
        def transformedVersion = BOOST_VERSION.replace("_", ".")
        def artifactLocalName = "boost_${BOOST_VERSION}.tar.gz"
        
        def srcUrl = "https://sourceforge.net/projects/boost/files/boost/${transformedVersion}/boost_${BOOST_VERSION}.tar.gz"
        if (REACT_NATIVE_MINOR_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(new File(downloadsDir, artifactLocalName))
    }

This should fix the android build issue for timebeing. @Temitope-Emmanuel

Make sure to delete the previously downloaded file boost_1_76_0.tar.gz in react-native-reanimated/android/build/downloads

As mentioned above,

In /node_modules/react-native-reanimated/android/build.gradle

Change this:

def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"

To This:

def srcUrl = "https://sourceforge.net/projects/boost/files/boost/${transformedVersion}/boost_${BOOST_VERSION}.tar.gz"

Make sure to delete the previously downloaded file boost_1_76_0.tar.gz in react-native-reanimated/android/build/downloads

For Android, one quick workaround is to create patch-package for package react-native-reanimated.

Just replace

    task downloadBoost(dependsOn: resolveBoost, type: Download) {
        def transformedVersion = BOOST_VERSION.replace("_", ".")
        def artifactLocalName = "boost_${BOOST_VERSION}.tar.gz"
        def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
        if (REACT_NATIVE_MINOR_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(new File(downloadsDir, artifactLocalName))
    }

in /node_modules/react-native-reanimated/android/build.gradle with

task downloadBoost(dependsOn: resolveBoost, type: Download) {
        def transformedVersion = BOOST_VERSION.replace("_", ".")
        def artifactLocalName = "boost_${BOOST_VERSION}.tar.gz"
        
        def srcUrl = "https://sourceforge.net/projects/boost/files/boost/${transformedVersion}/boost_${BOOST_VERSION}.tar.gz"
        if (REACT_NATIVE_MINOR_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(new File(downloadsDir, artifactLocalName))
    }

This should fix the android build issue for timebeing. @Temitope-Emmanuel

This worked for me. Make sure to delete the previously downloaded file boost_1_76_0.tar.gz in react-native-reanimated/android/build/downloads

Fixed the Issue with Boost Library

Step 1: Update URL in ReactAndroid Build Script

  1. Navigate to the file: /node_modules/react-native/ReactAndroid/build.gradle

  2. Locate the following line:

https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
  1. Replace it with:
https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz

Step 2: Update URL in Expo Modules Core

  1. Go to the file: /node_modules/expo-modules-core/android/build.gradle.

  2. Search for the same URL as in Step 1.

  3. Replace it with the new URL provided in Step 1.

Step 3: Apply the Patches

After making the changes, run the following commands to apply the patches:

patch-package react-native
patch-package expo-modules-core

facing the same issue. any solution?

Jfrog redirects the boost source download to this https://landing.jfrog.com/reactivate-server/boostorg with an account reactivation notice.

Just replace

spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
                  :sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }

in /node_modules/react-native/third-party-podspecs/boost.podspec with

spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2',
                  :sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }

Then you can also patch-package react-native for future installs.

@ravisharnagat thank you it works for me… i’m still confused abut GZIP format in reanimated… any one knows why this problems comes just clear my concept about it.

The problem is not in “node_modules/react-native-reanimated” but in the “node_modules/react-native”.

Boost is a portable C++ source libraries need to the compilation :

https://www.boost.org

Same error, needs urgent attention

same issue

Any Updates?

i have the same issue, any updates?

same issue

I’m getting error for iOS too, during pod install commando in App Center. What I need to change before creating the patch?

Installing boost (1.76.0)

[!] Error installing boost
Verification checksum was incorrect, expected f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41, got 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff

##[error]The process '/usr/local/lib/ruby/gems/3.0.0/bin/pod' failed with exit code 1
##[error]The 'pod' command failed with error: The process '/usr/local/lib/ruby/gems/3.0.0/bin/pod' failed with exit code 1
##[section]Finishing: Pod install

@lucianomlima React Native posted a workaround to fix the ios error. facebook/react-native#42180 (comment)

I applied the patch to:

  • react-native
  • react-native-reanimated
  • expo-modules-core

Now I get this error:

* What went wrong:
Execution failed for task ':react-native-reanimated:unzipHermes'.
> Could not read /Users/***/node_modules/react-native/sdks/download/hermes.tar.gz.
   > java.io.EOFException (no error message)

Not sure how hermes was effected. I have deleted node_modules and cleared the android build cache but to no avail. Anyone else seen this?

A solution given in another issue seems to work: https://github.com/software-mansion/react-native-reanimated/issues/3590#issuecomment-1255475367

But, how to make this change so that it works in a ci/cd as well?

same issue here trying to generate builds in AppCenter

I applied the patch to:

  • react-native
  • react-native-reanimated
  • expo-modules-core

Now I get this error:

* What went wrong:
Execution failed for task ':react-native-reanimated:unzipHermes'.
> Could not read /Users/***/node_modules/react-native/sdks/download/hermes.tar.gz.
   > java.io.EOFException (no error message)

Not sure how hermes was effected. I have deleted node_modules and cleared the android build cache but to no avail. Anyone else seen this?

same here. react native v 0.69.9

image

It’s been for 10 times since I started building the app today and it says I can’t fetch that jfrog url package. How can I solve this issue? I’m using “eas build” command to build the app and the platform is android.

Same error here today (7th Jan 2024)

i cant create android apk

Getting the same error from yesterday. It’s fine when trying to build the android app from linux. However, encountered the error from M1

Update: Started getting this error again today (7th Jan 2024)

i changed [def srcUrl = “https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz”] To [def srcUrl = “https://sourceforge.net/projects/boost/files/boost/${transformedVersion}/boost_${BOOST_VERSION}.tar.gz”]

in my App/node_modules/react-native-reanimated/android/build.gradle

and it works

also it is work for expo-modules-core same issue

This can be closed as is effectively a duplicate of https://github.com/facebook/react-native/issues/42109

Temporary fix: You can download boost_1_76_0.tar.gz file from here https://source.ipfire.org/source-2.x/ In your case you can download it via this link: https://source.ipfire.org/source-2.x/boost_1_76_0.tar.gz

then just copy it to App/node_modules/react-native-reanimated/android/build/downloads/boost_1_76_0.tar.gz and build your app.

Note: you need to do this every time you run yarn or npm. I usually do this since it downloads this file every time and jfrog server is very very slow to download.

seems the jfrog url is working now.

@ravisharnagat Thank for your solution Its worked for me to generate Android build

@Temitope-Emmanuel

It worked for me. Make sure to run rm -rf Pods/ Podfile.lock before hand. Also if your using M1 mac run first bundle install and bundle exec pod install instead of just pod install.

any solution yet?