realm-java: Crash - didn't find class "io.realm.internal.network.NetworkStateReceiver"

Hi, with the new Realm 2.0 I am getting crash as below:

java.lang.RuntimeException: Unable to instantiate receiver io.realm.internal.network.NetworkStateReceiver: java.lang.ClassNotFoundException: Didn't find class "io.realm.internal.network.NetworkStateReceiver"

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 12
  • Comments: 52 (13 by maintainers)

Commits related to this issue

Most upvoted comments

2.0.1 has just been released fixing this bug. The network receiver is now only added if you enable Sync as well.

I could list all the technical and process difficulties involved in getting this release out the door, but in reality we just dropped the ball on this, and I’m very sorry for those of you that got affected by this. We can only strive to do better in the future.

Closing.

@Dimous Only our Mobile Platform Extension does that. Mostly because it allows us to do more intelligent error handling.

We hope to be able to ship 2.0.1 today with a fix for this, and sorry for letting such a server error slipping through 😢

Indeed we appreciate the work of the Realm team. On the other side, IMHO we should be more cautious when criticising and hurrying up a team like this whose software is open sourced for us.

Once again, thanks!

@ahmadalibaloch …man, they do know about it. Realm 2.0 has been barely out for a week, saying it hasn’t been fixed for weeks is a major exaggeration and wrong, too.

If you really actually wanted to create a quick fix for this problem in the meantime, you would have just added the missing class and released a new version of your app.

https://github.com/realm/realm-java/blob/1062d2462eaf841c215d7962dea979f65032fb5a/realm/realm-library/src/objectServer/java/io/realm/internal/network/NetworkStateReceiver.java

(I am still not an official Realm person).

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

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) {}

I also shipped an app like @shahrukhamd, and it’s horrible now. We depend on third-party libraries and expect releases to be stable and well-tested. This is critical issue and it can potentially destroy your reputation since it’s been 7 days already. Also my app now is never closed by the system since Realm listens to network changes. This is totally unacceptable. I understand you want to make money, but it should not interfere with my application in a way that changes it’s behaviour. That was the reason I dropped Firebase Crashes in favour of Fabric, since Firebase launched separate process to track crashes which is what I totally don’t want.

already fixed in releases branch. please wait a bit

I reproduced this.

conditions: syncEnabled is false. android.net.conn.CONNECTIVITY_CHANGE broadcast is fired.

The easiest way to reproduce this is to execute adb shell am broadcast -a android.net.conn.CONNECTIVITY_CHANGE