{"record":{"id":"83478d66549f9cd7","repo":"tursodatabase/turso","slug":"unknown-turso-sync-i-o-request","errorCode":null,"errorMessage":"Unknown Turso sync I/O request.","messagePattern":"Unknown Turso sync I/O request\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"bindings/dotnet/src/Turso.Data/TursoSyncDatabase.cs","lineNumber":538,"sourceCode":"    {\n        ExceptionDispatchInfo? failure = null;\n        try\n        {\n            switch (TursoSyncBindings.GetIoKind(item))\n            {\n                case TursoSyncIoKind.None:\n                    break;\n                case TursoSyncIoKind.Http:\n                    await HandleHttpAsync(item, cancellationToken).ConfigureAwait(false);\n                    break;\n                case TursoSyncIoKind.FullRead:\n                    await HandleFullReadAsync(item, cancellationToken).ConfigureAwait(false);\n                    break;\n                case TursoSyncIoKind.FullWrite:\n                    await HandleFullWriteAsync(item, cancellationToken).ConfigureAwait(false);\n                    break;\n                default:\n                    throw new InvalidOperationException(\"Unknown Turso sync I/O request.\");\n            }\n        }\n        catch (Exception exception)\n        {\n            failure = ExceptionDispatchInfo.Capture(exception);\n            try\n            {\n                TursoSyncBindings.PoisonIo(item, RedactSecrets(exception.Message));\n            }\n            catch\n            {\n                // Preserve the I/O failure that caused poisoning.\n            }\n        }\n\n        try\n        {\n            TursoSyncBindings.CompleteIo(item);","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/tursodatabase/turso/blob/6c7252267988c76e632af00a671e4b9788dfae13/bindings/dotnet/src/Turso.Data/TursoSyncDatabase.cs#L520-L556","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    await connection.SyncAsync(ct);\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Unknown Turso sync I/O request\"))\n{\n    throw new InvalidOperationException(\"Sync I/O kind unsupported by this binding; upgrade Turso.Data and native lib together.\", ex);\n}","preventionTips":["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."],"tags":["dotnet","sync","io","version-mismatch"],"backgroundTag":"unknown-io-request-kind","analyzedSha":"6c7252267988c76e632af00a671e4b9788dfae13","analyzedAt":"2026-08-31T11:17:35.598Z","contentChangedAt":"2026-08-31T11:17:35.598Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}