-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
Is it possible to output more info when "Assertion Failed"? #1777
Comments
One thing that would give me a little clue is if I could see what is stored on the cloud for my account. Is there a way to dump that out? Or is the a "Dashboard" website I could log into? If the problem were data-related I can try to remove that record and see if the rest works. I'll try to delete my indexedDB and put records in one at a time and see if I get a pattern. I don't have time today for that, though. |
Thanks for the log printouts - seems as the problem is related a table with compound primary keys but the keys are not arrays as expected but plain strings. This could indicate a bug in dexie-cloud. I'll see if I can reproduce the issue from your database if I get a chance tomorrow. You can export everything to a JSON file if that would help using npx dexie-cloud@latest export. Compound primary keys are stored as JSON strings and it might be a problem with that. I might get wiser after looking into your db. An admin dashboard with database and subscription management is under development as the last part before the service goes into production in the end of the summer. For now, it's only |
That is what export gives me - but did you want the contents of indexedDB instead? That is much larger. |
Here's the initialization:
And the model:
|
A little more info: I split the writes into sections and I successfully wrote all the MetaNames, Tunes, and Lists. That synced up properly. But when I went to write TuneInList it started failing. That is doing a many-to-many relationship. |
I found the issue and it's really a bug occurring when client is about to sync a table with inbound compound keys. I've released a new version with "test" tag for you to try out:
Let me know if this fixes it. Another thing I noticed is that the typings for IDs in your code are all numbers while they really should be strings ('@'-keys) and the relation table should be: export class TuneInList {
//id?: number; not there!
tuneId: string; // not number
listId: string; // not number
order: number;
constructor() {}
} Please try out the fix and let me know if everything is working properly with it. |
Yes! can confirm - it works. And I ran |
I'm trying to hook up my dexie db to the cloud and got a bunch of promising output in the console, but then I started getting assertion errors. I have no info about what to look for. Here is the entirety of the message:
On the console before that I got lines starting with
SYNC STARTED
syncIfPossible
Sync request
BroadcastedAndLocalEvent
etc...
MORE SYNC NEEDED
SYNC STARTED
New Websocket Connection
dexie-cloud WebSocket create
Error from _sync (with the same assertion error)
How do I begin to debug this?
The text was updated successfully, but these errors were encountered: