pod install fails (not M1) — 401 when installing Boost
See original GitHub issueDescription
Following the docs, I’m initializing a new react-native with Typescript repo with the command
npx react-native init myproject --template react-native-template-typescript
Upon running that command, I get the following:
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./myproject/ios && pod install".
So I cd
into the ios/
directory and run pod install
. Everything installs propery, but when I get to boost…
Installing boost (1.76.0)
[!] Error installing boost
[!] /usr/bin/curl -f -L -o /var/folders/55/_ncpv5xd2hj2q2_k5m2bmn6r0000gn/T/d20220321-2395-th53eu/file.tbz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2 --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.11.3 cocoapods-downloader/1.5.1'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 80 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 401
I understand that it’s the request to jfrog.io
that’s giving me the 401, but how do I get around this? I’m not even clear on why access to this package would be forbidden in the first place. Strangely, I can install the tar.bz2 file directly just by putting that URL into my address bar. Why would it return a 401 to cURL?
I’m a web developer so I’m used to the npm ecosystem and have never faced a 401 before.
What can I do to move past this?
Version
0.67.4
Output of npx react-native info
info Fetching system and libraries information… System: OS: macOS 12.1 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 294.95 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.19.1 - /usr/local/opt/node@14/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 6.14.16 - /usr/local/opt/node@14/bin/npm Watchman: 2021.10.18.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.3 System Images: android-26 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6392135 Xcode: 12.0/12A7209 - /usr/bin/xcodebuild Languages: Java: 1.8.0_252 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.4 => 0.67.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
- run npx react-native init myproject --template react-native-template-typescript
- cd into
ios
- run
pod install
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created a year ago
- Comments:25 (1 by maintainers)
Top GitHub Comments
I found a workaround, though admittedly it’s pretty lame and is no better than a bandaid solution. The approach is to download the file and then source it from the local filesystem, rather than making a network call:
https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
node_modules/react-native/third-party-podspecs
node_modules/react-native/third-party-podspecs/boost.podspec
:http
part of thespec.source
key to:pod install
note: you may need to adjust the version of the boost package your project specifies.
I am still seing this issue. Is there anything besides the workaround? A lot of people seem to have reported this.