Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libraries collision AWS Iot and React Native #4956

Closed
salitbl opened this issue Sep 19, 2023 · 13 comments
Closed

Libraries collision AWS Iot and React Native #4956

salitbl opened this issue Sep 19, 2023 · 13 comments
Assignees
Labels
bug Something isn't working build Issues related to build problems and CI/CD iot Issues related to the IoT SDK

Comments

@salitbl
Copy link

salitbl commented Sep 19, 2023

Libraries collision AWS Iot and React Native
I am trying to developing an App with React Native and with private native SDK that use AWSIoT.
When I am trying to run this project, the build is failed duo to 12 duplicate codes in classes For example:
❌ duplicate symbol 'OBJC_IVAR$_SRIOConsumer._scanner' in
┌─ libAWSIoT.a(AWSSRWebSocket.o)
└─ libSocketRocket.a(SRIOConsumer.o)

duplicate symbol 'OBJC_CLASS$_SRIOConsumerPool' in
┌─ libAWSIoT.a(AWSSRWebSocket.o)
└─ libSocketRocket.a(SRIOConsumerPool.o)

❌ duplicate symbol '_SRHTTPResponseErrorKey' in
┌─ libAWSIoT.a(AWSSRWebSocket.o)
└─ libSocketRocket.a(SRWebSocket.o)

AWSSRWebSocket include @interface SRIOConsumer and SocketRocket also has @interface SRIOConsumer Do you have any idea how to resolve this issue?

Which AWS Services are you utilizing? - AWSIoT

Environment

  • AWSIoT 2.33.4
  • Dependency Manager: Cocoapods
  • Swift Version : 5.0
  • react: 18.2.0
  • react-native: 0.72.3

Device Information

  • Device: iPhone 12
  • iOS Version: 16.6.1
@sebaland sebaland added question General question build Issues related to build problems and CI/CD labels Sep 19, 2023
@sebaland
Copy link
Member

Thanks for opening this @salitbl ! The team will take a look and post any updates here.

@sebaland sebaland added bug Something isn't working iot Issues related to the IoT SDK and removed question General question labels Sep 21, 2023
@sebaland sebaland self-assigned this Oct 20, 2023
@atierian atierian added the pending-release Code has been merged but pending release label Oct 23, 2023
@salitbl
Copy link
Author

salitbl commented Nov 1, 2023

@ruisebas
Thank you!!!
When this fix will release?
Can I test it before releasing this fix?

@sebaland
Copy link
Member

sebaland commented Nov 1, 2023

@salitbl sorry for the delay, this change will be released in the next couple of days.

If you want to test it, you can target the main branch.

@salitbl
Copy link
Author

salitbl commented Nov 2, 2023

@ruisebas
Thank you !!!
I added the AWSIoT main branch, It was with the new renaming.
When I tried to run iOS project with React native - the project crashed.
Do you know why it crashed?

@sebaland
Copy link
Member

sebaland commented Nov 2, 2023

No, I don't know why it would crash with React native.

Could you share the full symbolicated crashlog? That might give us a hint of what's wrong.

@salitbl
Copy link
Author

salitbl commented Nov 2, 2023

Thanks,
This is the crash:

dyld`:
0x1a9b57fc4 <+0>: mov x16, #0x209
0x1a9b57fc8 <+4>: svc #0x80
-> 0x1a9b57fcc <+8>: b.lo 0x1a9b57fec ; <+40>
0x1a9b57fd0 <+12>: pacibsp
0x1a9b57fd4 <+16>: stp x29, x30, [sp, #-0x10]!
0x1a9b57fd8 <+20>: mov x29, sp
0x1a9b57fdc <+24>: bl 0x1a9af3750 ; cerror_nocancel
0x1a9b57fe0 <+28>: mov sp, x29
0x1a9b57fe4 <+32>: ldp x29, x30, [sp], #0x10
0x1a9b57fe8 <+36>: retab
0x1a9b57fec <+40>: ret

Screenshot 2023-11-02 at 15 56 30

@sebaland
Copy link
Member

sebaland commented Nov 2, 2023

That is not helpful, and it doesn't reference anything within the AWSIoT pod.
Please grab the full crashlog from the device and share it, you can read how to do it here.

In the meantime, I have some follow up questions:

  • Does it only happen on a device? Or does it also crash when running in the simulator?
  • Have you tried cleaning up the Build Folder and wiping the DerivedData folder?
  • Is using the main branch the only thing that's changed in the Podfile?

@sebaland sebaland added the pending-community-response Issue is pending response from the issue requestor label Nov 2, 2023
@salitbl
Copy link
Author

salitbl commented Nov 9, 2023

@ruisebas
Thank you!!!
In the past week I succeed to add main branch to test project, but I have a complex project.
I am trying to add Framework that use AWSIoT, AWSCore, AWSDynamoDB, AWSS3 to react native project.
When I am adding the Framework, the project compilation is failed.
when you will release this fix? I think this is my way to run my project.

@sebaland
Copy link
Member

Hi @salitbl. We held the release due to the crash you reported, and we were waiting to hear back from you.
Just so we're on the same page, you're saying that due to the complexity of your project it seems that it's not easy/reliable for you to use the main branch, so releasing might be the only way for you.

If that's the case, then we will release a new version next week.

@salitbl
Copy link
Author

salitbl commented Nov 10, 2023

@ruisebas
Thank you.
Yes, I think that when you will releasing those changes it will resolve the crash.
I will let you know :)

@salitbl
Copy link
Author

salitbl commented Nov 19, 2023

@ruisebas
Hi,
Do you have any update when those changes will be releasing ?
Thank you

@sebaland sebaland removed the pending-release Code has been merged but pending release label Nov 21, 2023
@sebaland
Copy link
Member

Hi @salitbl.

Sorry for the delay, version 2.33.5 was released yesterday.

Please try it out and let us know if it fixes your issue

@sebaland sebaland closed this as completed Dec 4, 2023
@sebaland sebaland removed the pending-community-response Issue is pending response from the issue requestor label Dec 4, 2023
@salitbl
Copy link
Author

salitbl commented Dec 6, 2023

@ruisebas
My app is running 🎉 🎉 🎉
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Issues related to build problems and CI/CD iot Issues related to the IoT SDK
Projects
None yet
Development

No branches or pull requests

3 participants