react-native: Xcode 10 libfishhook.a cannot be found
Environment
OS: macOS 10.14 Node: 10.0.0 Yarn: Not Found npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 10.0 beta (10L176w) Android Studio: 3.1 AI-173.4720617
Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4
Description
When building/running an app in Xcode 10 beta, produces error
Build input file cannot be found: '/Users/qinguan/Desktop/reactnative/CodeCollab/node_modules/react-native/Libraries/WebSocket/libfishhook.a'
When using react-native run-ios
produces error
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/qinguan/Desktop/reactnative/CodeCollab/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)
The following build commands failed:
Libtool /Users/qinguan/Desktop/reactnative/CodeCollab/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a normal x86_64
(1 failure)
However only happens when using Xcode CLI 10 or when trying to run with Xcode 10
Steps to Reproduce
react-native init App
- Open Xcode 10 OR
react-native run-ios
with Xcode 10 CLI - Run App
Expected Behavior
App should run
Actual Behavior
Produces error as shown below:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 69
- Comments: 53 (4 by maintainers)
Commits related to this issue
- Use correct library reference for libfishhook.a in RCTWebSocket (#19579) Summary: This uses the reference for `libfishhook.a` from the Products, rather than the reference from the Frameworks group. ... — committed to macdoum1/react-native by eliperkins 6 years ago
- Patch RCTWebSocket This is based off this solution: https://github.com/facebook/react-native/pull/19579 to this issue: https://github.com/facebook/react-native/issues/19569 — committed to infinitered/ignite-andross by deleted user 6 years ago
- Remove _workQueue of webSocket set to NULL which may leads to crash Remove _workQueue of webSocket set to NULL which may leads to crash Remove _delegateDispatchQueue nil handler Sync stream event c... — committed to zhongwuzw/react-native by zhongwuzw 6 years ago
Remove and add again libfishhook.a from Xcode and the path issue will resolve.
For a solution, I copied the file from my ios/build/Build/Products/Debug-iphonesimulator/libfishhook.a and pasted it into …/node_modules/react-native/Libraries/WebSocket/ and got the build. I hope it helps.
I am using react-native-cli: 2.0.1 react-native: 0.55.4 macOS v.10.14 beta Xcode 10 beta
*Thank you for everyone that this solution helped…this is my first time adding to the community and man, it was dope to see all the emoji love
For anyone experiencing this it is already fixed but if you don’t want to wait for a release either use the master branch or apply the changes from this pr manually (I took the latter approach as it’s faster).
It’s worked for me! Thx!
I put up #19579 which should address this.
@eliperkins && @amitassaraf thanks! That worked for me like a charm! The last of my string of errors running the iOS version of my app for the first time.
@mesutozturk you are viewing the Resource Tags tab. The options will show up when the Build Phases tab is selected:
@sofianegargouri you can use the old build system in CD by passing -UseNewBuildSystem=‘NO’ to xcodebuild. I was able to fix config.h errors with issue #19529
I delete it in Xcode, and it works.
I’m done with downgrading xcode to 9.4.1 , reinstall Pods 😄
Upgrading to 0.57.0-rc4 probably betterOn Sep 18, 2018, at 4:30 PM, IceTeddy notifications@github.com wrote:For a solution, I copied the file from my ios/build/Build/Products/Debug-iphonesimulator/libfishhook.a and pasted it into …/node_modules/react-native/Libraries/WebSocket/ and got the build. I hope it helps.I am using react-native-cli: 2.0.1 react-native: 0.55.4 macOS v.10.14 beta Xcode 10 beta It’s worked for me! Thx!—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
It’s worked only for me. And What about my other friend that’s clone the project? Do you have any good solution for that?
I’ve been working on this today, it looks like a reference to the
libfishhook.a
file is referencing the wrong output. I’ll see if I can get a PR up in a second.Just spend one day on that!
I’m facing this issue too on a CI server, obviously the Xcode workaround does not fixes the issue for me anyone has faced this ? 🤔
@gastonmorixe Thanks
Copy the file
libfishhook.a
tonode_modules/react-native/Libraries/Websocket
and paste there. Build it and the build will succeed@Furqankhanzada Thank you 😃
use this : https://medium.com/@rhdeck/running-react-native-with-xcode-10-beta-1-83c4334e7e0f
Still getting the same error. I copied the file from
ios/buid/...
folder and copied it in WebScoket but still getting the same error.Version
macOS: 10.13.6
react-native: 0.55.2
xcode: 10.0
react: 16.3.1
Description:
It was working fine on the previous version of xcode but now it’s giving me following errors while generating the build. Error:
Build input file cannot be found:'/Users/alqamabinsadiq/Desktop/Sudofy/Cambio/node_modules/react-native/Libraries/WebSocket/libfishhook.a'
Also lexical or Preprocessor issue:
/Users/alqamabinsadiq/Desktop/Sudofy/Cambio/node_modules/react-native/third-party/glog-0.3.4/src/base/mutex.h:105:10: 'config.h' file not found