There's this weird exception in Samsung phones specifically Galaxy S7 Edge, which we noticed in Fabric crash reports:
Fatal Exception: java.lang.RuntimeException: Unable to instantiate receiver com.someapp: java.lang.ClassNotFoundException: Didn't find class "com.someapp" on path: DexPathList[[zip file "/data/app/com.someapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.someapp-1/lib/arm, /system/fake-libs, /data/app/com.someapp-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3331)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1734)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by java.lang.ClassNotFoundException: Didn't find class "com.someapp" on path: DexPathList[[zip file "/data/app/com.someapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.someapp-1/lib/arm, /system/fake-libs, /data/app/com.someapp-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3326)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1734)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
As a feedback from users, this error happens only when app is in the background and there's not interaction with it, I think the issue lies in the way Samsung's device rom tries to minimize background tasks or put them in a special memory and our app is not ready and this happens.
The point is the exception is not pointing to any class of the app so we can trace the issue, If anyone has encountered this problem before please help!