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

fix: Adds relinker for anr/ndk libarary loading on older devices #603

Merged
merged 3 commits into from
Oct 27, 2020

Conversation

mikaelbr
Copy link
Collaborator

@mikaelbr mikaelbr commented Oct 27, 2020

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

@cbrevik
Copy link
Contributor

cbrevik commented Oct 27, 2020

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

@cbrevik
Copy link
Contributor

cbrevik commented Oct 27, 2020

ReLinker is an alternative of SoLoader - but we're kind of stuck with SoLoader since that is what is implemented internally by Facebook

@cbrevik
Copy link
Contributor

cbrevik commented Oct 27, 2020

Alternatively we could go the route of forcing the 0.9 version: facebook/SoLoader#55 (comment)

@mikaelbr
Copy link
Collaborator Author

mikaelbr commented Oct 27, 2020

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.

@mikaelbr
Copy link
Collaborator Author

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.

@cbrevik
Copy link
Contributor

cbrevik commented Oct 27, 2020

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.

@mikaelbr
Copy link
Collaborator Author

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.

Copy link
Contributor

@cbrevik cbrevik left a 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

@mikaelbr mikaelbr merged commit 81d28fa into master Oct 27, 2020
@mikaelbr mikaelbr deleted the mikael/relinker branch October 27, 2020 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants