Skip to content

Capacitor iOS crashes on line_binary payloads with Error in reading buffer #904

@swhitt

Description

@swhitt

I think this is a bug in the PowerSync Capacitor path on iOS.

Sync fails with:

Run: failed(message: "Error in reading buffer")

I traced line_binary payloads getting passed into control() in SqliteBucketStorage.ts#L366
which calls:

tx.executeRaw('SELECT powersync_control(?, ?)', [op, payload])

In this specific case the params look like:

["line_binary", Uint8Array(...)]

PowerSync side:

Capacitor SQLite iOS side:

I think the fix probably belongs in PowerSync, at the Capacitor/native boundary. Normalizing Uint8Array before passing it into SQLite on iOS fixes it locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions