You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using syncShapeToTable, the initial sync request uses the correct offset 0_inf. However, on subsequent loads—when the client's database already exists—the offset becomes undefined_undefined, causing the sync process to abort without any retries.
Details
Error Message:
FetchError: HTTP Error 400 at x://x?columns=id%2Cnote%2Cuser_id%2Ccreated_at&handle=59017170-1739512915570&offset=undefined_undefined&table=notes: {"message":"Invalid request","errors":{"offset":["has invalid format"]}}
The issue occurs on the second load, during the resume of sync when the client's database already exists.
Clearing browser data or resetting the Electric backend cache does not resolve the problem.
Changing the useCopy property (both true and false) does not affect the behavior.
Manually replacing undefined_undefined with a value like 0_0 results in primary key constraint violations, which suggests the root of the issue lies in the syncShapeToTable implementation.
Request for Assistance
Any guidance on the next steps to trace and resolve this issue would be greatly appreciated. Additionally, including source maps in the npm package would significantly ease debugging.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Bug Report:
syncShapeToTable
Offset IssueSummary
When using
syncShapeToTable
, the initial sync request uses the correct offset0_inf
. However, on subsequent loads—when the client's database already exists—the offset becomesundefined_undefined
, causing the sync process to abort without any retries.Details
Error Message:
Electric Backend Log:
Observations
useCopy
property (bothtrue
andfalse
) does not affect the behavior.undefined_undefined
with a value like0_0
results in primary key constraint violations, which suggests the root of the issue lies in thesyncShapeToTable
implementation.Request for Assistance
Any guidance on the next steps to trace and resolve this issue would be greatly appreciated. Additionally, including source maps in the npm package would significantly ease debugging.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions