react-native-pdf: Conflict happening due to using react-native-blob-util and rn-fetch-blob both

What react-native version are you using?

"react-native": "0.63.4",

What react-native-pdf version are you using?

"react-native-pdf": "^6.2.2",

along with

 "rn-fetch-blob": "^0.12.0",
 "react-native-blob-util": "^0.13.17",

What platform does your issue occur on? (android/ios/both) ios

Describe your issue as precisely as possible :

  1. Steps to reproduce
npx react-native run-ios
  1. Interesting logs
duplicate symbol '_bridgeRef' in:
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_fsQueue' in:
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_commonTaskQueue' in:
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_fileStreams' in:
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilFS.o)
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobFS.o)
duplicate symbol '_expirationTable' in:
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilNetwork.o)
    /Users/akashdeep/Library/Developer/Xcode/DerivedData/coachable_react_native-ackhswxpoutapthfcqfhmrvfjypu/Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobNetwork.o)
ld: 5 duplicate symbols for architecture x86_64

This is happening as i’m using rn-fetch-blob and react-native-blob-util how to make it work without removing rn-fetch-blob

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 19
  • Comments: 18

Most upvoted comments

i find a solution you can remove “react-native-blob-util” and use “rn-fetch-blob” in react-native-pdf. steps: 1-remove react-native-blob-util 2- GO to node_modules->react-native-pdf->index.js 3-in line 22 change “react-native-blob-util” with “rn-fetch-blob” 4- save it and rebuild the App.

Before: Screenshot 2022-01-13 at 11 59 27 AM After: Screenshot 2022-01-13 at 11 59 04 AM

Changing "react-native-pdf": "^6.2.2", to "react-native-pdf": "6.3.0", will fix the issue for now

The latest version 6.4.0 changed the blob package to react-native-blob-util. 6.3.0 and earlier versions use rn-fetch-blob

I’m facing the same issue, although my versions are a bit different

    "react-native-blob-util": "^0.13.17",
    "react-native": "0.65.1",
    "react-native-pdf": "6.3.0",
    "rn-fetch-blob": "^0.11.2",

duplicate symbol '_bridgeRef' in:
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_fsQueue' in:
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_commonTaskQueue' in:
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_fileStreams' in:
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilFS.o)
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobFS.o)
duplicate symbol '_expirationTable' in:
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilNetwork.o)
    /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobNetwork.o)
ld: 5 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I installed like below

react-native-blob-util: "^0.13.18",
react-native-pdf: "^6.4.0"

But I faced the same error 5 duplicate symbols for architecture x86_64