Skip to content

Datastore does not sync with Amplify Gen2 (Swift) #3974

@aneaga

Description

@aneaga

Describe the bug

I set my Swift project with Amplify Gen2, according to https://docs.amplify.aws/swift/build-a-backend/data/set-up-data/.

Would like to use Datastore to ensure smooth offline use of my app.

However, even though save/query do work with local data, syncing data with Dynamo fails. The only clue I have is

The operation couldn’t be completed. (Amplify.DataStoreError error 0.)

Steps To Reproduce

1. Set up a Swift project according to https://docs.amplify.aws/swift/build-a-backend/data/set-up-data/.
2. Add AWSDataStorePlugin 
3. Use save/query with any model

Expected behavior

I expect my data to get synced with Dynamo.

Amplify Framework Version

2.46.1

Amplify Categories

DataStore

Dependency manager

Swift PM

Swift version

6.1

CLI version

12.14.4

Xcode version

16.3

Relevant log output

Beginning sync for HouseholdTask
...
Successfully completed execution for Auth.fetchSessionAPI
....
The operation couldn’t be completed. (Amplify.DataStoreError error 0.)
...

Is this a regression?

Yes

Regression additional context

No response

Platforms

iOS

OS Version

IOS 18.2

Device

Iphone 16 Pro

Specific to simulators

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions