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

Unable to resolve package boost_X_XX_0.tar.gz #26184

Closed
slash006 opened this issue Jan 1, 2024 · 29 comments
Closed

Unable to resolve package boost_X_XX_0.tar.gz #26184

slash006 opened this issue Jan 1, 2024 · 29 comments
Labels
CLI Versioned Expo CLI -- `npx expo start` outdated

Comments

@slash006
Copy link

slash006 commented Jan 1, 2024

Summary

Hi,
since yesterday it's not possible to download boost package. https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz seems to be unavailable:

[RUN_GRADLEW] Execution failed for task ':expo-modules-core:prepareBoost'. [RUN_GRADLEW] > Could not read /tmp/adam/eas-build-local-nodejs/.../expo-modules-core/android/build/downloads/boost_1_76_0.tar.gz. [RUN_GRADLEW] > Not in GZIP format

What platform(s) does this occur on?

Android

SDK Version

~47.0.12

Environment

expo-env-info 1.0.5 environment info:
System:
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 21.4.0 - ~/.nvm/versions/node/v21.4.0/bin/node
Yarn: 1.22.21 - /usr/local/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v21.4.0/bin/npm
npmPackages:
@expo/webpack-config: ^0.17.2 => 0.17.4
expo: ~47.0.12 => 47.0.14
react: 18.1.0 => 18.1.0
react-dom: 18.1.0 => 18.1.0
react-native: 0.70.5 => 0.70.5
react-native-web: ~0.18.9 => 0.18.12
Expo Workflow: managed

Minimal reproducible example

eas build -p android --local --profile preview

@slash006 slash006 added CLI Versioned Expo CLI -- `npx expo start` needs validation Issue needs to be validated labels Jan 1, 2024
@expo-bot expo-bot removed the needs validation Issue needs to be validated label Jan 1, 2024
@srikargunnam
Copy link

Even I am facing the same issue, the issue is not with the download, it's with the downloaded file format, the error states that the file is not in GZIP format.

@slash006
Copy link
Author

slash006 commented Jan 1, 2024

I think there is a problem with access to this resource - there is a redirect to a page that returns a 302 Moved Temporarily instead of the file.

@nadavkli
Copy link

nadavkli commented Jan 1, 2024

Same issue here

@ravisharnagat
Copy link

You can try this temporary solution: software-mansion/react-native-reanimated#5542 (comment)

@gwalshington
Copy link

Same issue here - worked fine yesterday. the solution in react-native-reanimated did not work for me. also tried several different versions, but the issue appears to be the link, explained by @slash006

@h-assefi
Copy link

h-assefi commented Jan 2, 2024

Same issue here

@stevangd
Copy link

stevangd commented Jan 2, 2024

Its probably down for the JFrog download link.

@kenisad5566
Copy link

Same issue here

@haolei
Copy link

haolei commented Jan 2, 2024

I manually download boost from https://zenlayer.dl.sourceforge.net/project/boost/boost/1.83.0/boost_1_83_0.tar.gz, and put it under expo/react-native-lab/react-native/packages/react-native/ReactAndroid/build/downloads

@stevangd
Copy link

stevangd commented Jan 2, 2024

I manually download boost from https://zenlayer.dl.sourceforge.net/project/boost/boost/1.83.0/boost_1_83_0.tar.gz, and put it under expo/react-native-lab/react-native/packages/react-native/ReactAndroid/build/downloads

Is it work??
Bcs if we build using EAS build i think we need to add the post install hook to move the files into the package directory.

@h-assefi
Copy link

h-assefi commented Jan 2, 2024

expo/react-native-lab/react-native/packages/react-native/ReactAndroid/build/downloads

I am using EAS.
How can I access this path expo/react-native-lab/react-native/packages/react-native/ReactAndroid/build/downloads ?

@stevangd
Copy link

stevangd commented Jan 2, 2024

JFrog for boost download now is up, and the issue should be resolved. I've tried to build using EAS and its success

@haolei
Copy link

haolei commented Jan 2, 2024

I manually download boost from https://zenlayer.dl.sourceforge.net/project/boost/boost/1.83.0/boost_1_83_0.tar.gz, and put it under expo/react-native-lab/react-native/packages/react-native/ReactAndroid/build/downloads

Is it work?? Bcs if we build using EAS build i think we need to add the post install hook to move the files into the package directory.

yes, it worked for me

@h-assefi
Copy link

h-assefi commented Jan 2, 2024

it seems, its working now.

@cortinico
Copy link

This can be closed as is effectively a duplicate of facebook/react-native#42109

@netanelz-amdocs
Copy link

It started to happen again today....

@Dssssds
Copy link

Dssssds commented Jan 7, 2024

This problem has troubled me for too long and cannot be solved at all. Is there a standard answer?
image

@kenisad5566
Copy link

JFrog for boost download now is up, and the issue should be resolved. I've tried to build using EAS and its success

JFrog down now. It seems not stable.

@long2ice
Copy link

long2ice commented Jan 8, 2024

Same here. FK!

@RizqiSyahrendra
Copy link

Same here

@vishal-nayak07
Copy link

same here

@danklad
Copy link

danklad commented Jan 8, 2024

In your node_modules => expo-modules-core/android/build.gradle,

Replace the following function

def downloadBoost = tasks.create('downloadBoost', Download) {
  dependsOn(createNativeDepsDirectories)
  def srcUrl = REACT_NATIVE_TARGET_VERSION >= 69
    ? "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz"
    : "https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz"
  src(srcUrl)
  onlyIfNewer(true)
  overwrite(false)
  dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz"))
}

with the below function

def downloadBoost = tasks.create('downloadBoost', Download) {
  dependsOn(createNativeDepsDirectories)
  def transformedVersion = BOOST_VERSION.replace("_", ".")
  def srcUrl = REACT_NATIVE_TARGET_VERSION >= 69
    ? "https://sourceforge.net/projects/boost/files/boost/${transformedVersion}/boost_${BOOST_VERSION}.tar.gz"
    : "https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz"
  src(srcUrl)
  onlyIfNewer(true)
  overwrite(false)
  dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz"))
}

I have changed the source URL in the downloadBoost function by following this answer and it works for me. I just patched this in my project using patch-package.

Make sure to delete the previously downloaded file boost_1_76_0.tar.gz in expo-modules-core/android/build/downloads

@cipolleschi
Copy link

We have an official workaround and a pinned issue: facebook/react-native#42180.

@Jean-Bekker
Copy link

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

@h-assefi
Copy link

h-assefi commented Jan 8, 2024

It's back again and no result by any of the answers.

@DevRedaKhalaf
Copy link

It's back again and no result by any of the answers.

same issue

@Ryu0408
Copy link

Ryu0408 commented Jan 9, 2024

same issue too T.T

@long2ice
Copy link

long2ice commented Jan 9, 2024

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

We need install patch-package first: npm i -D patch-package
And add "postinstall": "patch-package" to package.json

@Jahanzeb009
Copy link

Install this package,

expo-modules-core

This solved my problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLI Versioned Expo CLI -- `npx expo start` outdated
Projects
None yet
Development

No branches or pull requests