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

iOS NearbyConnections doesn't work with React Native #2195

Open
WolfDierdonck opened this issue Nov 21, 2023 · 7 comments
Open

iOS NearbyConnections doesn't work with React Native #2195

WolfDierdonck opened this issue Nov 21, 2023 · 7 comments
Labels
lang: swift An issue with a Swift client library P3 Priority 3 issue (default for bugs or new feature requests; things we'd like to work on) platform: apple An issue with the macOS or iOS implementation project: connections An issue with the Connections project type: bug Something is broken or not working as intended

Comments

@WolfDierdonck
Copy link

Project

Nearby Connections

Language

Swift

OS Platform

Apple

What happened?

When trying to use React Native with Nearby Connections on iOS, the app crashes with an sdallocx error in OPENSSL_free (inside of the BoringSSL-grpc package) when requesting a connection to another endpoint. Note that discovering/advertising works, it only crashes when requesting a connection.

This issue seems very similar to apple/swift-nio-ssl#189 (read the thread for more details, specifically the last few comments). Additionally, the fix used in that package here fixes the issue above.

What did you expect to happen?

No error/crash to happen when requestingConnection

How can we reproduce it (as minimally and precisely as possible)?

  1. Create a react native project
  2. Create a react native swift package with a method that calls discover and requests connection to any endpoints found
  3. Call this method from react native
  4. The app will crash immediately after requesting connection to a discovered endpoint

How often does this bug happen?

Every time

Standalone code to reproduce the issue

Can't provide any code for this since it's very involved. The steps above should be enough to repro 100% of the time

Relevant log output

No response

Anything else we need to know?

The workaround doesn't seem to introduce any issues so not an urgent issue, just a QOL improvement

@WolfDierdonck WolfDierdonck added needs-triage Issue still needs to be assigned, labeled and deduplicated type: bug Something is broken or not working as intended labels Nov 21, 2023
@awaisanjumx2
Copy link

facing same problem
any workaround?

@edgarclerigo
Copy link

If I'm not mistaken this is something related to the Flipper, if you disable it on the Podfile you should be able to run the app without any problem.

@WolfDierdonck
Copy link
Author

facing same problem

any workaround?

I linked the fix in the issue description, you just have to add an #if 0 to one of the files.

Disabling flipper did not work for me

@bourdakos1
Copy link
Collaborator

Are you able to open a PR with the fix? I can approve/submit. Otherwise it will probably be about a week until I can take a look at this

@WolfDierdonck
Copy link
Author

I don't think It's a trivial fix since the change is in the SSL library, not nearby itself. See this PR for how another package fixed it

@bourdakos1
Copy link
Collaborator

It looks like that PR is merged, can we just update the version of the SLL lib we are using?

@WolfDierdonck
Copy link
Author

Maybe? The linked thread said it might be fixed as of https://boringssl-review.googlesource.com/c/boringssl/+/40405/9#message-0e7e7e16e7576e76dffe8a4be77fe3b1102f4112 (pretty old though, might already be using this). However, they also mentioned that it might be a bug in Folly, and I don't think that's being tracked anywhere...

@bourdakos1 bourdakos1 added P2 Priority 2 issue (the default for issues we're likely to work on after P0/P1 issues) platform: apple An issue with the macOS or iOS implementation lang: swift An issue with a Swift client library project: connections An issue with the Connections project P3 Priority 3 issue (default for bugs or new feature requests; things we'd like to work on) and removed needs-triage Issue still needs to be assigned, labeled and deduplicated P2 Priority 2 issue (the default for issues we're likely to work on after P0/P1 issues) labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: swift An issue with a Swift client library P3 Priority 3 issue (default for bugs or new feature requests; things we'd like to work on) platform: apple An issue with the macOS or iOS implementation project: connections An issue with the Connections project type: bug Something is broken or not working as intended
Projects
None yet
Development

No branches or pull requests

4 participants