uPhyca / stetho-realm

Realm module for Stetho
Other
738 stars 114 forks source link

Fatal exception when a Realm database expands in Chrome #49

Open misa opened 7 years ago

misa commented 7 years ago
compile 'com.facebook.stetho:stetho:1.4.1'
compile 'com.uphyca:stetho_realm:2.0.0'

Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                        .build());

Chrome message: "Detached from target"

LogCat:

java.lang.NoSuchMethodError: io.realm.RealmConfiguration$Builder.<init>
 at com.uphyca.stetho_realm.RealmPeerManager.openSharedRealm(RealmPeerManager.java:135)
 at com.uphyca.stetho_realm.RealmPeerManager.openSharedRealm(RealmPeerManager.java:128)
 at com.uphyca.stetho_realm.RealmPeerManager.getDatabaseTableNames(RealmPeerManager.java:55)
 at com.uphyca.stetho_realm.Database.getDatabaseTableNames(Database.java:124)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:515)
 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)
teeeeeegz commented 7 years ago

@misa Don't forget to call Realm.init(); beforehand!