expo: Unable to resolve package boost_X_XX_0.tar.gz

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

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Reactions: 1
  • Comments: 29

Most upvoted comments

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

It started to happen again today…

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

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

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.

Same here

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

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

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