Amplify datastore stopped to sync

0

I am using the aws-amplify API to manipulate the datastore. Everything was going fine and all queries were running successfully until it stopped to work suddenly.

In my case i am building an NPM package to wrap aws-amplify functionality with node and typescript. And another developer is using the package to build a native app with react-native.

So when i implement new functions i test it locally with ts-node, something like DataStore.query or DataStore.Save ...etc, and the other developer is testing with expo after install the last package release i have done.

Once we had a problem saying:

[WARN] 04:14.549 DataStore, Object {
  "cause": Object {
    "error": Object {
      "errors": Array [
        Object {
          "message": "Connection failed: {\"errors\":{\"errorType\":\"MaxSubscriptionsReachedError\",\"message\":\"Max number of 100 subscriptions reached\"}}",
        },
      ],
    },

When it's happened, I tried to run queries locally and it work good with a warning:

[WARN] 33:35.743 DataStore - Realtime disabled when in a server-side environment

So we thought it is cache problem or something. But now nothing works at all in the dataStore. If i am trying to run code locally with ts-node, the console freeze and never comeback.

For example if i do:
await DataStore.query(AccountDetails, "a6603b3e-4ae1-4f6c-9360-bd82fe01dd0d")

the console will freeze with the warning message:

Enter image description here

We tried to fix appSync and subscriptions but it is not working at all.

Cognito user pool works good, S3 also good, only datastore is sad :(

// How we configure amplify
this.awsExports = Amplify.configure({ ...awsConfig });

// How we import Datastore
import {DataStore} from "@aws-amplify/datastore";

// Our dependencies
"dependencies": {
    "@aws-amplify/core": "^4.6.0",
    "@aws-amplify/datastore": "^3.12.4",
    "@react-native-async-storage/async-storage": "^1.17.4",
    "@react-native-community/netinfo": "^8.3.0",
    "@types/amplify": "^1.1.25",
    "algoliasearch": "^4.14.1",
    "aws-amplify": "^4.3.29",
    "aws-amplify-react-native": "^6.0.5",
    "aws-sdk": "^2.1142.0",
    "aws-sdk-mock": "^5.7.0",
    "eslint-plugin-jsdoc": "^39.2.9",
    "mustache": "^4.2.0"
  }

Please any one can help?

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ