wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.58k stars 541 forks source link

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

Open Akashdeep312 opened 2 years ago

Akashdeep312 commented 2 years ago

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

2) 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

arturasbortkevicius commented 2 years ago

Hi, did you find a solution?

Chase-Bullock commented 2 years ago

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

Akashdeep312 commented 2 years ago

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

Chase-Bullock commented 2 years ago

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

khaledwj90 commented 2 years ago

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

alex-mironov commented 2 years ago

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)
tiankai329 commented 2 years ago

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

mptechjolly commented 2 years ago

"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

tiankai329 commented 2 years ago

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

saeedahmed2023 commented 2 years ago

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
migueldaipre commented 2 years ago

+1, any news ?

eramudeep commented 2 years ago

rn-fetch-blob

getting same error :( any fix so far .?

honey10597 commented 1 year ago

same bhaii...

Jawlia commented 1 year ago

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

meiqi1992 commented 1 year ago
"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

AliRehman7141 commented 1 year ago
"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

hemanthAppmaker commented 1 year ago

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

Ramaraju1992 commented 1 year ago

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.