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

Caused by:com.getkeepsafe.relinker.MissingLibraryException: #93

Open
jinanzhuan opened this issue Sep 7, 2021 · 7 comments
Open

Caused by:com.getkeepsafe.relinker.MissingLibraryException: #93

jinanzhuan opened this issue Sep 7, 2021 · 7 comments

Comments

@jinanzhuan
Copy link

jinanzhuan commented Sep 7, 2021

I have encountered the following problems recently, I don't know whether it is the cause of the device itself or the loading problem of ReLinker, please tell me what is wrong。Currently, the models with this problem are: 8.1, 6.0 and 10 Go。

java.lang.RuntimeException:
    at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6537)
    at android.app.ActivityThread.access$1400 (ActivityThread.java:228)
    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1891)
    at android.os.Handler.dispatchMessage (Handler.java:107)
    at android.os.Looper.loop (Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7438)
    at java.lang.reflect.Method.invoke (Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.nain (ZygoteInit.java:989)
Caused by:com.getkeepsafe.relinker.MissingLibraryException:
    at com.getkeepsafe.relinker.ApkLibraryInstaller.closeSilently (ApkLibraryInstaller.java:155)
    or                    .copy (ApkLibraryInstaller.java:155)
    or                    .findAPKWithLibrary (ApkLibraryInstaller.java:155)
    or                    .installLibrary (ApkLibraryInstaller.java:155)
    or                    .sourceDirectories (ApkLibraryInstaller.java:155)
    at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal (ReLinkerInstance.java:121)
    at com.getkeepsafe.relinker.ReLinkerInstance.access$000 (ReLinkerInstance.java:21)
    or                    .getWorkaroundLibDir (ReLinkerInstance.java:21)
    or                    .getWorkaroundLibFile (ReLinkerInstance.java:21)
    or                    .loadLibrary (ReLinkerInstance.java:21)
    or                    .log (ReLinkerInstance.java:21)
    at com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker,java:5)
    at com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:1)
    at com.hyphenate.chat.EMClient.loadLibraxy(EMClient.java:13)
    at com.hyphenate.chat.EMClient.init (EMClient.java:32)
    at com.yomobigroup.chat.im.IMSdk.updateRecallMsgToDb(IMSdk.java:360)
    at com.yomobigroup.chat.ne.login.login.im.IMLogin$Companion,init(IMLogin.java:209)
    at com.yomobigroup.chat.me.login.login.im.IMLogin.access$getNotifier$cp (IMLogin.java:2)
    at com.yomobigroup.chat.ne.login.login.im.IMLogin.access$setNotifier$cp (IMLogin.java:2)
    at com.yomobigroup,chat.ne.login.login.im.IMLogin,access$setInLoginStatus$cp(IMLogin.java:2)
    at com.yomobigroup.chat.ne.login.login.im.IMLogin.access$setCheckHelper$cp(IMLogin.java:2)
    at com.yomobigroup.chat.me.login.login.im.IMLogin.access$setLogReceivedMsg$cp (IMLogin.java:2)
    or                    .init (IMLogin.java:2)
    or                    .login (IMLogin.java:2)
    or                    .logout (IMLogin.java:2)
    or                    .update (IMLogin.java:2)
    at com.yomobigroup.chat.VshowApplication.onCreate(VshowApplication.java:237)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1189)

20210907115116

@jinanzhuan
Copy link
Author

The version is 1.3.1

@benjamin-bader
Copy link
Contributor

Thanks for the bug report.

I'm puzzled at this stack trace - haven't ever seen or lines before. Line 155 the file in version 1.3.1 doesn't exactly correspond to anything in the trace. What do those or lines mean? Where do they come from?

Also, it would help to know what the actual exception message is, if you have it. As the issue stands now, there isn't enough information to say whether or not this is a ReLinker issue or a packaging issue. Usually it's the latter, but you never know!

Finally, I'll note that we're at version 1.4.4. We've fixed a few bugs since 1.3.1 - it's worth an upgrade.

@thelou1s
Copy link

thelou1s commented Jul 5, 2022

Same problem:

image

log:

Non-fatal Exception: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'libmmkv.so'. Looked for: [armeabi-v7a, armeabi], but only found: [].
       at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java)
       at util.MmkvUtils.lambda$initialize$0(MmkvUtils.java)
       at util.-$$Lambda$MmkvUtils$sbLe1HJ9hfpxq8bb2XEO8Byn1ew.loadLibrary(-.java)
       at com.tencent.mmkv.MMKV.doInitialize(MMKV.java)
       at com.tencent.mmkv.MMKV.initialize(MMKV.java)
       at util.MmkvUtils.initialize(MmkvUtils.java)

java:

public class MmkvUtils {

    private static final String TAG = "MmkvUtils";

    private static volatile MMKV sMultiProcessMmkv;
    //private static volatile MMKV sDefaultMmkv;

    private MmkvUtils() {
    }

    public static void initialize(Context context) {
        String pathDir = context.getFilesDir().getAbsolutePath() + "/mmkv";
        String rootDir = MMKV.initialize(pathDir, libName -> {
            ReLinker.loadLibrary(context, libName);
        });
        Log.d(TAG, "initialize: " + rootDir);
    }

    public static MMKV multiProcessMmkv() {
        if (sMultiProcessMmkv == null) {
            synchronized (MmkvUtils.class) {
                if (sMultiProcessMmkv == null) {
                    ensureInitialized();
                    sMultiProcessMmkv = MMKV.mmkvWithID("MultiProcessMmkv", MMKV.MULTI_PROCESS_MODE);
                }
            }
        }
        return sMultiProcessMmkv;
    }

    private static void ensureInitialized() {
        if (TextUtils.isEmpty(MMKV.getRootDir())) {
            MMKV.initialize(AppUtils.getApp());
        }
    }

@sanyamjain-plivo
Copy link

@thelou1s I am facing the same issue, Did you find the solution?

@evgenybozhko2
Copy link

@thelou1s @benjamin-bader @jinanzhuan @sanyamjain-plivo @cahlbin Any news for this issue?

@mistletoe5215
Copy link

me2,any solutions?

@Keko2025
Copy link

Keko2025 commented Dec 1, 2023

Try this initialization approach.
image

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

No branches or pull requests

7 participants