uPhyca / stetho-realm

Realm module for Stetho
Other
738 stars 114 forks source link

Not compatible with realm 2.0.0 #31

Closed dvdmunckhof closed 8 years ago

dvdmunckhof commented 8 years ago

Yesterday, a new version of Realm was released: https://realm.io/news/realm-java-2-0-mobile-platform-support/

This is not compatible and crashes the app. Stacktrace:

FATAL EXCEPTION: StethoWorker-main-206
java.lang.NoClassDefFoundError: io.realm.internal.SharedGroup
   at com.uphyca.stetho_realm.RealmPeerManager.openSharedGroupForImplicitTransactions(RealmPeerManager.java:145)
   at com.uphyca.stetho_realm.RealmPeerManager.openSharedGroupForImplicitTransactions(RealmPeerManager.java:134)
   at com.uphyca.stetho_realm.RealmPeerManager.getDatabaseTableNames(RealmPeerManager.java:57)
   at com.uphyca.stetho_realm.Database.getDatabaseTableNames(Database.java:125)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:525)
   at com.facebook.stetho.inspector.MethodDispatcher$MethodDispatchHelper.invoke(MethodDispatcher.java:96)
   at com.facebook.stetho.inspector.MethodDispatcher.dispatch(MethodDispatcher.java:67)
   at com.facebook.stetho.inspector.ChromeDevtoolsServer.handleRemoteRequest(ChromeDevtoolsServer.java:129)
   at com.facebook.stetho.inspector.ChromeDevtoolsServer.handleRemoteMessage(ChromeDevtoolsServer.java:111)
   at com.facebook.stetho.inspector.ChromeDevtoolsServer.onMessage(ChromeDevtoolsServer.java:87)
   at com.facebook.stetho.websocket.WebSocketSession$1.handleTextFrame(WebSocketSession.java:176)
   at com.facebook.stetho.websocket.WebSocketSession$1.onCompleteFrame(WebSocketSession.java:136)
   at com.facebook.stetho.websocket.ReadHandler.readLoop(ReadHandler.java:44)
   at com.facebook.stetho.websocket.WebSocketSession.handle(WebSocketSession.java:45)
   at com.facebook.stetho.websocket.WebSocketHandler.doUpgrade(WebSocketHandler.java:117)
   at com.facebook.stetho.websocket.WebSocketHandler.handleRequest(WebSocketHandler.java:83)
   at com.facebook.stetho.server.http.LightHttpServer.dispatchToHandler(LightHttpServer.java:84)
   at com.facebook.stetho.server.http.LightHttpServer.serve(LightHttpServer.java:61)
   at com.facebook.stetho.inspector.DevtoolsSocketHandler.onAccepted(DevtoolsSocketHandler.java:52)
   at com.facebook.stetho.server.ProtocolDetectingSocketHandler.onSecured(ProtocolDetectingSocketHandler.java:63)
   at com.facebook.stetho.server.SecureSocketHandler.onAccepted(SecureSocketHandler.java:33)
   at com.facebook.stetho.server.LazySocketHandler.onAccepted(LazySocketHandler.java:36)
   at com.facebook.stetho.server.LocalSocketServer$WorkerThread.run(LocalSocketServer.java:167)
yanxinmiao commented 8 years ago

i also get this problem ,how to solve ?

beiliubei commented 8 years ago

+1

zaki50 commented 8 years ago

Sorry for inconvenience.

I'm planning to release stetho-realm 2.0 for Realm-Java 2.0 or later.

Frank1234 commented 8 years ago

When do you plan to release this? Is there a temporary workaround?

zaki50 commented 8 years ago

There are no workaround since the internal structure of Realm Java 2.0 has changed.

I've started working on this. No ETA for now though..

zaki50 commented 8 years ago

I've released Stetho-Realm 2.0.0 which supports Realm Java 2.0.0.

Please update to the latest.

zaki50 commented 8 years ago

I'll close this as resolved.

If you find a problem related to this issue, feel free to reopen this.

esiek commented 8 years ago

Hi, @zaki50 I have problem when I use custom name of the database.

Realm.init(this);
RealmConfiguration config = new RealmConfiguration.Builder()
                .name(Constants.REALM_DATABASE_NAME)
                .schemaVersion(4)
                .migration(new MyMigration())
                .build(); 

Stetho show two database: default and my, but both are empty (don't show tabels structure).

zrzut ekranu 2016-10-05 o 13 27 52 1 __

When I remove name() method form my config everything is ok. I can preview my database.

jombie commented 8 years ago

I am also getting the same error. Able to view the file name but no table structure within with the new 2.0.0 version

zaki50 commented 8 years ago

thank you for reporting. I'll investigate it

jombie commented 8 years ago

Hi, Any updates on this or any way to make it working with custom names as I am using two realm files one for library and one for app.

nikiJava commented 7 years ago

Hello, zaki50, do you have any updates?

jaychang0917 commented 7 years ago

I encounter same issue with @esiek . Any update?