-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: Adds relinker for anr/ndk libarary loading on older devices #603
Conversation
I'd like to discuss this PR offline - I am not yet convinced this will solve the overarching problem. These error reports always pops up along with AtB-AS/kundevendt#1513 - which is a SoLoader linking issue of libhermes. I've been holding off on this issue in lieu of RN 0.64 release (react-native-community/releases#207) which will also upgrade the SoLoader to 0.9 - and apparently fix a lot of loading issues with older/non-typical devices: https://github.com/facebook/SoLoader/releases/tag/v0.9.0 |
ReLinker is an alternative of SoLoader - but we're kind of stuck with SoLoader since that is what is implemented internally by Facebook |
Alternatively we could go the route of forcing the 0.9 version: facebook/SoLoader#55 (comment) |
Yeah, but I think these are different issues. Bugsnag uses builtin native loadLibrary, not SoLoader. But that is a good point actually, we can try to use SoLibrary instead of ReLinker in any case, as it is available already without additional dependencies. |
To be clear: I'm not disputing/arguing that we don't need to update SoLoader, but I think the issue at hand (from bugsnag) is unrelated to that particular need. |
Could you still add the upgrade here? If for every person who experiences linking errors with these libs, also experiences it with libhermes, the app will not work. |
Absolutely I can! I have no actual idea if this works, though. Hard to reproduce and hard to verify. But at least it compiles and seems to run as before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can try this out, will catch obvious errors in QA builds
There are some cases where the Android SDK has issues loading ANR/NDK libraries from Bugsnag causing bugsnag not to be able to report on these types of errors. According to docs and other issues (bugsnag/bugsnag-react-native#369) the fix is to use ReLinker to load plugins instead.
The odd thing though, is that there are cases where even newer SDKs experience these issues. But according to bugsnag maintainers there are "anecdotal evidence" that ReLinker also helps in these cases.
Hard to verify other than to see Bugsnag still working and see if we still get the errors.
This PR should fix several bugs:
Fixes AtB-AS/kundevendt#812
Fixes AtB-AS/mittatb-app#576
Fixes AtB-AS/kundevendt#807
Fixes AtB-AS/kundevendt#806
Fixes AtB-AS/kundevendt#1212
Fixes AtB-AS/mittatb-app#511
Fixes AtB-AS/kundevendt#1516
And
Fixes AtB-AS/kundevendt#803
Fixes AtB-AS/kundevendt#805
Fixes AtB-AS/kundevendt#808
Fixes AtB-AS/kundevendt#809
Fixes AtB-AS/mittatb-app#575
Fixes AtB-AS/kundevendt#818
Fixes AtB-AS/kundevendt#1515
Fixes AtB-AS/kundevendt#1517
And also
Fixes AtB-AS/kundevendt#1513