How can I get past installing Boost with React Native environment setup for iOS?
Asked Answered
B

6

9

I am currently trying to start a project in React Native version 0.73, but I'm having an issue when I do pod install in the iOS directory, specifically with installing Boost version 1.83.0.

(node:66063) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[Codegen] Found rncore
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[Hermes] Using release tarball from URL: https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.73.1/react-native-artifacts-0.73.1-hermes-ios-debug.tar.gz
Downloading dependencies
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.73.1)
Installing FBReactNativeSpec (0.73.1)
Installing Flipper (0.201.0)
Installing Flipper-Boost-iOSX (1.76.0.1.11)
Installing Flipper-DoubleConversion (3.2.0.1)
Installing Flipper-Fmt (7.1.7)
Installing Flipper-Folly (2.6.10)
Installing Flipper-Glog (0.5.0.5)
Installing Flipper-PeerTalk (0.0.4)
Installing FlipperKit (0.201.0)
Installing OpenSSL-Universal (1.1.1100)
Installing RCT-Folly (2022.05.16.00)
Installing RCTRequired (0.73.1)
Installing RCTTypeSafety (0.73.1)
Installing React (0.73.1)
Installing React-Codegen (0.73.1)
Installing React-Core (0.73.1)
Installing React-CoreModules (0.73.1)
Installing React-Fabric (0.73.1)
Installing React-FabricImage (0.73.1)
Installing React-ImageManager (0.73.1)
Installing React-Mapbuffer (0.73.1)
Installing React-NativeModulesApple (0.73.1)
Installing React-RCTActionSheet (0.73.1)
Installing React-RCTAnimation (0.73.1)
Installing React-RCTAppDelegate (0.73.1)
Installing React-RCTBlob (0.73.1)
Installing React-RCTFabric (0.73.1)
Installing React-RCTImage (0.73.1)
Installing React-RCTLinking (0.73.1)
Installing React-RCTNetwork (0.73.1)
Installing React-RCTSettings (0.73.1)
Installing React-RCTText (0.73.1)
Installing React-RCTVibration (0.73.1)
Installing React-callinvoker (0.73.1)
Installing React-cxxreact (0.73.1)
Installing React-debug (0.73.1)
Installing React-graphics (0.73.1)
Installing React-hermes (0.73.1)
Installing React-jserrorhandler (0.73.1)
Installing React-jsi (0.73.1)
Installing React-jsiexecutor (0.73.1)
Installing React-jsinspector (0.73.1)
Installing React-logger (0.73.1)
Installing React-nativeconfig (0.73.1)
Installing React-perflogger (0.73.1)
Installing React-rendererdebug (0.73.1)
Installing React-rncore (0.73.1)
Installing React-runtimeexecutor (0.73.1)
Installing React-runtimescheduler (0.73.1)
Installing React-utils (0.73.1)
Installing ReactCommon (0.73.1)
Installing SocketRocket (0.6.1)
Installing Yoga (1.14.0)
Installing boost (1.83.0)

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

I have tried following a couple of blogs on how to set up React Native with an M1 chip with unsuccessful results: How to fix “pod install” error in React Native on Mac M1

Xcode Command Line tools: Xcode 14.3.1
Node.js: 21.5.0
macOS: Ventura 13.5

Birdsong answered 31/12, 2023 at 5:27 Comment(4)
This seems to be related to the boost package itself. If you run curl -sL https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2 | shasum -a 256 on a Mac, you will get 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff back. This fails with that the node_modules/react-native/third-party-podspecs/boost.podspec expectsPreeminent
I've submitted an issue here github.com/boostorg/boost/issues/843Preeminent
I solved this issue by following these steps https://mcmap.net/q/402939/-error-installing-boost-verification-checksum-was-incorrect-expected/77745446#77745446Gader
I thought there was a bug too but left it running and eventually it just installed as I opened this page!Biparous
A
18

Move to node_modules/react-native/third-party-podspecs. In boost.podspec, only change the line

spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2',
:sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' }

to

spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2',
:sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' }

Maybe JFrog closed their server.

Amble answered 31/12, 2023 at 10:52 Comment(1)
In addition, this code boost.podspec fileHoloenzyme
C
3

I resolved the issue. For my side, it was an issue of the cache. I run the below commands one-by-one and am able to install the pod successfully,

In the project directory

npm cache clean --force --verbose
npm cache verify
npm install --force --verbose

In the iOS folder

pod cache clean --all
rm -rf Podfile.lock
pod repo update
pod install
Cymry answered 2/1 at 7:21 Comment(0)
G
1

for me its Work with platform :ios, 13.4

Glyndaglynias answered 22/1 at 4:32 Comment(0)
C
0

This is related to an upstream issue with JFrog.

Rather than manually changing the checksum, a better approach is to use a mirror to download the package. This can be done in a repeatable way (compatible with CI/CD) by creating a patch that is applied during npm install.

For instructions, see: Error installing boost Verification checksum was incorrect #843

Commentator answered 31/12, 2023 at 18:51 Comment(0)
M
0

Correct answer from this question is also shown as the answer in a similar question.

Long story short, just change line in node_modules/react-native/third-party-podspecs

https://stackoverflow.com/a/77738910

https://mcmap.net/q/402939/-error-installing-boost-verification-checksum-was-incorrect-expected

Medallist answered 31/12, 2023 at 23:31 Comment(0)
C
0

I encountered the following error:

[!] Error installing boost-for-react-native
[!] /usr/local/bin/git clone https://github.com/react-native-community/boost-for-react-native.git /var/folders/27/69qtc8js3j787wfc82t1lt0h0000gn/T/d20240519-7864-8pe78o --template= --single-branch --depth 1 --branch v1.63.0-0

In my case, I resolved this issue by switching from a low-speed network to a high-speed network. It seems that sometimes the problem can be caused by a slow network connection.

Cookson answered 19/5 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.