realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

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

Open lukcz opened this issue 10 years ago • 52 comments

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"

lukcz avatar Sep 27 '16 21:09 lukcz

Did you do a Clean + Rebuild? (you should)

Do you have Instant Run disabled? (you should)

Zhuinden avatar Sep 27 '16 21:09 Zhuinden

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

zaki50 avatar Sep 28 '16 05:09 zaki50

This is reproducible.

peterbetos avatar Sep 28 '16 10:09 peterbetos

Yes, I have the same problem. Is there a way how to fix this?

mikelis-kaneps avatar Sep 28 '16 13:09 mikelis-kaneps

2.0.1 will fix it

Zhuinden avatar Sep 28 '16 13:09 Zhuinden

++;

r-cohen avatar Sep 28 '16 15:09 r-cohen

I have the same problem

mishindmitriy avatar Sep 28 '16 16:09 mishindmitriy

+1

usernotnull avatar Sep 28 '16 16:09 usernotnull

+1

smoonsf avatar Sep 29 '16 00:09 smoonsf

I have also encountered this problem

EspoirX avatar Sep 29 '16 01:09 EspoirX

already fixed in releases branch. please wait a bit

zaki50 avatar Sep 29 '16 01:09 zaki50

Same here, when can we expect 2.0.1?

christian-lyfe avatar Sep 29 '16 09:09 christian-lyfe

@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 😢

cmelchior avatar Sep 29 '16 12:09 cmelchior

+1

Domacoski avatar Sep 29 '16 20:09 Domacoski

+1

samvanderhyden avatar Sep 29 '16 21:09 samvanderhyden

Same here, when can we a bug fix release ?

GulajavaMinistudio avatar Sep 29 '16 22:09 GulajavaMinistudio

+1

ghost avatar Sep 30 '16 05:09 ghost

is there any way to prevent the crash ?

hateum avatar Sep 30 '16 15:09 hateum

Well until 2.0.1 is released, you can add a broadcast receiver by the same name in the same package and all that.

Zhuinden avatar Sep 30 '16 15:09 Zhuinden

I added this class to my project with the same package Realm and now there is no crash. https://github.com/realm/realm-java/blob/1062d2462eaf841c215d7962dea979f65032fb5a/realm/realm-library/src/objectServer/java/io/realm/internal/network/NetworkStateReceiver.java Thanks

hateum avatar Sep 30 '16 16:09 hateum