Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataStore is not syncing on watchOS #3220

Closed
depthzadmin opened this issue Sep 13, 2023 · 39 comments
Closed

DataStore is not syncing on watchOS #3220

depthzadmin opened this issue Sep 13, 2023 · 39 comments
Assignees
Labels
bug Something isn't working datastore Issues related to the DataStore category follow up Requires follow up from maintainers

Comments

@depthzadmin
Copy link

Describe the bug

I created a small test Xcode project that uses the same code on the phone and the watch. Using DataStore on the phone works for syncing contents of a model (including create, delete, and query). Running this same code on a watch does not sync the data created by the phone.

Attached is the Xcode project.

AmpWatch.zip

Steps To Reproduce

* Download the attached AmpWatch.zip file to get the Xcode project
* Expand the zip file
* Create an Amplify app by using the model in AmpWatch/amplify/generated/models
* Setup Amplify in the Xcode project
* Open the Xcode project
* Run the Xcode project on the phone and tap the Create button to create model data
* Tap on the Query button to verify the data
* Run the Xcode project on a watch
* Tap on the Query button and see that the data is not synced

Expected behavior

Data added to DataStore on the phone should be synced to the watch

(see the log output below for the output from the Xcode console)

Amplify Framework Version

2.17.1

Amplify Categories

DataStore

Dependency manager

Swift PM

Swift version

5.8

CLI version

12.2.5

Xcode version

14.3.1 (14E300b)

Relevant log output

Finding on phone start:
finished startSession
start configureAmplify
2023-09-12 15:10:41.992073-0700 AmpWatch[845:171545] [Amplify] Adding plugin: AWSDataStorePlugin.AWSDataStorePlugin)
activationDidCompleteWith
2023-09-12 15:10:41.993580-0700 AmpWatch[845:171922] [WC] Application context data is nil
2023-09-12 15:10:42.034530-0700 AmpWatch[845:171925] [WC] Application context data is nil
2023-09-12 15:10:42.035572-0700 AmpWatch[845:171545] [Amplify] Adding plugin: <AWSAPIPlugin.AWSAPIPlugin: 0x281160e40>)
2023-09-12 15:10:42.035889-0700 AmpWatch[845:171545] [Amplify] Configuring
2023-09-12 15:10:42.035920-0700 AmpWatch[845:171545] [Amplify] Configuration: nil
2023-09-12 15:10:42.046419-0700 AmpWatch[845:171545] [API<AWSAPIPlugin.AWSAPIPlugin: 0x281160e40>] Configure finished
2023-09-12 15:10:42.049353-0700 AmpWatch[845:171545] [Amplify] Successfully initialized Amplify
Successfully initialized Amplify
2023-09-12 15:10:42.136608-0700 AmpWatch[845:171925] [DataStoreSQLiteStorageEngineAdapter] Initializing database connection: /private/var/mobile/Containers/Data/Application/0DB43958-5F2A-43B2-8E76-956E76E74543/Documents/AmpWatch.db
2023-09-12 15:10:42.140249-0700 AmpWatch[845:171925] [DataStoreSQLiteStorageEngineAdapter] Setting up 3 models
2023-09-12 15:10:42.141614-0700 AmpWatch[845:171925] [DataStoreSQLiteStorageEngineAdapter] Setting up 2 models
2023-09-12 15:10:42.146764-0700 AmpWatch[845:171925] [DataStoreSQLiteMutationSyncMetadataMigrationDelegate] Checking MutationSyncMetadata records, SQL: select (select count(1) as count from MutationSyncMetadata) as allRecords,
(select count(1) as count from MutationSyncMetadata where id like '%|%') as newKeys
2023-09-12 15:10:42.147125-0700 AmpWatch[845:171925] [DataStoreSQLiteMutationSyncMetadataMigrationDelegate] No MutationSyncMetadata migration needed.
2023-09-12 15:10:42.190730-0700 AmpWatch[845:171925] [DataStoreRemoteSyncEngine] pauseSubscriptions()
2023-09-12 15:10:42.190791-0700 AmpWatch[845:171925] [DataStoreRemoteSyncEngine] pauseMutations()
2023-09-12 15:10:42.190925-0700 AmpWatch[845:171925] [DataStoreRemoteSyncEngine] clearStateOutgoingMutations(storageAdapter:)
2023-09-12 15:10:42.194194-0700 AmpWatch[845:171925] [DataStoreRemoteSyncEngine] [InitializeSubscription] initializeSubscriptions(api:storageAdapter:)
2023-09-12 15:10:42.198145-0700 AmpWatch[845:171922] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [3B10A7F4-1C87-4F52-B3CF-182C71532396] - Try [1/1]
2023-09-12 15:10:42.198239-0700 AmpWatch[845:171920] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [FF6865C6-6F04-424D-B763-687C736FA9A4] - Try [1/1]
2023-09-12 15:10:42.198289-0700 AmpWatch[845:171926] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [4B67B7E4-34A3-4C91-9F14-D71DA6C2756E] - Try [1/1]
2023-09-12 15:10:42.198684-0700 AmpWatch[845:171925] [DataStoreIncomingAsyncSubscriptionEventToAnyModelMapper] Received subscription: PassthroughSubject
2023-09-12 15:10:42.200351-0700 AmpWatch[845:171925] [DataStoreIncomingAsyncSubscriptionEventToAnyModelMapper] Received subscription: PassthroughSubject
2023-09-12 15:10:42.200525-0700 AmpWatch[845:171928] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [EAC052CB-5206-44D3-9C1D-7A9324072A44] - Try [1/1]
2023-09-12 15:10:42.200637-0700 AmpWatch[845:171925] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [5B2DC8D0-E481-4E8A-9F9B-BAB92490BD9F] - Try [1/1]
2023-09-12 15:10:42.200728-0700 AmpWatch[845:171925] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [5AFD1245-4F71-4C71-90C2-647462DAFAB5] - Try [1/1]
2023-09-12 15:10:42.241077-0700 AmpWatch[845:171926] [RealtimeConnectionProvider] Status: inProgress. Connectivity status: satisfied
2023-09-12 15:10:43.207217-0700 AmpWatch[845:171924] [RealtimeConnectionProvider] WebsocketDidConnect, sending init message
2023-09-12 15:10:43.207405-0700 AmpWatch[845:171924] [RealtimeConnectionProvider] Starting stale connection timer for 300.0s
2023-09-12 15:10:43.301563-0700 AmpWatch[845:171919] [RealtimeConnectionProvider] received connectionAck
2023-09-12 15:10:43.301805-0700 AmpWatch[845:171938] [AppSyncSubscriptionConnection]: Connection connected, start subscription C0CC4C86-8C1A-477C-A21A-69920891037B.
2023-09-12 15:10:43.302052-0700 AmpWatch[845:171938] [AppSyncSubscriptionConnection]: Connection connected, start subscription A9A15C6A-C3E4-40E7-AB46-9A891AEBBFC5.
2023-09-12 15:10:43.302151-0700 AmpWatch[845:171938] [AppSyncSubscriptionConnection]: Connection connected, start subscription 5B57922E-AE9F-4E09-BF9B-2E0A0DF08C7E.
2023-09-12 15:10:43.302211-0700 AmpWatch[845:171938] [AppSyncSubscriptionConnection]: Connection connected, start subscription 041BA65F-38D6-4662-A403-0D57533019C8.
2023-09-12 15:10:43.302261-0700 AmpWatch[845:171938] [AppSyncSubscriptionConnection]: Connection connected, start subscription 7E764E01-B607-4F60-BE75-E7FB8FD5D14E.
2023-09-12 15:10:43.302321-0700 AmpWatch[845:171938] [AppSyncSubscriptionConnection]: Connection connected, start subscription 0875268E-29F3-4BE2-BC36-52D73366D7BD.
2023-09-12 15:10:43.529733-0700 AmpWatch[845:171924] [DataStoreIncomingAsyncSubscriptionEventToAnyModelMapper] connectionState now connected
2023-09-12 15:10:43.716122-0700 AmpWatch[845:171924] [DataStoreIncomingAsyncSubscriptionEventToAnyModelMapper] connectionState now connected
2023-09-12 15:10:43.724304-0700 AmpWatch[845:171924] [DataStoreRemoteSyncEngine] [InitializeSubscription.6] performInitialSync()
2023-09-12 15:10:43.733542-0700 AmpWatch[845:171924] [DataStoreAWSInitialSyncOrchestrator] Beginning initial sync
2023-09-12 15:10:43.738586-0700 AmpWatch[845:171922] [DataStoreInitialSyncOperation] Beginning sync for Test
2023-09-12 15:10:43.746439-0700 AmpWatch[845:171924] [APIRetryableGraphQLOperation<PaginatedList<AnyModel>>] [991A4799-8BEC-4351-8C87-E63774E7FE8A] - Try [1/1]
2023-09-12 15:10:43.749732-0700 AmpWatch[845:171922] [APIAPICategory] Starting query 918DF420-A4E3-4892-B899-51CE867BDEED
2023-09-12 15:10:43.750135-0700 AmpWatch[845:171924] [APIAPICategory] Starting network task for query 918DF420-A4E3-4892-B899-51CE867BDEED
2023-09-12 15:10:44.361134-0700 AmpWatch[845:171925] [APIRetryableGraphQLOperation<PaginatedList<AnyModel>>] [Operation 991A4799-8BEC-4351-8C87-E63774E7FE8A] - Success
2023-09-12 15:10:44.373019-0700 AmpWatch[845:171924] [DataStoreInitialSyncOperation] Beginning sync for User
2023-09-12 15:10:44.373597-0700 AmpWatch[845:171924] [APIRetryableGraphQLOperation<PaginatedList<AnyModel>>] [926FDD04-ABAF-4BB0-822A-2B1EA506B18A] - Try [1/1]
2023-09-12 15:10:44.373703-0700 AmpWatch[845:171924] [APIAPICategory] Starting query 2F2D5A23-0CD9-4FC2-9382-31BAE62E8796
2023-09-12 15:10:44.373874-0700 AmpWatch[845:171924] [APIAPICategory] Starting network task for query 2F2D5A23-0CD9-4FC2-9382-31BAE62E8796
2023-09-12 15:10:44.375380-0700 AmpWatch[845:171938] [DataStoreReconcileAndLocalSaveOperation] total time: 0.0097065s
2023-09-12 15:10:44.779707-0700 AmpWatch[845:171938] [APIRetryableGraphQLOperation<PaginatedList<AnyModel>>] [Operation 926FDD04-ABAF-4BB0-822A-2B1EA506B18A] - Success
2023-09-12 15:10:44.787404-0700 AmpWatch[845:171919] [DataStoreRemoteSyncEngine] Successfully finished sync
2023-09-12 15:10:44.787581-0700 AmpWatch[845:171919] [DataStoreRemoteSyncEngine] activateCloudSubscriptions()
2023-09-12 15:10:44.787782-0700 AmpWatch[845:171924] [DataStoreRemoteSyncEngine] startMutationQueue(api:mutationEventPublisher:reconciliationQueue:)
2023-09-12 15:10:44.790266-0700 AmpWatch[845:171938] [DataStoreReconcileAndLocalSaveOperation] total time: 0.010268209s
2023-09-12 15:10:44.790958-0700 AmpWatch[845:171938] [DataStoreRemoteSyncEngine] RemoteSyncEngine SyncEngineActive


Finding on phone query:
[AmpWatch.User(id: "1FB8A9A0-4484-4A7D-818E-9E75F8D129B2", email: Optional("user0 bytes"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 21:59:58 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 21:59:58 +0000))), AmpWatch.User(id: "FE2BC3EF-1B21-49FB-AB1C-A9F8BBFCDDBB", email: Optional("user2023-09-07 22:00:49 +0000"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 22:00:49 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 22:00:49 +0000))), AmpWatch.User(id: "B56D97B8-AE5F-461E-AE2C-3180458FD94B", email: Optional("user 2023-09-09 18:20:34 +0000"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-09 18:20:34 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-09 18:20:34 +0000))), AmpWatch.User(id: "44ce06a8-76ce-4ec8-b69d-bad5aebc1a25", email: Optional("user1"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 15:11:43 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 15:11:43 +0000))), AmpWatch.User(id: "0E1BEF12-D43B-45CB-B118-988D1F75F554", email: Optional("user2"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-05 22:42:20 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-05 22:43:22 +0000)))]
Optional("5 users\n\nuser0 bytes\nuser2023-09-07 22:00:49 +0000\nuser 2023-09-09 18:20:34 +0000\nuser1\nuser2\n")
queryUsers success


Finding on watch start;
finished startSession
start configureAmplify
2023-09-12 15:13:53.088041-0700 AmpWatch Watch App[1730:2076092] [Amplify] Adding plugin: AWSDataStorePlugin.AWSDataStorePlugin)
activationDidCompleteWith
2023-09-12 15:13:53.133375-0700 AmpWatch Watch App[1730:2076278] [WC] Application context data is nil
2023-09-12 15:13:53.151555-0700 AmpWatch Watch App[1730:2076092] [Amplify] Adding plugin: <AWSAPIPlugin.AWSAPIPlugin: 0x16e931e0>)
2023-09-12 15:13:53.154775-0700 AmpWatch Watch App[1730:2076092] [Amplify] Configuring
2023-09-12 15:13:53.155043-0700 AmpWatch Watch App[1730:2076092] [Amplify] Configuration: nil
2023-09-12 15:13:53.219520-0700 AmpWatch Watch App[1730:2076092] [API<AWSAPIPlugin.AWSAPIPlugin: 0x16e931e0>] Configure finished
2023-09-12 15:13:53.264712-0700 AmpWatch Watch App[1730:2076092] [Amplify] Successfully initialized Amplify
Successfully initialized Amplify
2023-09-12 15:13:53.444422-0700 AmpWatch Watch App[1730:2076280] [WC] Application context data is nil
2023-09-12 15:13:53.875890-0700 AmpWatch Watch App[1730:2076281] [DataStoreSQLiteStorageEngineAdapter] Initializing database connection: /private/var/mobile/Containers/Data/Application/09FA073E-DA97-47F5-A7A4-885A72A13208/Documents/AmpWatch Watch App.db
2023-09-12 15:13:53.900655-0700 AmpWatch Watch App[1730:2076281] [DataStoreSQLiteStorageEngineAdapter] Setting up 3 models
2023-09-12 15:13:53.912017-0700 AmpWatch Watch App[1730:2076281] [DataStoreSQLiteStorageEngineAdapter] Setting up 2 models
2023-09-12 15:13:53.925019-0700 AmpWatch Watch App[1730:2076281] [DataStoreSQLiteMutationSyncMetadataMigrationDelegate] Checking MutationSyncMetadata records, SQL: select (select count(1) as count from MutationSyncMetadata) as allRecords,
(select count(1) as count from MutationSyncMetadata where id like '%|%') as newKeys
2023-09-12 15:13:53.927256-0700 AmpWatch Watch App[1730:2076281] [DataStoreSQLiteMutationSyncMetadataMigrationDelegate] No MutationSyncMetadata migration needed.
2023-09-12 15:13:54.258310-0700 AmpWatch Watch App[1730:2076281] [DataStoreRemoteSyncEngine] pauseSubscriptions()
2023-09-12 15:13:54.258845-0700 AmpWatch Watch App[1730:2076281] [DataStoreRemoteSyncEngine] pauseMutations()
2023-09-12 15:13:54.260357-0700 AmpWatch Watch App[1730:2076281] [DataStoreRemoteSyncEngine] clearStateOutgoingMutations(storageAdapter:)
2023-09-12 15:13:54.368052-0700 AmpWatch Watch App[1730:2076281] [DataStoreRemoteSyncEngine] [InitializeSubscription] initializeSubscriptions(api:storageAdapter:)
2023-09-12 15:13:54.420338-0700 AmpWatch Watch App[1730:2076281] [DataStoreIncomingAsyncSubscriptionEventToAnyModelMapper] Received subscription: PassthroughSubject
2023-09-12 15:13:54.434068-0700 AmpWatch Watch App[1730:2076281] [DataStoreIncomingAsyncSubscriptionEventToAnyModelMapper] Received subscription: PassthroughSubject
2023-09-12 15:13:54.438724-0700 AmpWatch Watch App[1730:2076293] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [060E52A5-ABDC-40A8-AB6B-9F0F3F2CDBA8] - Try [1/1]
2023-09-12 15:13:54.439029-0700 AmpWatch Watch App[1730:2076281] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [2B42BD91-C60D-4D79-9731-962A3247C786] - Try [1/1]
2023-09-12 15:13:54.448119-0700 AmpWatch Watch App[1730:2076281] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [C522C184-04E1-44A0-985E-887B38DC10F4] - Try [1/1]
2023-09-12 15:13:54.448227-0700 AmpWatch Watch App[1730:2076293] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [D9220F74-713F-4DF9-91F4-0CC2C79657EE] - Try [1/1]
2023-09-12 15:13:54.448707-0700 AmpWatch Watch App[1730:2076281] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [C5D29EF9-9A1A-4B74-8864-5FE3FD640A52] - Try [1/1]
2023-09-12 15:13:54.463619-0700 AmpWatch Watch App[1730:2076293] [APIRetryableGraphQLSubscriptionOperation<MutationSync<AnyModel>>] [A4F8A998-DA5B-4EAF-9D30-5D178862A83C] - Try [1/1]
2023-09-12 15:13:54.721790-0700 AmpWatch Watch App[1730:2076285] [WC] Application context data is nil
sessionReachabilityDidChange isReachable
true
2023-09-12 15:13:55.047721-0700 AmpWatch Watch App[1730:2076276] [WC] Application context data is nil
2023-09-12 15:13:55.103579-0700 AmpWatch Watch App[1730:2076293] [RealtimeConnectionProvider] Status: inProgress. Connectivity status: unsatisfied


Finding on watch query:
sessionReachabilityDidChange isReachable
true
2023-09-12 15:14:27.844558-0700 AmpWatch Watch App[1730:2076280] [WC] Application context data is nil
2023-09-12 15:14:27.856251-0700 AmpWatch Watch App[1730:2076280] [WC] Application context data is nil
[]
Optional("0 users\n\n")
queryUsers success

Is this a regression?

No

Regression additional context

No response

Platforms

watchOS

OS Version

watchOS 9.6.1

Device

Apple Watch Series 4

Specific to simulators

No response

Additional context

No response

@ruisebas ruisebas added datastore Issues related to the DataStore category pending-triage Issue is pending triage labels Sep 13, 2023
@atierian
Copy link
Member

Thanks for opening this issue @depthzadmin and including a repro project!
We'll investigate and get back to you with any updates.

@atierian atierian added the bug Something isn't working label Sep 18, 2023
@ruisebas ruisebas removed the pending-triage Issue is pending triage label Sep 21, 2023
@depthzadmin
Copy link
Author

I tested with Amplify 2.18.1 and the watch still does not sync. Here is the startup details:

objc[730]: Class _TtC6SQLite6Backup is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x792ce2fc) and /private/var/containers/Bundle/Application/7CEB5CCA-3243-4652-9EE7-378E1677C276/AmpWatch Watch App.app/AmpWatch Watch App (0x6c80e94). One of the two will be used. Which one is undefined.
objc[730]: Class _TtC6SQLite10Connection is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x7be97268) and /private/var/containers/Bundle/Application/7CEB5CCA-3243-4652-9EE7-378E1677C276/AmpWatch Watch App.app/AmpWatch Watch App (0x6c81028). One of the two will be used. Which one is undefined.
objc[730]: Class _TtC6SQLite9Statement is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x7be97100) and /private/var/containers/Bundle/Application/7CEB5CCA-3243-4652-9EE7-378E1677C276/AmpWatch Watch App.app/AmpWatch Watch App (0x6c81128). One of the two will be used. Which one is undefined.
objc[730]: Class _TtC6SQLite13DateFunctions is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x792ce2a0) and /private/var/containers/Bundle/Application/7CEB5CCA-3243-4652-9EE7-378E1677C276/AmpWatch Watch App.app/AmpWatch Watch App (0x6c818e0). One of the two will be used. Which one is undefined.
objc[730]: Class _TtC6SQLite12TableBuilder is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x792ce058) and /private/var/containers/Bundle/Application/7CEB5CCA-3243-4652-9EE7-378E1677C276/AmpWatch Watch App.app/AmpWatch Watch App (0x6c81b10). One of the two will be used. Which one is undefined.
finished startSession
start configureAmplify
activationDidCompleteWith
Successfully initialized Amplify
sessionReachabilityDidChange isReachable
true
[]
Optional("0 users\n\n")
queryUsers success

@atierian atierian self-assigned this Sep 26, 2023
@atierian
Copy link
Member

Thanks for testing with the most recent version and for your patience while we continue to investigate.

@atierian
Copy link
Member

@depthzadmin can you please paste the contents of your schema.graphql file here?
You can find it under amplify/backend/api/ampwatch/schema.graphql. Thanks!

@lawmicha
Copy link
Contributor

Does the watch app have network connectivity? In the latest logs, do you still see "Connectivity status: unsatisfied"?

This log is coming from AppSyncRealTimeClient. DataStore uses APIPlugin, which uses AppSyncRealTimeClient, which uses https://developer.apple.com/documentation/network/nwpathmonitor . I suspect because it detected that no network is available, so DataStore is waiting for the subscribe callback to fire and the sync process is stalled because of it

@depthzadmin
Copy link
Author

The watch app does have network connectivity. When using the reproduction Xcode project, you can verify connectivity by tapping on the button "URL" which makes an http call, or tap the button "Device" to make a message send to the associated phone app.

@depthzadmin
Copy link
Author

Here is the schema.graphql contents:

type User @model @auth(rules: [{allow: public}]) {
id: ID!
email: String
Tests: [Test] @hasmany(indexName: "byUser", fields: ["id"])
}

type Test @model @auth(rules: [{allow: public}]) {
id: ID!
test: String
userID: ID! @index(name: "byUser")
}

@atierian
Copy link
Member

Thanks @depthzadmin. I'm not able to reproduce what you're experiencing with the project you provided. Could it be that you didn't enable conflict detection in Amplify CLI while adding API (GraphQL)?

If that's not the issue, please enable verbose logging and paste the logs here to help us identify the difference.

Amplify.Logging.logLevel = .verbose

Thanks!

@atierian atierian added the pending-community-response Issue is pending response from the issue requestor label Sep 27, 2023
@depthzadmin
Copy link
Author

Attached is a screenshot from Amplify Studio showing conflict resolution enabled.

Note that the same code is run on the watch that runs on the phone. The phone does sync but not the watch.

Screenshot Conflict Resolution

@depthzadmin
Copy link
Author

Here is the verbose log for both the watch and the phone.

WATCH:
objc[1024]: Class _TtC6SQLite6Backup is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x792ce2fc) and /private/var/containers/Bundle/Application/FA4F9290-DFD1-4505-ACC9-B25A0F12478F/AmpWatch Watch App.app/AmpWatch Watch App (0x285ce94). One of the two will be used. Which one is undefined.
objc[1024]: Class _TtC6SQLite10Connection is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x7be97268) and /private/var/containers/Bundle/Application/FA4F9290-DFD1-4505-ACC9-B25A0F12478F/AmpWatch Watch App.app/AmpWatch Watch App (0x285d028). One of the two will be used. Which one is undefined.
objc[1024]: Class _TtC6SQLite9Statement is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x7be97100) and /private/var/containers/Bundle/Application/FA4F9290-DFD1-4505-ACC9-B25A0F12478F/AmpWatch Watch App.app/AmpWatch Watch App (0x285d128). One of the two will be used. Which one is undefined.
objc[1024]: Class _TtC6SQLite13DateFunctions is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x792ce2a0) and /private/var/containers/Bundle/Application/FA4F9290-DFD1-4505-ACC9-B25A0F12478F/AmpWatch Watch App.app/AmpWatch Watch App (0x285d8e0). One of the two will be used. Which one is undefined.
objc[1024]: Class _TtC6SQLite12TableBuilder is implemented in both /System/Library/PrivateFrameworks/LinkServices.framework/LinkServices (0x792ce058) and /private/var/containers/Bundle/Application/FA4F9290-DFD1-4505-ACC9-B25A0F12478F/AmpWatch Watch App.app/AmpWatch Watch App (0x285db10). One of the two will be used. Which one is undefined.
finished startSession
start configureAmplify
activationDidCompleteWith
Successfully initialized Amplify
sessionReachabilityDidChange isReachable
true
[]
Optional("0 users\n\n")
queryUsers success

PHONE:
finished startSession
start configureAmplify
Adding plugin: AWSDataStorePlugin.AWSDataStorePlugin)
activationDidCompleteWith
Adding plugin: <AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>)
Configuring
Configuration: nil
Application context data is nil
Application context data is nil
Successfully initialized Amplify
Configure finished
Successfully initialized Amplify
Initializing database connection: /private/var/mobile/Containers/Data/Application/CCE3A260-6820-4A60-ACC2-9DF45EB58579/Documents/AmpWatch.db
pragma auto_vacuum = full;
pragma encoding = "utf-8";
pragma foreign_keys = on;
pragma case_sensitive_like = off;
Initialized /private/var/mobile/Containers/Data/Application/CCE3A260-6820-4A60-ACC2-9DF45EB58579/Documents/AmpWatch.db
Setting up 3 models
create table if not exists "ModelSyncMetadata" (
"id" text primary key not null,
"lastSync" integer
);
create table if not exists "MutationEvent" (
"id" text primary key not null,
"createdAt" text not null,
"graphQLFilterJSON" text,
"inProcess" integer not null,
"json" text not null,
"modelId" text not null,
"modelName" text not null,
"mutationType" text not null,
"version" integer
);
create table if not exists "MutationSyncMetadata" (
"id" text primary key not null,
"deleted" integer not null,
"lastChangedAt" integer not null,
"version" integer not null
);
Setting up 2 models
create table if not exists "Test" (
"id" text primary key not null,
"createdAt" text,
"test" text,
"updatedAt" text,
"userID" text not null
);
create table if not exists "User" (
"id" text primary key not null,
"createdAt" text,
"email" text,
"updatedAt" text
);
create index if not exists "byUser" on "Test" ("userID");
BEGIN DEFERRED TRANSACTION
Checking MutationSyncMetadata records, SQL: select (select count(1) as count from MutationSyncMetadata) as allRecords,
(select count(1) as count from MutationSyncMetadata where id like '%|%') as newKeys
select (select count(1) as count from MutationSyncMetadata) as allRecords,
(select count(1) as count from MutationSyncMetadata where id like '%|%') as newKeys
select (select count(1) as count from MutationSyncMetadata) as allRecords,
(select count(1) as count from MutationSyncMetadata where id like '%|%') as newKeys
No MutationSyncMetadata migration needed.
COMMIT TRANSACTION
Initialized
init(eventSource:)
New state: notInitialized
Initialized
respond(to:): notInitialized
Notifying: initialized
resolve(notInitialized, initialized) -> stopped
New state: stopped
respond(to:): stopped
New state: notStarted
respond(to:): notStarted
Notifying: receivedStart
resolve(notStarted, receivedStart) -> pausingSubscriptions
New state: pausingSubscriptions
respond(to:): pausingSubscriptions
pauseSubscriptions()
Notifying: pausedSubscriptions
resolve(pausingSubscriptions, pausedSubscriptions) -> pausingMutationQueue
New state: pausingMutationQueue
respond(to:): pausingMutationQueue
pauseMutations()
stopSyncingToCloud(_:)
Notifying: receivedStop((Function))
resolve(stopped, receivedStop((Function))) -> stopping((Function))
New state: stopping((Function))
respond(to:): stopping((Function))
doStop(completion:)
doStopWithoutNotifyingStateMachine()
Notifying: doneStopping
resolve(stopping((Function)), doneStopping) -> stopped
New state: stopped
Notifying: pausedMutationQueue(AWSDataStorePlugin.SQLiteStorageEngineAdapter)
resolve(pausingMutationQueue, pausedMutationQueue(AWSDataStorePlugin.SQLiteStorageEngineAdapter)) -> clearingStateOutgoingMutations(AWSDataStorePlugin.SQLiteStorageEngineAdapter)
New state: clearingStateOutgoingMutations(AWSDataStorePlugin.SQLiteStorageEngineAdapter)
respond(to:): stopped
respond(to:): clearingStateOutgoingMutations(AWSDataStorePlugin.SQLiteStorageEngineAdapter)
clearStateOutgoingMutations(storageAdapter:)
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."graphQLFilterJSON" as "graphQLFilterJSON",
"root"."inProcess" as "inProcess", "root"."json" as "json", "root"."modelId" as "modelId",
"root"."modelName" as "modelName", "root"."mutationType" as "mutationType", "root"."version" as "version"
from "MutationEvent" as "root"
where 1 = 1
and "root"."inProcess" = 1
order by "root"."createdAt" asc
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."graphQLFilterJSON" as "graphQLFilterJSON",
"root"."inProcess" as "inProcess", "root"."json" as "json", "root"."modelId" as "modelId",
"root"."modelName" as "modelName", "root"."mutationType" as "mutationType", "root"."version" as "version"
from "MutationEvent" as "root"
where 1 = 1
and "root"."inProcess" = 1
order by "root"."createdAt" asc
Notifying: clearedStateOutgoingMutations(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.SQLiteStorageEngineAdapter)
resolve(clearingStateOutgoingMutations(AWSDataStorePlugin.SQLiteStorageEngineAdapter), clearedStateOutgoingMutations(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.SQLiteStorageEngineAdapter)) -> initializingSubscriptions(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.SQLiteStorageEngineAdapter)
New state: initializingSubscriptions(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.SQLiteStorageEngineAdapter)
respond(to:): initializingSubscriptions(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.SQLiteStorageEngineAdapter)
[InitializeSubscription] initializeSubscriptions(api:storageAdapter:)
[8C9241BD-6DAE-444A-9716-BE639C31567D] - Try [1/1]
[4485585B-38F5-48C2-9990-17F982BB40A6] - Try [1/1]
Received subscription: PassthroughSubject
[50AF4147-83A7-4595-A428-F09BBDCA7BC4] - Try [1/1]
[InitializeSubscription.5] Sink reconciliationQueues Test 1
[InitializeSubscription.5] Sink done reconciliationQueues Test 1
Received subscription: PassthroughSubject
[InitializeSubscription.5] Sink reconciliationQueues User 2
[InitializeSubscription.5] Sink done reconciliationQueues User 2
[EFE576D7-82C9-4578-86CD-2E6E1E054DF0] - Try [1/1]
[16A38EC3-84EF-4996-BB0A-57F44BB9F314] - Try [1/1]
[2A4751FA-E603-4603-AC04-428BC092EADC] - Try [1/1]
onDeleteValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
onCreateValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
onUpdateValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
onCreateValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
onUpdateValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
onDeleteValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
Generated Header for request - Optional("{"x-amz-date":"20230927T154707Z","x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com"}")
[StarscreamAdapter] connect. Connecting to url
[RealtimeConnectionProvider] Status: inProgress. Connectivity status: satisfied
[StarscreamAdapter] viabilityChanged: true
[StarscreamAdapter] websocketDidConnect: websocket has been connected.
[RealtimeConnectionProvider] WebsocketDidConnect, sending init message
[RealtimeConnectionProvider] Starting stale connection timer for 300.0s
[StarscreamAdapter] socket.write - {"type":"connection_init"}
[StarscreamAdapter] websocketDidReceiveMessage: - {"type":"connection_ack","payload":{"connectionTimeoutMs":300000}}
[RealtimeConnectionProvider] Resetting stale connection timer
[RealtimeConnectionProvider] received connectionAck
[StarscreamAdapter] websocketDidReceiveMessage: - {"type":"ka"}
[RealtimeConnectionProvider] Resetting stale connection timer
[RealtimeConnectionProvider] received keepAlive
[AppSyncSubscriptionConnection]: Connection connected, start subscription F6C4823C-0FED-4F88-A625-20350AB72BDA.
[AppSyncSubscriptionConnection]: Connection connected, start subscription 40F004C6-104B-4107-8719-3D22DE2A70A1.
[AppSyncSubscriptionConnection]: Connection connected, start subscription 4AC9585B-194F-4E6E-B2D8-4BFA3BF4DAB0.
[AppSyncSubscriptionConnection]: Connection connected, start subscription 0100CBC2-2014-4246-A104-6322473C56C6.
[AppSyncSubscriptionConnection]: Connection connected, start subscription F8826223-4BBE-4536-88C8-90E58788BA49.
[AppSyncSubscriptionConnection]: Connection connected, start subscription C3BAC77B-CEF0-4EDE-93E4-496987580D87.
[StarscreamAdapter] socket.write - {"type":"start","id":"F6C4823C-0FED-4F88-A625-20350AB72BDA","payload":{"data":"{"query":"subscription OnDeleteTest {\n onDeleteTest {\n id\n createdAt\n test\n updatedAt\n userID\n __typename\n _version\n _deleted\n _lastChangedAt\n }\n}"}","extensions":{"authorization":{"x-amz-date":"20230927T154708Z","x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com"}}}}
[StarscreamAdapter] socket.write - {"payload":{"data":"{"query":"subscription OnUpdateUser {\n onUpdateUser {\n id\n createdAt\n email\n updatedAt\n __typename\n _version\n _deleted\n _lastChangedAt\n }\n}"}","extensions":{"authorization":{"host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com","x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","x-amz-date":"20230927T154708Z"}}},"type":"start","id":"40F004C6-104B-4107-8719-3D22DE2A70A1"}
[StarscreamAdapter] socket.write - {"payload":{"extensions":{"authorization":{"host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com","x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","x-amz-date":"20230927T154708Z"}},"data":"{"query":"subscription OnCreateUser {\n onCreateUser {\n id\n createdAt\n email\n updatedAt\n __typename\n _version\n _deleted\n _lastChangedAt\n }\n}"}"},"type":"start","id":"4AC9585B-194F-4E6E-B2D8-4BFA3BF4DAB0"}
[StarscreamAdapter] socket.write - {"id":"0100CBC2-2014-4246-A104-6322473C56C6","payload":{"data":"{"query":"subscription OnDeleteUser {\n onDeleteUser {\n id\n createdAt\n email\n updatedAt\n __typename\n _version\n _deleted\n _lastChangedAt\n }\n}"}","extensions":{"authorization":{"x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","x-amz-date":"20230927T154708Z","host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com"}}},"type":"start"}
[StarscreamAdapter] socket.write - {"id":"F8826223-4BBE-4536-88C8-90E58788BA49","type":"start","payload":{"extensions":{"authorization":{"x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com","x-amz-date":"20230927T154708Z"}},"data":"{"query":"subscription OnUpdateTest {\n onUpdateTest {\n id\n createdAt\n test\n updatedAt\n userID\n __typename\n _version\n _deleted\n _lastChangedAt\n }\n}"}"}}
[StarscreamAdapter] socket.write - {"id":"C3BAC77B-CEF0-4EDE-93E4-496987580D87","payload":{"data":"{"query":"subscription OnCreateTest {\n onCreateTest {\n id\n createdAt\n test\n updatedAt\n userID\n __typename\n _version\n deleted\n lastChangedAt\n }\n}"}","extensions":{"authorization":{"x-amz-date":"20230927T154708Z","x-api-key":"da2-x4jqwvauczbi3jy7gqtjojejqq","host":"2p65xuumnza4zpgfkcc7aoqxgy.appsync-api.us-east-1.amazonaws.com"}}},"type":"start"}
[StarscreamAdapter] websocketDidReceiveMessage: - {"id":"4AC9585B-194F-4E6E-B2D8-4BFA3BF4DAB0","type":"start_ack"}
[RealtimeConnectionProvider] Resetting stale connection timer
onCreateValueListener: connection(Amplify.SubscriptionConnectionState.connected)
[StarscreamAdapter] websocketDidReceiveMessage: - {"id":"40F004C6-104B-4107-8719-3D22DE2A70A1","type":"start_ack"}
[RealtimeConnectionProvider] Resetting stale connection timer
onUpdateValueListener: connection(Amplify.SubscriptionConnectionState.connected)
[StarscreamAdapter] websocketDidReceiveMessage: - {"id":"F6C4823C-0FED-4F88-A625-20350AB72BDA","type":"start_ack"}
[RealtimeConnectionProvider] Resetting stale connection timer
onDeleteValueListener: connection(Amplify.SubscriptionConnectionState.connected)
[StarscreamAdapter] websocketDidReceiveMessage: - {"id":"0100CBC2-2014-4246-A104-6322473C56C6","type":"start_ack"}
[RealtimeConnectionProvider] Resetting stale connection timer
[StarscreamAdapter] websocketDidReceiveMessage: - {"id":"F8826223-4BBE-4536-88C8-90E58788BA49","type":"start_ack"}
[RealtimeConnectionProvider] Resetting stale connection timer
[StarscreamAdapter] websocketDidReceiveMessage: - {"id":"C3BAC77B-CEF0-4EDE-93E4-496987580D87","type":"start_ack"}
[RealtimeConnectionProvider] Resetting stale connection timer
onDeleteValueListener: connection(Amplify.SubscriptionConnectionState.connected)
onUpdateValueListener: connection(Amplify.SubscriptionConnectionState.connected)
receive(
:): connection(Amplify.SubscriptionConnectionState.connected)
onCreateValueListener: connection(Amplify.SubscriptionConnectionState.connected)
dispose(of subscriptionEvent): connection(Amplify.SubscriptionConnectionState.connected)
connectionState now connected
receive(
:): connection(Amplify.SubscriptionConnectionState.connected)
[InitializeSubscription.4] .connected User
dispose(of subscriptionEvent): connection(Amplify.SubscriptionConnectionState.connected)
[InitializeSubscription.5] 1/2 initialized
connectionState now connected
[InitializeSubscription.4] .connected Test
[InitializeSubscription.5] 2/2 initialized
[InitializeSubscription.6] connected isInitialized
[InitializeSubscription.5] RemoteSyncEngine IncomingEventReconciliationQueueEvent.initialized
[Lifecycle event 1]: subscriptionsEstablished
Notifying: initializedSubscriptions
resolve(initializingSubscriptions(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.SQLiteStorageEngineAdapter), initializedSubscriptions) -> performingInitialSync
New state: performingInitialSync
respond(to:): performingInitialSync
[InitializeSubscription.6] performInitialSync()
Beginning initial sync
[Lifecycle event 2]: syncQueriesStarted
Beginning sync for Test
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'Test'
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'Test'
[492168B8-6DB1-449E-AE12-86232A464BE1] - Try [1/1]
Starting query 26D9F10D-AD62-4025-83FC-8C7636BA09B6
{
"variables" : {
"limit" : 1000,
"lastSync" : 1695829477838
},
"query" : "query SyncTests($lastSync: AWSTimestamp, $limit: Int) {\n syncTests(lastSync: $lastSync, limit: $limit) {\n items {\n id\n createdAt\n test\n updatedAt\n userID\n __typename\n _version\n _deleted\n lastChangedAt\n }\n nextToken\n startedAt\n }\n}"
}
Starting network task for query 26D9F10D-AD62-4025-83FC-8C7636BA09B6
[Operation 492168B8-6DB1-449E-AE12-86232A464BE1] - Success
enqueue(
:) skipping reconciliation, no models to enqueue.
select count("id") from "ModelSyncMetadata" where "id" = 'Test'
update "ModelSyncMetadata"
set
"lastSync" = 1695829629154
where "id" = 'Test'
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'Test'
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'Test'
Beginning sync for User
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'User'
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'User'
[DE29704F-8F7E-46B0-A246-C38E9E1C1A2D] - Try [1/1]
Starting query D73DB386-E9B2-4C12-AB28-AFD4C87A451C
{
"variables" : {
"limit" : 1000,
"lastSync" : 1695829478322
},
"query" : "query SyncUsers($lastSync: AWSTimestamp, $limit: Int) {\n syncUsers(lastSync: $lastSync, limit: $limit) {\n items {\n id\n createdAt\n email\n updatedAt\n __typename\n _version\n _deleted\n lastChangedAt\n }\n nextToken\n startedAt\n }\n}"
}
Starting network task for query D73DB386-E9B2-4C12-AB28-AFD4C87A451C
[Lifecycle event 3]: modelSyncedEvent model: Test
[Lifecycle event 3]: modelSyncedReceived progress: 1/2
Emitting DataStore event: modelSyncedEvent ModelSyncedEvent(modelName: "Test", isFullSync: false, isDeltaSync: true, added: 0, updated: 0, deleted: 0)
[Operation DE29704F-8F7E-46B0-A246-C38E9E1C1A2D] - Success
enqueue(
:) skipping reconciliation, no models to enqueue.
select count("id") from "ModelSyncMetadata" where "id" = 'User'
update "ModelSyncMetadata"
set
"lastSync" = 1695829629615
where "id" = 'User'
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'User'
select
"root"."id" as "id", "root"."lastSync" as "lastSync"
from "ModelSyncMetadata" as "root"
where 1 = 1
and "root"."id" = 'User'
[Lifecycle event 3]: modelSyncedEvent model: User
[Lifecycle event 3]: modelSyncedReceived progress: 2/2
Emitting DataStore event: modelSyncedEvent ModelSyncedEvent(modelName: "User", isFullSync: false, isDeltaSync: true, added: 0, updated: 0, deleted: 0)
[Lifecycle event 4]: syncQueriesReady
Successfully finished sync
Notifying: performedInitialSync
resolve(performingInitialSync, performedInitialSync) -> activatingCloudSubscriptions
New state: activatingCloudSubscriptions
respond(to:): activatingCloudSubscriptions
activateCloudSubscriptions()
[InitializeSubscription.6] RemoteSyncEngine IncomingEventReconciliationQueueEvent.started
Notifying: activatedCloudSubscriptions(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
resolve(activatingCloudSubscriptions, activatedCloudSubscriptions(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))) -> activatingMutationQueue(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
New state: activatingMutationQueue(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
respond(to:): activatingMutationQueue(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
startMutationQueue(api:mutationEventPublisher:reconciliationQueue:)
startSyncingToCloud(api:mutationEventPublisher:reconciliationQueue:)
Notifying: receivedStart(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
resolve(stopped, receivedStart(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))) -> starting(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
New state: starting(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
Notifying: activatedMutationQueue
resolve(activatingMutationQueue(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue)), activatedMutationQueue) -> notifyingSyncStarted
respond(to:): starting(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue))
New state: notifyingSyncStarted
doStart(api:mutationEventPublisher:reconciliationQueue:)
respond(to:): notifyingSyncStarted
[Lifecycle event 5]: syncStarted
[Lifecycle event 6]: ready
Notifying: notifiedSyncStarted
resolve(notifyingSyncStarted, notifiedSyncStarted) -> syncEngineActive
New state: syncEngineActive
respond(to:): syncEngineActive
RemoteSyncEngine SyncEngineActive
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."graphQLFilterJSON" as "graphQLFilterJSON",
"root"."inProcess" as "inProcess", "root"."json" as "json", "root"."modelId" as "modelId",
"root"."modelName" as "modelName", "root"."mutationType" as "mutationType", "root"."version" as "version"
from "MutationEvent" as "root"
where 1 = 1
and (
"root"."inProcess" = 0
or "root"."inProcess" is null
)
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."graphQLFilterJSON" as "graphQLFilterJSON",
"root"."inProcess" as "inProcess", "root"."json" as "json", "root"."modelId" as "modelId",
"root"."modelName" as "modelName", "root"."mutationType" as "mutationType", "root"."version" as "version"
from "MutationEvent" as "root"
where 1 = 1
and (
"root"."inProcess" = 0
or "root"."inProcess" is null
)
receive(subscriber:)
receive(subscription:)
Notifying: receivedSubscription
resolve(starting(<AWSAPIPlugin.AWSAPIPlugin: 0x28294c780>, AWSDataStorePlugin.AWSMutationEventPublisher, Optional(AWSDataStorePlugin.AWSIncomingEventReconciliationQueue)), receivedSubscription) -> requestingEvent
New state: requestingEvent
respond(to:): requestingEvent
requestEvent()
requestNextEvent()
getNextMutationEvent(completion:)
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."graphQLFilterJSON" as "graphQLFilterJSON",
"root"."inProcess" as "inProcess", "root"."json" as "json", "root"."modelId" as "modelId",
"root"."modelName" as "modelName", "root"."mutationType" as "mutationType", "root"."version" as "version"
from "MutationEvent" as "root"
where 1 = 1
and (
"root"."inProcess" = 0
or "root"."inProcess" is null
)
order by "root"."createdAt" asc
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."graphQLFilterJSON" as "graphQLFilterJSON",
"root"."inProcess" as "inProcess", "root"."json" as "json", "root"."modelId" as "modelId",
"root"."modelName" as "modelName", "root"."mutationType" as "mutationType", "root"."version" as "version"
from "MutationEvent" as "root"
where 1 = 1
and (
"root"."inProcess" = 0
or "root"."inProcess" is null
)
order by "root"."createdAt" asc
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."email" as "email",
"root"."updatedAt" as "updatedAt"
from "User" as "root"
select
"root"."id" as "id", "root"."createdAt" as "createdAt", "root"."email" as "email",
"root"."updatedAt" as "updatedAt"
from "User" as "root"
[AmpWatch.User(id: "1FB8A9A0-4484-4A7D-818E-9E75F8D129B2", email: Optional("user0 bytes"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 21:59:58 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 21:59:58 +0000))), AmpWatch.User(id: "CB8477FE-C433-475A-8A1D-CF6AECEAC72E", email: Optional("user 2023-09-26 17:25:46 +0000"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-26 17:25:47 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-26 17:25:47 +0000))), AmpWatch.User(id: "FE2BC3EF-1B21-49FB-AB1C-A9F8BBFCDDBB", email: Optional("user2023-09-07 22:00:49 +0000"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 22:00:49 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 22:00:49 +0000))), AmpWatch.User(id: "B56D97B8-AE5F-461E-AE2C-3180458FD94B", email: Optional("user 2023-09-09 18:20:34 +0000"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-09 18:20:34 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-09 18:20:34 +0000))), AmpWatch.User(id: "44ce06a8-76ce-4ec8-b69d-bad5aebc1a25", email: Optional("user1"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 15:11:43 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-07 15:11:43 +0000))), AmpWatch.User(id: "0E1BEF12-D43B-45CB-B118-988D1F75F554", email: Optional("user2"), Tests: Optional(Amplify.List<AmpWatch.Test>), createdAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-05 22:42:20 +0000)), updatedAt: Optional(Amplify.Temporal.DateTime(foundationDate: 2023-09-05 22:43:22 +0000)))]
Optional("6 users\n\nuser0 bytes\nuser 2023-09-26 17:25:46 +0000\nuser2023-09-07 22:00:49 +0000\nuser 2023-09-09 18:20:34 +0000\nuser1\nuser2\n")
queryUsers success

@gbitaudeau
Copy link

Same issue here with Amplify 2.19.0, but this occurs only on real device (on simulator it's fine).
I can confirm that I never get AWSDataStorePlugin.NetworkStatusEvent(active: true), so your hypothesis seams true @lawmicha

@atierian
Copy link
Member

Thanks for the logs @depthzadmin and thanks for letting us know that this is also affecting you @gbitaudeau

We'll follow up here with any updates.

@gbitaudeau
Copy link

Sadly we can't put our first watch application which use Amplify in production due to this issue.
Hope you will find a fix soon 🤞

@lawmicha
Copy link
Contributor

lawmicha commented Oct 4, 2023

Hi @gbitaudeau @depthzadmin, could you try out the fix-watchos branch and let us know if you are still seeing issues? Working on the PR with fix #3272

@gbitaudeau
Copy link

Hi @lawmicha, I just tested, but this doesn't change anything : the synchronization didn't start.
Here the log from the watch extract from Xcode (I can't give you a log file because all amplify log appears as "" in console app: logger might not tag messages as public)
watchOS_log.txt

@lawmicha
Copy link
Contributor

lawmicha commented Oct 5, 2023

Thanks for the logs @gbitaudeau, can you clarify that it is still working on the watchOS simulator but doesn't on the physical device?

The end of the logs show

onUpdateValueListener: connection(Amplify.SubscriptionConnectionState.connecting)
onDeleteValueListener: connection(Amplify.SubscriptionConnectionState.connecting)

perhaps it is stuck in the websocket connect steps?

Could you provide us with a reacted schema that you are using and the expected auth set up?

@gbitaudeau
Copy link

gbitaudeau commented Oct 6, 2023

Hi @lawmicha , I created a short project from scratch using the default amplify schema and I can confirm that it is still working on the watchOS simulator but doesn't on the physical device. I only activated api and don't try with auth to make this test as small as possible.
Here the files I use :
schema.graphql.txt


public class AmplifyConf {
    private var listenAmplifyHubTask: Task<Void, Never>?

    func start() async throws {
        Amplify.Logging.logLevel = .debug
        
        try Amplify.add(plugin: AWSDataStorePlugin(modelRegistration: AmplifyModels()))
        try Amplify.add(plugin: AWSAPIPlugin(modelRegistration: AmplifyModels()))
        try Amplify.configure()
        
        listenAmplifyHub()
        
        try await Amplify.DataStore.clear()
        try await Amplify.DataStore.start()
    }
    
    private func listenAmplifyHub() {
        self.listenAmplifyHubTask = Task {
            for await event in Amplify.Hub.publisher(for: .dataStore).values {
                
                var dumped = String()
                dump(event, to: &dumped)
                print("event \(dumped)")
                
//                print("[Amplify HubEvent](dataStore) \(event.eventName)")
                 
            }
        }
    }
}


class WKAppDelegate: NSObject, WKApplicationDelegate {
    var amplifyConf = AmplifyConf()
    
    func applicationDidFinishLaunching() {
        Task {
            do {
                try await amplifyConf.start()
            } catch {
                print("ERROR \(error)")
            }
        }
    }
}



@main
struct TestAmplifyGBIWatch_Watch_AppApp: App {
    @WKApplicationDelegateAdaptor
    private var appDelegate: WKAppDelegate
    
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

@thisisabhash thisisabhash added follow up Requires follow up from maintainers and removed pending-community-response Issue is pending response from the issue requestor labels Oct 10, 2023
@gbitaudeau
Copy link

Hi @thisisabhash @lawmicha do you have enough information? Did you reproduce the problem on your side?

@lawmicha
Copy link
Contributor

lawmicha commented Nov 6, 2023

Hey @gbitaudeau, do you have any logs from the physical device run?

@gbitaudeau
Copy link

Hi @lawmicha , I pushed further investigations and here what I observed:

  1. watchOS can't use web socket (and all low level networking) as explain by Apple here: https://developer.apple.com/documentation/technotes/tn3135-low-level-networking-on-watchos . The watchOS simulator can't help as it always allows low-level networking. Note also that watchOS version 6 through 8 had a bug where the low level networking APIs could work. The only exceptions are for applications which do: audio streaming, VoIP or work with a pair tvOS app (this is not our case). Also to verify this, I tried all possible engine of Strascream using a modified version of Starscream/WebSocket ( https://github.com/daltoniam/Starscream/blob/d3a0b107328e3bc1601dccbfbcd556bd53aed767/Sources/Starscream/WebSocket.swift#L120 ). All fall on the same limitation: withNativeEngine, WSEngine(transport: TCPTransport... or WSEngine(transport: FoundationTransport()... the connection failed as explain in the Apple document.
  2. To verify if other issues appear on real device, I try to remove the web sockets from Amplify with a very dirty patch: I changed the AWSIncomingEventReconciliationQueue.init method ( https://github.com/aws-amplify/amplify-swift/blob/d4b957d5bf268096117b2aece892ffb4fd88b0f0/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/AWSIncomingEventReconciliationQueue.swift ) with this:
    init(modelSchemas: [ModelSchema],
         api: APICategoryGraphQLBehaviorExtended,
         storageAdapter: StorageEngineAdapter,
         syncExpressions: [DataStoreSyncExpression],
         auth: AuthCategoryBehavior? = nil,
         authModeStrategy: AuthModeStrategy,
         modelReconciliationQueueFactory: ModelReconciliationQueueFactory? = nil) async {
        self.modelSchemasCount = modelSchemas.count
        self.modelReconciliationQueueSinks.set([:])
        self.eventReconciliationQueueTopic = CurrentValueSubject<IncomingEventReconciliationQueueEvent, DataStoreError>(.idle)
        self.reconciliationQueues.set([:])
        self.reconciliationQueueConnectionStatus = [:]
        self.reconcileAndSaveQueue = ReconcileAndSaveQueue(modelSchemas)
        
        if let modelReconciliationQueueFactory = modelReconciliationQueueFactory {
            self.modelReconciliationQueueFactory = modelReconciliationQueueFactory
        } else {
            self.modelReconciliationQueueFactory = AWSModelReconciliationQueue.init
        }
        
        // TODO: Add target for SyncEngine system to help prevent thread explosion and increase performance
        // https://github.com/aws-amplify/amplify-ios/issues/399
        self.connectionStatusSerialQueue
            = DispatchQueue(label: "com.amazonaws.DataStore.AWSIncomingEventReconciliationQueue")

        for modelSchema in modelSchemas {
            let modelName = modelSchema.name
            let syncExpression = syncExpressions.first(where: {
                $0.modelSchema.name == modelName
            })
            let modelPredicate = syncExpression?.modelPredicate() ?? nil
            guard reconciliationQueues.get()[modelName] == nil else {
                log.warn("Duplicate model name found: \(modelName), not subscribing")
                continue
            }
//            let queue = await self.modelReconciliationQueueFactory(modelSchema,
//                                                             storageAdapter,
//                                                             api,
//                                                             reconcileAndSaveQueue,
//                                                             modelPredicate,
//                                                             auth,
//                                                             authModeStrategy,
//                                                             nil)
            let queue = MockModelReconciliationQueue(modelSchema: modelSchema,
                                                     storageAdapter: storageAdapter,
                                                     api: api,
                                                     reconcileAndSaveQueue: reconcileAndSaveQueue,
                                                     modelPredicate: modelPredicate,
                                                     auth: auth,
                                                     authModeStrategy: authModeStrategy,
                                                     incomingSubscriptionEvents: nil)
            
            reconciliationQueues.with { reconciliationQueues in
                reconciliationQueues[modelName] = queue
            }
            log.verbose("[InitializeSubscription.5] Sink reconciliationQueues \(modelName) \(reconciliationQueues.get().count)")
            let modelReconciliationQueueSink = queue.publisher.sink(receiveCompletion: onReceiveCompletion(completed:),
                                                                    receiveValue: onReceiveValue(receiveValue:))
            modelReconciliationQueueSinks.with { modelReconciliationQueueSinks in
                modelReconciliationQueueSinks[modelName] = modelReconciliationQueueSink
            }
            log.verbose("[InitializeSubscription.5] Sink done reconciliationQueues \(modelName) \(reconciliationQueues.get().count)")
            
            //MOCK the event
            DispatchQueue.global().asyncAfter(deadline: .now() + 0.5) {
                queue.modelReconciliationQueueSubject.send(ModelReconciliationQueueEvent.connected(modelName: modelName))
            }

        }
    }

When I ran the application, there were several problems because date in milliseconds use Int type which is 32bits on my watch (a Series 7) . I made a few corrections that you could find here: Amplify_Int64.patch.
With all these changes, things were close to work: I can make mutation, but after a fresh start my database seams empty because query on model always return empty result. After a stop/start on DataStore, I well see the Sync requests but request are always made without lastSync and the queries on Database always return empty result. I think that my dirty patch could explain this ....

If I resume:

  • watchOS network can only be test on a real device
  • watchOS doesn't support web sockets
  • Datastore doesn't work because web sockets don't work
  • Even if web sockets are ignored on watch, fix are needed on all milliseconds date which use a Int instead of a Int64
  • Even with all these fix, I don't know why Datastore loose content on restart and don't store Sync requests results.

Hope all this help.

On our side, the situation is quite critical: we though Datastore work on watch and we changed all our core stack to use Datastore but we can't put our application in production because all this don't work on watch.

Do you think you will be able to fix Datastore in a reasonable time (even without web socket)?

We don't need real time on watch and if we must do polling (using stop/start on Datastore), this could be ok for our use case. In our position, we also consider to remove Amplify from watch depending on your answers.

@atierian atierian assigned lawmicha and unassigned atierian Nov 6, 2023
@lawmicha
Copy link
Contributor

lawmicha commented Nov 6, 2023

Hi @gbitaudeau, we should be able to do a client side check for watchOS to avoid establishing the subscriptions. We're a bit confused why Int type is not working on a series 7 since it is 64-bit, however we can continue to apply the Int -> Int64 patch in a separate branch while we explore this further.

With the two changes, real-time updates as you mentioned will not be received by the app on watchOS, however data will still be sync-ed to the cloud through the GraphQL mutations since they are HTTP POST requests.

To do data polling, DataStore.stop() will stop the sync engine, and DataStore.start() will kick off the syncQuery API calls to pull the latest data.

Some additional context about lastSync. This value is persisted in the local database in one of the "system" tables. On cold start, the value doesn't exist in the local database, so a full sync is performed without lastSync. The lastSync is then persisted and used on subsequent syncs to get the delta since the lastSync time. I'll take a look at this further once I apply the first two changes.

@lawmicha
Copy link
Contributor

lawmicha commented Nov 14, 2023

Hi @depthzadmin and @gbitaudeau, please try out the fix-watchos branch. I ran this code on a physical watchOS device and things are working as expected. The changes include some watchOS specific websocket logic and the changes from Int to Int64 in certain places that @gbitaudeau pointed out above. I will clean up and modify some of the implementation details but the behavior of DataStore should remain the same; it will attempt to subscribe, fail, and move onto an active sync engine. This means that reconciliation of data will be delayed while running the app on watchOS due to the lack of low-level networking capabilities.

@depthzadmin
Copy link
Author

Making progress. My findings:

  • When starting the watch app, data is synced although a little slow
  • When adding data on the watch, the phone gets the synced data quickly
  • There is a problem when adding data on the phone. The watch data is not synced unless the watch app is restarted
  • Another problem is that delete data is not working on either device

@lawmicha
Copy link
Contributor

lawmicha commented Nov 14, 2023

Hi @depthzadmin, thanks for your observations. They're very helpful as we work through getting DataStore to run on watchOS without subscriptions.

One of the limitations you noticed is that the phone data is not synced to the watch unless the watch app is restarted. The reason for this is due to the lack of low-level networking support by watchOS. Normally, DataStore uses the websocket subscriptions to reconcile the data immediately. Since subscriptions are not going to work, data becomes stale on the watch until the next sync. A sync occurs when

  • The watch app restarting. The app restarting is one of the ways to get the lifecycle of the app to perform one of the DataStore operations. DataStore.start() or any DataStore operation, like DataStore.save() will start the sync engine, if it is stopped, and sync the latest data
  • Calling DataStore.stop, followed by DataStore.start(). By explicitly restarting DataStore, a sync will be performed. If you have certain use case where the user navigates to a part of your app where you'd like the latest data, you can restart DataStore in this way.

Do you have more details such as sequence of actions you took, code snippets, or logs around the issue with deletion of data? on the watch and phone? Deletion of data not working on the phone is unexpected. We'll have to investigate further DataStore on watchOS functionality such as create, updates, and deletes.

@depthzadmin
Copy link
Author

There is nothing in the logs about the delete. In the code the delete appears to be working, but when doing a query the data is not deleted.

@lawmicha
Copy link
Contributor

How are you querying the data back? DataStore.delete should remove it first from the local store, and then it should sync the delete mutation to AppSync.

@depthzadmin
Copy link
Author

My test app has a separate button for delete and query. I first tap on delete, wait a bit, then tap on query.

The data is still in the local store even after restarting the device.

Also, data deleted from the Amplify Web Console does not get synced to the devices.

@gbitaudeau
Copy link

Hi @lawmicha and thanks for this new version.

It's promising: the sync engine well start this time and I can see that all the Sync request are well sent on network.
Like @depthzadmin , mutations and deletions don't work as expected.
What I can see is that it looks like metadata (_version and _lastChangedAt) are not well saved in datastore because:

  • mutation queries are sent without _version argument
  • when I call stop/start on Datastore, Sync queries are always sent without lastSync argument

You can find here device logs and Charles proxy session where I made a mutation just after the sync was finished.
TestWatchAmplify_logs.txt
TestWatchAmplify.chls.zip

Two others observations :

  • In the given logs, with last Xcode version, I was not able to add time in the given file, but I can see it in Xcode. Between applicationDidFinishLaunching and Successfully finished sync, there are 13s elapsed which is quite huge for a Watch where users expects to use application very few seconds. Moreover I only have very few objects and the network Sync requests took only 1.5s (500ms each).
  • If I start the application one time with the network, my model object are well readable in my datastore. If I well understand they should be persisted on local storage, but when I start again the application without network available, my datastore is empty.

@lawmicha
Copy link
Contributor

Thanks for the investigation, I'm taking a look into this and the changes related to using Int64 is what's causing the problems related to mutations and deletion. What's happening here is that the first save causes a create mutation to be sent out, but the metadata about the model isn't being reconciled successfully to the local store, so subsequent deletions fail when there's no version metadata.

I'm also working on proposing a client side configuration option for DataStore specifically to disable the real time functionality, for use cases such as running on watchOS, which will remove the attempt to establish the subscriptions completely, reducing the time for the DataStore to finish the sync process.

@lawmicha
Copy link
Contributor

lawmicha commented Nov 17, 2023

Hey @depthzadmin, @gbitaudeau, please try out lawmicha.disable-subscriptions (#3368). This branch builds ontop of #3367 which has the changes (and fixes for delete mutation) for Int to Int64 type. It exposes a flag to skip over the subscriptions so to avoid a client timeout mechanism that's causing a delay in the syncing process.

Please keep in mind that I'm working on reviewing this change with the team, so a disclaimer it may change.

try Amplify.add(plugin: AWSDataStorePlugin(
    modelRegistration: AmplifyModels(),
    configuration: .custom(disableRealTimeUpdates: { true })))

@lawmicha
Copy link
Contributor

lawmicha commented Nov 21, 2023

Naming updated to disableSubscriptions

try Amplify.add(plugin: AWSDataStorePlugin(
    modelRegistration: AmplifyModels(),
    configuration: .custom(disableSubscriptions: { true })))

@gbitaudeau
Copy link

Hi @lawmicha and thanks for this new version again.

I didn't finish all my tests, but for now :

  • the "disableSubscriptions" feature works well and make sync engine start fast
  • mutations and deletions work as expected
  • lastSync is well sent with Sync queries
  • the problem I had with local storage when restarting the application was on my side, sorry for the bad observation (I was calling Amplify.DataStore.clear() when starting the application and didn't see it before... must be it's a test I did and forgot to delete)

I'll continue testing it today, and if I find anything else I'll post it here.

Thanks for the fixes.

@ruisebas ruisebas added the pending-community-response Issue is pending response from the issue requestor label Nov 23, 2023
@gbitaudeau
Copy link

Hi @lawmicha, I continued testing and didn't find any issues.

Is there still work on your side to merge it? We are waiting it to put our app on the App Store 😉

@lawmicha
Copy link
Contributor

Hi @gbitaudeau, thanks for confirming on your side things are working as expected. I just rebased lawmicha.disable-subscriptions with a commit from lawmicha.int64. If you can please go ahead and refresh your package cache to pick up the latest lawmicha.disable-subscriptions branch. We're planning to do the release tomorrow or the coming Monday.

@5d
Copy link
Member

5d commented Dec 1, 2023

Hi @gbitaudeau, we have a scheduled release early next week that incorporates this patch. I'll let you know once it's completed.

@gbitaudeau
Copy link

Hi @lawmicha @5d , I tried the updated branch and everything looks good. The only problem I get is with AWSPinpointPushNotificationsPlugin where an assertion occurs on file AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Analytics/PinpointEvent+PinpointClientTypes.swift line 14 for another Int64 to Int conversion error, but this is not in relation with Datastore ...
Do you already have another ticket for Int64 errors on watchOS or is this part of this one ?

@lawmicha
Copy link
Contributor

lawmicha commented Dec 4, 2023

Hey @gbitaudeau, thanks for the heads up, no my changes haven't touched that plugin. Can you please open another issue with any additional details to track the issue related to AWSPinpointPushNotificationsPlugin ?

@lawmicha
Copy link
Contributor

lawmicha commented Dec 6, 2023

The DataStore fix has been released in https://github.com/aws-amplify/amplify-swift/releases/tag/2.23.0

@5d
Copy link
Member

5d commented Dec 7, 2023

resolving this ticket as fix has been released in the latest version

@5d 5d closed this as completed Dec 7, 2023
@github-actions github-actions bot removed the pending-community-response Issue is pending response from the issue requestor label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datastore Issues related to the DataStore category follow up Requires follow up from maintainers
Projects
None yet
Development

No branches or pull requests

7 participants