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

Error when trying to sync #18

Open
TBenTiCon opened this issue Apr 8, 2024 · 4 comments
Open

Error when trying to sync #18

TBenTiCon opened this issue Apr 8, 2024 · 4 comments

Comments

@TBenTiCon
Copy link

Hi =)
it seems that resyncing is currently broken.

The initial Pull works flawlessly, but as soon something is changed in the Supabase DB, this error comes up.

chunk-HONSTT2W.js?v=e7920512:246 Uncaught (in promise) Error: malformatted revision: 1-rxdbreplicationundefined-channels
    at parseRevision (chunk-HONSTT2W.js?v=e7920512:246:11)
    at createRevision (chunk-HONSTT2W.js?v=e7920512:259:51)
    at setCheckpoint (chunk-3B2ZC7DF.js?v=e7920512:256:21)
    at chunk-3B2ZC7DF.js?v=e7920512:587:66
Syncing from local to supabase, doesnt work at all.

Is there a Problem with my code, or is the a bug?
@mbeckenbach
Copy link

I'm facing the same issue. It seams to have some relation to the channel supscription

@mbeckenbach
Copy link

@TBenTiCon Looks like there is a related PR: #8

@mbeckenbach
Copy link

@TBenTiCon as written in that PR's comments the issue is that you might have a hyphen (-) in your replicationIdentifier. Replace it by something else. I did so and used an underscore. Works like a charm now.

@TBenTiCon
Copy link
Author

TBenTiCon commented Apr 28, 2024

Oh, I forgot to post my solution 😅 I've already figured out that the hyphen was the problem.

The hyphen causes rxdb to split the string wrongly and then it receives 3 (or more) instead of 2 entries in its identifier array.

The hyphen is the separator in rxdb, I don't think that this can be easily patched in rxdb-supabase.

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

2 participants