React Native – App crashes while launching after implementing HMSCore

I tried to run our app on Android Emulator but it crashes without showing any error message. It works fine on iOS and HarmonyOS devices. It was working before. I did not change anything but it started stopping app while launching. I get this error messages on Android Studio.

 2021-06-08 12:49:25.488 5944-5944/com.xxx E/HAInstanceManager: createInstance error
2021-06-08 12:49:25.590 5944-5980/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:25.746 5944-5980/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:25.842 5944-5980/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:25.915 5944-5984/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:25.933 5944-5984/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:25.940 5944-5984/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:25.946 5944-5984/com.xxx E/HMSSDK_SystemUtils: isSystemApp Exception: android.content.pm.PackageManager$NameNotFoundException: com.huawei.appmarket
2021-06-08 12:49:25.968 5944-5944/com.xxx E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found result: 0
2021-06-08 12:49:25.972 5944-5984/com.xxx E/HMSSDK_HmsInstanceId: TokenTask failed, ErrorCode: 907135003
2021-06-08 12:49:25.974 5944-5984/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:26.660 5944-5980/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:26.661 5944-5980/com.xxx E/HMSSDK_AutoInit: Push init failed
2021-06-08 12:49:27.189 5944-5944/com.xxx E/HMSSDK_HMSPackageManager: Failed to find HMS apk
2021-06-08 12:49:27.314 5944-5944/com.xxx E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.xxx, PID: 5944
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
        at com.huawei.hms.rn.push.logger.HMSLogger.getInstance(HMSLogger.java:100)
        at com.huawei.hms.rn.push.remote.HmsPushMessageService.onTokenError(HmsPushMessageService.java:107)
        at com.huawei.hms.push.HmsMessageService.a(HmsMessageService.java:34)
        at com.huawei.hms.push.HmsMessageService.a(HmsMessageService.java:29)
        at com.huawei.hms.push.HmsMessageService.handleIntentMessage(HmsMessageService.java:7)
        at com.huawei.hms.push.HmsMessageService$a.handleMessage(HmsMessageService.java:7)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Is there anyone who faced this issue before? How can I fix this problem?

Source: Android Questions

One Reply to “React Native – App crashes while launching after implementing HMSCore”

LEAVE A COMMENT