-
Notifications
You must be signed in to change notification settings - Fork 577
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
React Native Android application crashing when using syncSession.addConnectionNotification #6579
React Native Android application crashing when using syncSession.addConnectionNotification #6579
Comments
➤ PM Bot commented: Jira ticket: RJS-2784 |
@gfrancischini Thank you for reporting. The issue is similar to #6558, and we are investigating. |
@gfrancischini I have a PR up which I think will fix the issue: #6612 |
Hi Kneth, thanks for the update. It seems that the change is only on JS side right?
I will give a try |
@kneth We have tried hot reload this time and the app is still crashing for us with latest version of realm 12.7.1. Note: It does not crashes normally though for the first time. |
@vatsal-gadhiya-searce Sorry to hear. I'll reopen the issue and we need to investigate further. If you can share a stack trace, we will appreciate it. |
It seems to me we need to add a cleanup of connection state listeners, the same way we clean up other listeners passed to core, as part of the cleanup we do here: realm-js/packages/realm/src/platform/react-native/index.ts Lines 28 to 30 in 56112c7
More specifically, we should expose a method on the |
I'm finding this exact same issue on iOS since migrating to v12 |
I'm still having this issue on android on 12.12.1. You can use this repo to reproduce the issue: https://github.com/Spring-Global/realm-react-native-sample/tree/realm-crash-callback |
➤ danieltabacaru commented: [~[email protected]] Is anyone taking over from Gagik? Apparently the fix in realm/realm-core#7963 does not fully fix the crashes, so it'd be very helpful to get a repro. |
@danieltabacaru Maybe a combination of #6824 and the core fix? @kraenhansen is probably the best one to take over. |
➤ danieltabacaru commented: [~[email protected]] Gagik tried that, but the race is still there. |
How frequently does the bug occur?
Always
Description
The react native application is crashing when there is an active syncSession.addConnectionNotification and the app gets reloaded
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
Using this branch: https://github.com/Spring-Global/realm-react-native-sample/tree/realm-crash-callback
Version
[email protected]
What services are you using?
Atlas Device Sync
Are you using encryption?
No
Platform OS and version(s)
Android - Emulator API 34
Build environment
Which debugger for React Native: ..
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: