react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

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

Open Akashdeep312 opened this issue 2 years ago • 18 comments

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

Akashdeep312 avatar Nov 16 '21 07:11 Akashdeep312

Hi, did you find a solution?

arturasbortkevicius avatar Nov 21 '21 15:11 arturasbortkevicius

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

Chase-Bullock avatar Nov 23 '21 13:11 Chase-Bullock

So with this we can keep both packages "rn-fetch-blob" and "react-native-blob-util" ?

Akashdeep312 avatar Nov 23 '21 13:11 Akashdeep312

You can remove react-native-blob-util unless you're using it outside of react-native-pdf.

Chase-Bullock avatar Nov 23 '21 14:11 Chase-Bullock

Just make sure to change the ^6.3.0 to 6.3.0. Remove the "^" from your package.json file

khaledwj90 avatar Nov 27 '21 05:11 khaledwj90

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)

alex-mironov avatar Nov 29 '21 13:11 alex-mironov

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

tiankai329 avatar Dec 23 '21 17:12 tiankai329

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

I faced the same error 5 duplicate symbols for architecture x86_64

mptechjolly avatar Dec 24 '21 16:12 mptechjolly

@mptechjolly You can remove "rn-fetch-blob"

tiankai329 avatar Dec 26 '21 18:12 tiankai329

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

saeedahmed2023 avatar Jan 13 '22 07:01 saeedahmed2023

+1, any news ?

migueldaipre avatar Jan 18 '22 01:01 migueldaipre

rn-fetch-blob

getting same error :( any fix so far .?

eramudeep avatar Feb 25 '22 08:02 eramudeep

same bhaii...

honey10597 avatar Sep 26 '22 11:09 honey10597

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

Thank you @Chase-Bullock, its working for me now

Jawlia avatar Nov 30 '22 16:11 Jawlia

"react-native": "0.70.6",   
"react-native-blob-util": "^0.17.0",
"react-native-pdf": "^6.6.2",
"rn-fetch-blob": "^0.12.0",

same issue, 4 duplicate symbols for architecture x86_64

meiqi1992 avatar Dec 05 '22 06:12 meiqi1992

"react-native": "0.68.2",   
"react-native-blob-util": "^0.17.2",
"react-native-pdf": "^6.6.2",
"rn-fetch-blob": "^0.12.0",

same issue, 4 duplicate symbols for architecture x86_64

AliRehman7141 avatar Mar 07 '23 14:03 AliRehman7141

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

This Works

hemanthAppmaker avatar Mar 24 '23 09:03 hemanthAppmaker

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

This change in node_modules is working fine. but as we are working in a remote repository with a Team of people, It will be difficult to ask all team members to do the change whenever they install modules. It is not a suggested way even.

@wonday Team has to check why this error is coming if rn-fetch-blob library is installed for react-native-blob-util. and release an official version ASAP.

Ramaraju1992 avatar Jul 05 '23 05:07 Ramaraju1992