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

Fails to return database tables with Realm 2.0 #37

Closed
Dragas opened this issue Oct 19, 2016 · 7 comments
Closed

Fails to return database tables with Realm 2.0 #37

Dragas opened this issue Oct 19, 2016 · 7 comments

Comments

@Dragas
Copy link

Dragas commented Oct 19, 2016

As of the latest realm update, stetho fails to return database tables and dumps the following into the console.

D/ChromeDevtoolsServer: Method not implemented: Not implemented: Worker.enable
D/ChromeDevtoolsServer: Method not implemented: Not implemented: Timeline.enable
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.enable
D/ChromeDevtoolsServer: Method not implemented: Not implemented: Page.getNavigationHistory
D/ChromeDevtoolsServer: Method not implemented: Not implemented: Worker.setAutoconnectToWorkers
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.requestDatabaseNames
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.requestDatabaseNames
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.requestDatabaseNames
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.requestDatabaseNames
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.requestDatabaseNames
D/ChromeDevtoolsServer: Method not implemented: Not implemented: IndexedDB.requestDatabaseNames
D/ChromeDevtoolsServer: Method not implemented: Not implemented: Page.getNavigationHistory
D/ChromeDevtoolsServer: Method not implemented: Not implemented: ApplicationCache.enable
D/ChromeDevtoolsServer: Method not implemented: Not implemented: ApplicationCache.getFramesWithManifests

If stetho initialization for Realm 2.0 differs in any way from Realm 1.2, shouldn't it be mentioned in the readme.md?

@sureshjoshi
Copy link

+1

@sureshjoshi
Copy link

@Dragas Are you still running into this? Have you seen what might be causing it? I'm running into it too, and I'll start trying to debug it this weekend - but in the meantime if there is something you're running into that's obvious, it could be helpful.

@Dragas
Copy link
Author

Dragas commented Oct 21, 2016

@sureshjoshi I still am running into it, but I didn't see anything else that looked obvious. Looking into other issues, #35 seems to be related as I'm getting the same downward arrow, signaling that database was expanded, without actual tables in it. Adding name parameter hides the default.realm table.

Then again, I didn't look much into it since debugging contents of the database wasn't my project's priority. Others who upvoted this issue seem to be running into it as well.

@sureshjoshi
Copy link

sureshjoshi commented Oct 22, 2016

So, I found one problem. It's how the Realm instance is being opened (a little bit roundabout right now). However, essentially, if you have a named Realm instance, it will fail to open. If you remove the name of your database (keeping with the default.realm file) it will work.

This also poses a problem when you have multiple databases - as only one will get opened, but the data will display as the same for both.

@sureshjoshi
Copy link

@Dragas You can check out my PR to see how I got around this:

  1. Change the database params to getName() from getPath()
  2. Use only the default.realm, instead of named Realms

@cknibbe
Copy link

cknibbe commented Oct 27, 2016

+1

@zaki50
Copy link
Member

zaki50 commented Jul 19, 2017

I've released 2.1.0 that contains the fix.
I'll close this issue.

@zaki50 zaki50 closed this as completed Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants