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

Realm 2.0.0 Update FATAL EXCEPTION : Unable to instantiate receiver io.realm.internal.network.NetworkStateReceiver #3521

Closed
ahmadalibaloch opened this issue Sep 28, 2016 · 9 comments

Comments

@ahmadalibaloch
Copy link

ahmadalibaloch commented Sep 28, 2016

After updating to Realm 2.0.0 today this exception occurred on fresh installation (removed old app data for migration problems).

Update
After restarting the app again and again. problem vanished.

 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xyz.mobileapp, PID: 5829
 java.lang.RuntimeException: Unable to instantiate receiver io.realm.internal.network.NetworkStateReceiver: java.lang.ClassNotFoundException: Didn't find class "io.realm.internal.network.NetworkStateReceiver" on path: DexPathList[[zip file "/data/app/com.xyz.mobileapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.xyz.mobileapp-2/lib/arm, /vendor/lib, /system/lib]]
                                                                           at android.app.ActivityThread.handleReceiver(ActivityThread.java:2983)
                                                                           at android.app.ActivityThread.access$1800(ActivityThread.java:177)
                                                                           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1526)
                                                                           at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                           at android.os.Looper.loop(Looper.java:145)
                                                                           at android.app.ActivityThread.main(ActivityThread.java:5951)
                                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                                           at java.lang.reflect.Method.invoke(Method.java:372)
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
                                                                        Caused by: java.lang.ClassNotFoundException: Didn't find class "io.realm.internal.network.NetworkStateReceiver" on path: DexPathList[[zip file "/data/app/com.xyz.mobileapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.xyz.xyz-2/lib/arm, /vendor/lib, /system/lib]]
                                                                           at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                           at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                           at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                           at android.app.ActivityThread.handleReceiver(ActivityThread.java:2978)
                                                                           at android.app.ActivityThread.access$1800(ActivityThread.java:177) 
                                                                           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1526) 
                                                                           at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                           at android.os.Looper.loop(Looper.java:145) 
                                                                           at android.app.ActivityThread.main(ActivityThread.java:5951) 
                                                                           at java.lang.reflect.Method.invoke(Native Method) 
                                                                           at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) 
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) 
                                                                        Suppressed: java.lang.ClassNotFoundException: io.realm.internal.network.NetworkStateReceiver
                                                                           at java.lang.Class.classForName(Native Method)
                                                                           at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                           at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                           at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                                ... 11 more
                                                                        Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
@christholey
Copy link

The same here. After a fresh install (Run...) via Android Studio the error occurs at app's startup.
But it doesn't when I (re)start the app from the Android launcher.

@Zhuinden
Copy link
Contributor

Duplicate of #3505

Will be fixed in 2.0.1

@r-cohen
Copy link

r-cohen commented Sep 28, 2016

+1

1 similar comment
@usernotnull
Copy link

+1

@zaki50
Copy link
Contributor

zaki50 commented Sep 28, 2016

I'll close this as a duplicate.
We'll keep track this in #3505.

We treat this as a critical issue.
We'll release 2.0.1 ASAP.

@ablack13
Copy link

ablack13 commented Oct 4, 2016

+1

@ahmadalibaloch
Copy link
Author

Where is the Realm team sleeping. Recently the have been boasting to release new features and this fatal bug is not resolved after weeks 👎

@pc-bszabo
Copy link

Quick and dirty solution : put this into your launcher activity OR Application=>

try {
getApplicationContext().getPackageManager().setComponentEnabledSetting(new ComponentName("your.package.name","io.realm.internal.network.NetworkStateReceiver"), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
} catch (Exception e) {}

@Zhuinden
Copy link
Contributor

Zhuinden commented Oct 5, 2016

Fixed in 2.0.1 release

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants