tursodatabase/turso · error · InvalidOperationException
Unknown Turso sync I/O request.
Error message
Unknown Turso sync I/O request.
What it means
The driver's sync I/O pump dispatches each queued I/O request by TursoSyncIoKind (FullRead/FullWrite handled explicitly). HandleIoItemAsync throws InvalidOperationException on any other kind, defending against I/O requests produced by a native core that the managed layer cannot service — again pointing to a binding/core mismatch or corrupt queue item.
Source
Thrown at bindings/dotnet/src/Turso.Data/TursoSyncDatabase.cs:538
{
ExceptionDispatchInfo? failure = null;
try
{
switch (TursoSyncBindings.GetIoKind(item))
{
case TursoSyncIoKind.None:
break;
case TursoSyncIoKind.Http:
await HandleHttpAsync(item, cancellationToken).ConfigureAwait(false);
break;
case TursoSyncIoKind.FullRead:
await HandleFullReadAsync(item, cancellationToken).ConfigureAwait(false);
break;
case TursoSyncIoKind.FullWrite:
await HandleFullWriteAsync(item, cancellationToken).ConfigureAwait(false);
break;
default:
throw new InvalidOperationException("Unknown Turso sync I/O request.");
}
}
catch (Exception exception)
{
failure = ExceptionDispatchInfo.Capture(exception);
try
{
TursoSyncBindings.PoisonIo(item, RedactSecrets(exception.Message));
}
catch
{
// Preserve the I/O failure that caused poisoning.
}
}
try
{
TursoSyncBindings.CompleteIo(item);View on GitHub (pinned to 6c72522679)
Solutions
- Upgrade the Turso.Data package (and bundled native library) to matching latest versions.
- Ensure only the driver's own native library is loaded — a stale turso native binary on the library path can supply unknown I/O kinds.
- If reproducible on matching versions, capture a trace and report upstream.
Defensive patterns
Strategy: try-catch
Try / catch
try
{
await connection.SyncAsync(ct);
}
catch (InvalidOperationException ex) when (ex.Message.Contains("Unknown Turso sync I/O request"))
{
throw new InvalidOperationException("Sync I/O kind unsupported by this binding; upgrade Turso.Data and native lib together.", ex);
} Prevention
- Keep the native turso library on the exact version the binding expects.
- Remove stale native binaries from the library load path.
- Upgrade bindings and native cores together.
When it happens
Trigger: ProcessOneIo/ProcessIoQueueAsync dequeues an I/O request whose kind is not FullRead/FullWrite during a sync, e.g. a native library emitting new I/O kinds unsupported by the installed .NET binding.
Common situations: Mismatched native turso library version with the .NET package; running sync workloads that exercise code paths (e.g. new I/O kinds) added after your binding version.
Related errors
- Unknown Turso sync operation state.
- Expected Turso sync result {expected}, got {actual}.
- Automatic sync is not supported for embedded replica connect
- Turso sync operations cannot be reentered from the sync HTTP
- getAllRows: exceeded ${MAX_IO_RETRIES} IO retries
AI-assisted analysis of tursodatabase/turso@6c72522679 (2026-08-31).
Data as JSON: /api/errors/83478d66549f9cd7.
Report an issue: GitHub.