Skip to content

"Sliding Sync Version is Missing" Error When Client has Been Configured and Discovered Native Sliding Sync (iOS) #5421

@defaultdino

Description

@defaultdino

When creating a Matrix Client using the Swift bindings for iOS, I get an interesting issue when I attempt to do the following:

let availableSlidingSyncVersions = await client.availableSlidingSyncVersions()
AppLogger.shared.info("Available Sliding Sync versions: \(availableSlidingSyncVersions)")
let syncService = try await client.syncService().finish()
await syncService.start()

I verify that the sliding sync version list is [MatrixRustSDK.SlidingSyncVersion.native] but the try await still fails instantly, saying that "Sliding sync version is missing". I have checked the source code for this SDK and don't see anything strange about the logic that could be causing this error:

 let version = self.version.unwrap_or_else(|| client.sliding_sync_version());

 if matches!(version, Version::None) {
         return Err(crate::error::Error::SlidingSync(Box::new(Error::VersionIsMissing)));
 }

Am I doing something incorrectly? The client is authorized and built with either .discoverNative or .native when making the client:

let client = try await ClientBuilder()
        .slidingSyncVersionBuilder(versionBuilder: .discoverNative)
        ...

Note:
Our /_matrix/client/versions does contain a org.matrix.simplified_msc3575 entry under unstable_features

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