Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
315 stars 80 forks source link

(Happen again in v4.0.0)Duplicate CocoaAsyncSocket symbols with React Native 0.62.0 #61

Closed phungthanhdong closed 4 years ago

phungthanhdong commented 4 years ago

Hello, It appears that the issue happen again in v4.0.0 Screen Shot 2020-07-01 at 3 30 29 PM Screen Shot 2020-07-01 at 3 29 43 PM Could you please update it! Thanks

Originally posted by @phungthanhdong in https://github.com/Rapsssito/react-native-tcp-socket/issues/36#issuecomment-652276415

Rapsssito commented 4 years ago

@phungthanhdong and @dpankros, could you try to refresh your pods and node_modules?

jeremypioche commented 4 years ago

Hi guys,

First of all thanks for your package @Rapsssito it's been really helpful.

@phungthanhdong, the issue also happened to me, i found a consistent way to get rid of the error.

Procedure: 1) Go to xcode 2) into project navigator, click on Pods folder 3) then select TcpSockets in targets 4) Go to Build Phases > Compile sources 5) Here remove reference to CocoaAsyncSocket

I think the issue is that both our project and TcpSocket libs imports CocoaAsyncSocket (checkout targets in step 2).

fnando commented 4 years ago

@Jiope thanks for the temporary (!) fix. I noticed that this is not persisted between different pod install executions. Is there a way of doing it or the only solution would be forking the repo and removing that item from the compile source list?

github-actions[bot] commented 4 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

nphausg commented 3 years ago

Hi guys,

First of all thanks for your package @Rapsssito it's been really helpful.

@phungthanhdong, the issue also happened to me, i found a consistent way to get rid of the error.

Procedure:

  1. Go to xcode
  2. into project navigator, click on Pods folder
  3. then select TcpSockets in targets
  4. Go to Build Phases > Compile sources
  5. Here remove reference to CocoaAsyncSocket

I think the issue is that both our project and TcpSocket libs imports CocoaAsyncSocket (checkout targets in step 2).

Totally agree with you. I have a command line will be remove after Pod install:

rm -rf node_modules/react-native-tcp/ios/CocoaAsyncSocket

dpankros commented 3 years ago

@phungthanhdong and @dpankros, could you try to refresh your pods and node_modules?

Unfortunately, this project is on hold for the foreseeable future (has been for a while now) and so I don't even know if I could reproduce the error anymore. Sorry.

I'll try to remember to circle back when/if that projects becomes active again.

akinncar commented 2 years ago

Hi guys,

First of all thanks for your package @Rapsssito it's been really helpful.

@phungthanhdong, the issue also happened to me, i found a consistent way to get rid of the error.

Procedure:

  1. Go to xcode
  2. into project navigator, click on Pods folder
  3. then select TcpSockets in targets
  4. Go to Build Phases > Compile sources
  5. Here remove reference to CocoaAsyncSocket

I think the issue is that both our project and TcpSocket libs imports CocoaAsyncSocket (checkout targets in step 2).

This solution did the trick for me but, Is it possible to solve this problem in the library instead use this temporary fix? I can try to help if you guys have any idea how to solve it.

Azaz0723 commented 1 year ago

I am facing same issue and in compile resources there was not CocoaAsyncSocket there was GCDAsyncUdpSocket.o i have removed it accordingly after that building project the duplicate architecture number goes from 144 to 65 duplicate symbols for architecture x86_64 and build fails at this. kindly help

mahesh-kumar26 commented 1 year ago

I am facing same issue and in compile resources there was not CocoaAsyncSocket there was GCDAsyncUdpSocket.o i have removed it accordingly after that building project the duplicate architecture number goes from 144 to 65 duplicate symbols for architecture x86_64 and build fails at this. kindly help

I think then you have to remove reference from react-native-udp library So, just do the same go to xcode -> Select Pods in folder -> go to target section and try to find react-native-udp and remove the cocaAsyn reference from there and your problem will be resolved. AS this error also shows which library has the issue, /Users/maheshkumar/Library/Developer/Xcode/DerivedData/ABC-bilxpxjsgzmpqdadtgwuicgixtys/Build/Products/Debug-iphonesimulator/react-native-udp/libreact-native-udp.a(GCDAsyncUdpSocket.o)

mohit792 commented 1 year ago

Hi everyone , i solved this issue finally with reproduce . SOLVED !!!

  1. uninstall the react-native-udp
  2. install the latest version