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

Version lock mmkv gradle dependency #18

Merged
merged 1 commit into from
May 2, 2024
Merged

Version lock mmkv gradle dependency #18

merged 1 commit into from
May 2, 2024

Conversation

joncardasis
Copy link
Contributor

Purpose

Recently a large number of Android devices have been unable to load the libmmkv library (java.lang.UnsatisfiedLinkError: dlopen failed: library "libmmkv.so" not found).

Last week (04/24) MMKV released v1.3.5 which dropped armv7 and x86 support. The @kesha-antonov/react-native-background-downloader package defines a wildcard version using implementation 'com.tencent:mmkv:+' which automatically grabbed this update leading to a number of Android devices in production to crash on app start.

The armv7 abi removed is for 32-bit devices with most modern devices being arm64-v8a, 64 bit arch. This PR version locks com.tencent:mmkv to v1.3.4, the last stable version with all abi support.

Deployment

By locking the mmkv version to 1.3.4 and releasing a new npm package version this will allow devices to continue with stable support. Future version of this package can then bump to 1.3.5 and beyond with the developer being able to change their @kesha-antonov/react-native-background-downloader version for their needs rather than relying on downstream resolutions.

Stacktrace
java.lang.UnsatisfiedLinkError: dlopen failed: library "libmmkv.so" not found
        at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
        at java.lang.System.loadLibrary(System.java:1661)
        at com.tencent.mmkv.MMKV.doInitialize(MMKV.java:226)
        at com.tencent.mmkv.MMKV.initialize(MMKV.java:208)
        at com.tencent.mmkv.MMKV.initialize(MMKV.java:94)
        at com.eko.RNBackgroundDownloaderModule.<init>(RNBackgroundDownloaderModule.java:172)
        at com.eko.RNBackgroundDownloaderPackage.createNativeModules(RNBackgroundDownloaderPackage.java:15)
        at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:43)
        at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42)
        at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1458)
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1429)
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1331)
        at com.facebook.react.ReactInstanceManager.lambda$runCreateReactContextOnNewThread$2(ReactInstanceManager.java:1101)
        at com.facebook.react.ReactInstanceManager.$r8$lambda$AwGS8CysOZmWJw3kRVARHQvw9Ew(Unknown)
        at com.facebook.react.ReactInstanceManager$$ExternalSyntheticLambda5.run(Unknown:4)
        at java.lang.Thread.run(Thread.java:1012)

@kesha-antonov
Copy link
Owner

Thanks!

@kesha-antonov kesha-antonov merged commit 4aac189 into kesha-antonov:main May 2, 2024
@kesha-antonov
Copy link
Owner

Released 3.1.3

@joncardasis joncardasis deleted the chore/version-lock-mmkv branch May 3, 2024 14:19
kesha-antonov pushed a commit that referenced this pull request Jul 8, 2024
fix: MediaScanner leaks fixed. DownloadTask cleaning.
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