-
Notifications
You must be signed in to change notification settings - Fork 606
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
"Uh-oh" error occurs when enabling "debug mode"— database works! #813
Comments
Are you using |
@djorkaeffalexandre thanks for the link, but I've combed through it before and couldn't find anything relevant. Can you elaborate what you mean by Synchronous Watermelon? are you referring to this? If this is indeed the problem, would it be coming from the Watermelon boilerplate that I set up, or it is more in the way that the methods are being called? Disclosure: I've taken Watermelon code from a few different projects by now |
@Tycholiz nope, I'm referring for the first item of this changelog -> https://nozbe.github.io/WatermelonDB/CHANGELOG.html?highlight=sync#new-features-3, but I've read that it'll fallback to async mode when you're debugging, so it shouldn't be the problem. |
If it works -- great! nothing to worry about. But do expect error logs, because it will be trying to call synchronous methods (but should catch the error and fall back to the glitchy and slower, but working asynchronous mode)
it's created when the database adapter is instantiated
can you elaborate? that sounds suspicious |
as we established, you're not going to get synchronous mode when doing remote debugging.
Look at Xcode logs, it'll print the path to the DB.
that looks correct. You're not making a Query, you're just getting a Collection object. |
Here is the log from Xcode when I start up the app. Unsure if any of those My current method of finding the path where my app is located is by opening up a process manager and finding the running process of my app name. It only yields one result, so I'm confident this is what I'd be looking for. I'm curious to know why there would be no |
in
no. |
yes I am running with for reference, here is my watermelon db config:
|
this is probably a dumb question, but did you look for a file named |
yes, I should have clarified that I'm only saying within the application folder, there is only: There is nothing interesting within But also interesting is that there is no Am I correct in that this should be the correct path?: |
Regarding the large complex object I pointed out earlier, I was actually mistaken of the particular instance I had meant to disclose. The object resulted from running the following code:
and here it is, truncated:
I'm not at all sure if this is supposed to be how it looks. Alas, I'm sure I could enhance the documentation if I had a better understanding of what was going on here. Interestingly, I am able to access a property on the object ( |
I think it's also interesting to point out that I Is it possible that I'm not even using SQLite, even though the objects that get logged to the console clearly show |
this indeed looks correct. see: https://github.com/Nozbe/WatermelonDB/blob/master/src/Model/index.js
Probably because Here's what I would do: https://github.com/Nozbe/WatermelonDB/blob/master/native/ios/WatermelonDB/Database.swift#L21 -- put a breakpoint here in Xcode, and run the app. You should see the debugger break at this point… and then you can inspect |
Thanks for the recommendation. I have actually decided to put offline implementation onto the backburner for now until the MVP is done, then I will revisit it. Until then, I am going to close this. Thank you all for input, and I look forward to using WatermelonDB and contributing! |
Interestingly I have been able to locate the SQLite database that WatermelonDB is creating, and I can see that records are indeed being created when I execute methods from within the app. However, when I enable "debug mode" so that I can connect to a debugger (as I normally do), I get the notorious "Uh-oh" error:
I'm unsure what to make of this issue, or if it's even has origins in WatermelonDB, but I've been able to load the app without encountering the error with different simulators, but every time I enable debug mode, the error immediately pops up
info:
"@nozbe/watermelondb": "^0.19.0",
"@nozbe/with-observables": "^1.0.5",
"react-native": "0.62.2",
xcode: 11.7
Update
Interestingly, when I go to launch an iOS simulator now, I cannot even get a database.db file in the simulator directory of my filesystem. What causes the database.db file to be created? I'm thinking that the issue lies there..
Update2
Also interesting of note is that when I query for a single item from the database, I get back a big object that has information like what tables are in my schema, but I don't get the item itself. I'm not sure if this is related, and that it is an issue related to the set up
The text was updated successfully, but these errors were encountered: