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

Error: Amplify has not been configured correctly when using AWS_LAMBDA authentication type but in the end still works #10035

Closed
3 tasks done
mtrani opened this issue Jun 28, 2022 · 2 comments
Labels
GraphQL Related to GraphQL API issues p4

Comments

@mtrani
Copy link

mtrani commented Jun 28, 2022

Before opening, please confirm:

JavaScript Framework

Not applicable

Amplify APIs

Authentication, DataStore

Amplify Categories

auth

Environment information

# Put output below this line
System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 15.21 GB / 31.73 GB
  Binaries:
    Node: 16.15.0 - ~\AppData\Local\nvs\default\node.EXE
    npm: 8.11.0 - ~\AppData\Local\nvs\default\npm.CMD
  Browsers:
    Chrome: 103.0.5060.66
    Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.37)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @aws-amplify/api: ^4.0.44 => 4.0.44
    @aws-amplify/auth: ^4.5.8 => 4.5.8
    @aws-amplify/core: ^4.5.8 => 4.5.8
    @aws-amplify/datastore: ^3.12.1 => 3.12.1
    @babel/core: ^7.18.5 => 7.18.5
    @jangaroo/core: ^1.2.1 => 1.2.1
    @jangaroo/publish: ^1.2.1 => 1.2.1
    @types/luxon: ^2.3.2 => 2.3.2
    @types/node: ^18.0.0 => 18.0.0
    @typescript-eslint/eslint-plugin: ^5.28.0 => 5.29.0
    @typescript-eslint/parser: ^5.28.0 => 5.29.0
    browserlist: ^1.0.1 => 1.0.1
    clean-webpack-plugin: ^4.0.0 => 4.0.0
    deep-object-diff: ^1.1.7 => 1.1.7
    dotenv: ^16.0.1 => 16.0.1
    eslint: ^8.18.0 => 8.18.0
    eslint-config-prettier: ^8.5.0 => 8.5.0
    eslint-plugin-prettier: ^4.0.0 => 4.0.0
    fast-deep-equal: ^3.1.3 => 3.1.3
    fork-ts-checker-webpack-plugin: ^7.2.11 => 7.2.11
    glob: ^8.0.3 => 8.0.3
    luxon: ^2.4.0 => 2.4.0
    prettier: ^2.7.1 => 2.7.1
    release-please: ^13.18.3 => 13.18.5
    rxjs: ^7.5.5 => 7.5.5
    shx: ^0.3.4 => 0.3.4
    terser-webpack-plugin: ^5.3.3 => 5.3.3
    ts-loader: ^9.3.0 => 9.3.1
    ts-node: ^10.8.1 => 10.8.1
    tsconfig-paths: ^4.0.0 => 4.0.0
    tsconfig-paths-webpack-plugin: ^3.5.2 => 3.5.2
    tslib: ^2.4.0 => 2.4.0
    typescript: ^4.7.4 => 4.7.4
    webpack: ^5.73.0 => 5.73.0
    webpack-cli: ^4.10.0 => 4.10.0
    zen-observable-ts: ^1.1.0 => 1.1.0
  npmGlobalPackages:
    @aws-amplify/cli: 8.3.1
    corepack: 0.10.0
    npm: 8.11.0
    pnpm: 7.1.7

Describe the bug

When using Amplify.configure(...) and Datastore.configure(...) together with AWS_LAMBDA authentication type it will result in Amplify configuration error but after that it works(see logs).

[ERROR] 38:00.980 AuthError -
Error: Amplify has not been configured correctly.
The configuration object is missing required auth properties.
This error is typically caused by one of the following scenarios:

        1. Did you run `amplify push` after adding auth via `amplify add auth`?
            See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information

        2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.

From what I see from the logs and what I debugged, it seems to come because it will try an authentication with Cognito(Credentials - No Cognito Identity pool provided for unauthenticated access) and this will result in an exception NoUserPoolError from file Error.ts, even tough is used lambda authentication.

I saw other issues about Amplify has not been configured correctly, and I also tried some workaround suggested by people like import the Auth module and use the Auth.configure method together with Amplify.configure. Until now nothing has worked.

Expected behavior

No error on the console about the wrong configuration

Reproduction steps

  1. Create a fileA with a factory function that initialize amplify, datastore. The factory instantiate a service class from fileB and return the object to the caller.
  2. In fileB create the service class having methods using internally DataStore.observeQuery(...)
  3. When the first time a DataStore.observeQuery(...) is used the error will be produced

Code Snippet

// Put your code below this line.
import { Amplify } from "@aws-amplify/core";
import { DataStore} from "@aws-amplify/datastore";
import { ExampleServiceClass} from "./example-service-class"; // FILE-B

//FILE-A
export async function createService() {
  Amplify.Logger.LOG_LEVEL = 'DEBUG';

  const config = {
    aws_project_region: "eu-west-1",
    aws_appsync_graphqlEndpoint: "https://xxxxxxxxxxxxx.appsync-api.eu-west-1.amazonaws.com/graphql",
    aws_appsync_region: "eu-west-1",
    aws_appsync_authenticationType: "AWS_LAMBDA"
  }
  Amplify.configure(config);

  DataStore.configure({
    fullSyncInterval: 60,
    authProviders: {
      functionAuthProvider: async () => {
        return {
          token: "custom-token",
        };
      },
    },
  });
  return new ExampleServiceClass();
}

Log output

ConsoleLogger.ts:125 [DEBUG] 51:28.280 Amplify - amplify config {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1'}
ConsoleLogger.ts:115 [DEBUG] 51:28.280 AuthClass - configure Auth
ConsoleLogger.ts:125 [DEBUG] 51:28.281 Parser - parse config (3) [{…}, 'to amplifyconfig', {…}]0: {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1'}1: "to amplifyconfig"2: Analytics: {}Auth: {}[[Prototype]]: ObjectLogging: {}Storage: {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1'}[[Prototype]]: Objectlength: 3[[Prototype]]: Array(0)
ConsoleLogger.ts:125 [DEBUG] 51:28.281 Hub - Dispatching to auth with {event: 'configured', data: null, message: 'The Auth category has been configured successfully'}
ConsoleLogger.ts:115 [DEBUG] 51:28.281 I18n - configure I18n
ConsoleLogger.ts:115 [DEBUG] 51:28.281 I18n - create I18n instance
ConsoleLogger.ts:125 [DEBUG] 51:28.281 PubSub - configure PubSub {opt: {…}}opt: {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1'}[[Prototype]]: Object
ConsoleLogger.ts:125 [DEBUG] 51:28.282 RestAPI - configure Rest API {opt: {…}}opt: {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1'}[[Prototype]]: Object
ConsoleLogger.ts:115 [DEBUG] 51:28.282 RestAPI - create Rest API instance
ConsoleLogger.ts:125 [DEBUG] 51:28.282 RestClient - API Options {endpoints: Array(0), aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1', …}aws_appsync_authenticationType: "AWS_LAMBDA"aws_appsync_graphqlEndpoint: "https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql"aws_appsync_region: "eu-west-1"aws_project_region: "eu-west-1"endpoints: []header: {}region: "eu-west-1"[[Prototype]]: Object
ConsoleLogger.ts:125 [DEBUG] 51:28.282 GraphQLAPI - configure GraphQL API {opt: {…}}
ConsoleLogger.ts:115 [DEBUG] 51:28.282 GraphQLAPI - create Rest instance
ConsoleLogger.ts:125 [DEBUG] 51:28.282 RestClient - API Options {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1', region: 'eu-west-1', …}
ConsoleLogger.ts:125 [DEBUG] 51:28.283 RestAPI - configure Rest API {opt: {…}}
ConsoleLogger.ts:115 [DEBUG] 51:28.283 RestAPI - create Rest API instance
ConsoleLogger.ts:125 [DEBUG] 51:28.283 RestClient - API Options {endpoints: Array(0), aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1', …}
ConsoleLogger.ts:125 [DEBUG] 51:28.283 GraphQLAPI - configure GraphQL API {opt: {…}}
ConsoleLogger.ts:115 [DEBUG] 51:28.283 GraphQLAPI - create Rest instance
ConsoleLogger.ts:125 [DEBUG] 51:28.283 RestClient - API Options {aws_appsync_authenticationType: 'AWS_LAMBDA', aws_appsync_graphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', aws_appsync_region: 'eu-west-1', aws_project_region: 'eu-west-1', region: 'eu-west-1', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.285 DataStore - Starting DataStore
ConsoleLogger.ts:115 [DEBUG] 51:28.286 DataStore - Starting Storage
ConsoleLogger.ts:125 [DEBUG] 51:28.304 DataStore - GraphQL endpoint available https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql
ConsoleLogger.ts:115 [INFO] 51:28.306 DataStore - starting sync engine...
ConsoleLogger.ts:125 [DEBUG] 51:28.324 Hub - Dispatching to datastore with {event: 'storageSubscribed', data: undefined}
ConsoleLogger.ts:125 [DEBUG] 51:28.325 Hub - Dispatching to datastore with {event: 'networkStatus', data: {…}}
ConsoleLogger.ts:115 [DEBUG] 51:28.326 AuthClass - getting current credentials
ConsoleLogger.ts:115 [DEBUG] 51:28.326 Credentials - getting credentials
ConsoleLogger.ts:115 [DEBUG] 51:28.326 Credentials - picking up credentials
ConsoleLogger.ts:115 [DEBUG] 51:28.326 Credentials - getting new cred promise
ConsoleLogger.ts:115 [DEBUG] 51:28.326 Credentials - checking if credentials exists and not expired
ConsoleLogger.ts:115 [DEBUG] 51:28.327 Credentials - need to get a new credential or refresh the existing one
ConsoleLogger.ts:115 [DEBUG] 51:28.327 Credentials - no credentials for expiration check
ConsoleLogger.ts:115 [DEBUG] 51:28.327 AuthClass - Getting current user credentials
ConsoleLogger.ts:115 [DEBUG] 51:28.327 AuthClass - Getting current session
ConsoleLogger.ts:115

   [ERROR] 51:28.328 AuthError - 
        Error: Amplify has not been configured correctly. 
        The configuration object is missing required auth properties.
        This error is typically caused by one of the following scenarios:

        1. Did you run `amplify push` after adding auth via `amplify add auth`?
            See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information

        2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.

ConsoleLogger.ts:125 [DEBUG] 51:28.328 DataStore - params ready {predicate: undefined, pagination: {…}, modelConstructor: ƒ}
ConsoleLogger.ts:115 [DEBUG] 51:28.329 AuthClass - getting guest credentials
ConsoleLogger.ts:115 [DEBUG] 51:28.329 Credentials - setting credentials for guest
ConsoleLogger.ts:115 [DEBUG] 51:28.329 Credentials - No Cognito Identity pool provided for unauthenticated access
ConsoleLogger.ts:115 [DEBUG] 51:28.329 AuthClass - Getting current session
ConsoleLogger.ts:115

   [ERROR] 51:28.329 AuthError - 
        Error: Amplify has not been configured correctly. 
        The configuration object is missing required auth properties.
        This error is typically caused by one of the following scenarios:

        1. Did you run `amplify push` after adding auth via `amplify add auth`?
            See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information

        2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.

ConsoleLogger.ts:125 [DEBUG] 51:28.329 DataStore - error getting OIDC JWT Auth is not configured
ConsoleLogger.ts:115 [INFO] 51:28.331 DataStore - Realtime ready
ConsoleLogger.ts:125 [DEBUG] 51:28.331 Hub - Dispatching to datastore with {event: 'subscriptionsEstablished', data: undefined}
ConsoleLogger.ts:115 [DEBUG] 51:28.333 DataStore - Attempting Create subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.334 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onCreateSlot {\n id\n … channel {\n id\n _deleted\n }\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.336 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.336 DataStore - Attempting Update subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.337 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onUpdateSlot {\n id\n … channel {\n id\n _deleted\n }\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.337 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.337 DataStore - Attempting Delete subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.337 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onDeleteSlot {\n id\n … channel {\n id\n _deleted\n }\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.338 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.338 DataStore - Attempting Create subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.338 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onCreateChannel {\n i… campaign {\n id\n _deleted\n }\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.338 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.339 DataStore - Attempting Update subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.339 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onUpdateChannel {\n i… campaign {\n id\n _deleted\n }\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.339 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.339 DataStore - Attempting Delete subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.339 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onDeleteChannel {\n i… campaign {\n id\n _deleted\n }\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.340 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.340 DataStore - Attempting Create subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.340 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onCreateCampaign {\n … _version\n _lastChangedAt\n _deleted\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.340 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.340 DataStore - Attempting Update subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.341 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onUpdateCampaign {\n … _version\n _lastChangedAt\n _deleted\n }\n}\n', …}
ConsoleLogger.ts:115 [DEBUG] 51:28.341 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.341 DataStore - Attempting Delete subscription with authMode: AWS_LAMBDA
ConsoleLogger.ts:125 [DEBUG] 51:28.341 PubSub - subscribe options {provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER), appSyncGraphqlEndpoint: 'https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql', authenticationType: 'AWS_LAMBDA', apiKey: undefined, query: 'subscription operation {\n onDeleteCampaign {\n … _version\n _lastChangedAt\n _deleted\n }\n}\n', …}additionalHeaders: {Authorization: 'custom-token'}apiKey: undefinedappSyncGraphqlEndpoint: "https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql"authToken: undefinedauthenticationType: "AWS_LAMBDA"graphql_headers: ƒ ()provider: Symbol(INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER)query: "subscription operation {\n onDeleteCampaign {\n id\n title\n site\n template\n project\n startDate\n endDate\n ianaTimezone\n priority\n status\n createdAt\n updatedAt\n _version\n _lastChangedAt\n _deleted\n }\n}\n"region: "eu-west-1"variables: {}[[Prototype]]: Object
ConsoleLogger.ts:115 [DEBUG] 51:28.341 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.342 AWSAppSyncRealTimeProvider - Authenticating with AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.343 AWSAppSyncRealTimeProvider - Initializaling retryable Handshake
ConsoleLogger.ts:115 [DEBUG] 51:28.343 Util - bound attempt #1 with this vars: ["wss://xxxxx.appsync-realtime-api.eu-west-1.amazonaws.com/graphql?header=eyJBdXRob3JpemF0aW9uIjoidDB0MGswIiwiaG9zdCI6InBlYjN2enBydGJmajdiNDV3ZHBzY2Zta3phLmFwcHN5bmMtYXBpLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tIn0=&payload=e30="]
ConsoleLogger.ts:115 [DEBUG] 51:28.344 AWSAppSyncRealTimeProvider - Initializing handshake wss://xxxxx.appsync-realtime-api.eu-west-1.amazonaws.com/graphql?header=eyJBdXRob3JpemF0aW9uIjoidDB0MGswIiwiaG9zdCI6InBlYjN2enBydGJmajdiNDV3ZHBzY2Zta3phLmFwcHN5bmMtYXBpLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tIn0=&payload=e30=
ConsoleLogger.ts:125 [DEBUG] 51:28.345 Hub - Dispatching to datastore with {event: 'outboxStatus', data: {…}}data: {isEmpty: true}event: "outboxStatus"[[Prototype]]: Object
ConsoleLogger.ts:125 [DEBUG] 51:28.351 Hub - Dispatching to datastore with {event: 'syncQueriesStarted', data: {…}}
ConsoleLogger.ts:115 [DEBUG] 51:28.351 DataStore - Attempting sync with authMode: AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:28.351 Util - attempt #1 with this vars: ["query operation($limit: Int, $nextToken: String, $lastSync: AWSTimestamp, $filter: ModelCampaignFilterInput){\n\t\tsyncCampaigns(limit: $limit, nextToken: $nextToken, lastSync: $lastSync, filter: $filter){\n\t\t\titems {\n\t\t\t\t\t\t\tid\ntitle\nsite\ntemplate\nproject\nstartDate\nendDate\nianaTimezone\npriority\nstatus\ncreatedAt\nupdatedAt\n_version\n_lastChangedAt\n_deleted\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextToken\n\t\t\t\t\t\tstartedAt\n\t\t}\n\t}",{"limit":1000,"nextToken":null,"lastSync":1656429276916,"filter":null}]
ConsoleLogger.ts:125 [DEBUG] 51:28.353 RestClient - POST https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql
ConsoleLogger.ts:115 [DEBUG] 51:29.176 DataStore - Sync successful with authMode: AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:29.177 DataStore - Attempting sync with authMode: AWS_LAMBDA
ConsoleLogger.ts:115 [DEBUG] 51:29.177 Util - attempt #1 with this vars: ["query operation($limit: Int, $nextToken: String, $lastSync: AWSTimestamp, $filter: ModelChannelFilterInput){\n\t\tsyncChannels(limit: $limit, nextToken: $nextToken, lastSync: $lastSync, filter: $filter){\n\t\t\titems {\n\t\t\t\t\t\t\tid\nchannelType\nrefinements\ncreatedAt\nupdatedAt\n_version\n_lastChangedAt\n_deleted\ncampaign { id _deleted }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextToken\n\t\t\t\t\t\tstartedAt\n\t\t}\n\t}",{"limit":1000,"nextToken":null,"lastSync":1656429277204,"filter":null}]
ConsoleLogger.ts:125 [DEBUG] 51:29.179 RestClient - POST https://xxxxx.appsync-api.eu-west-1.amazonaws.com/graphql
ConsoleLogger.ts:115 [DEBUG] 51:29.211 AWSAppSyncRealTimeProvider - subscription message from AWS AppSyncRealTime: {"type":"connection_ack","payload":{"connectionTimeoutMs":300000}}
9ConsoleLogger.ts:115 [DEBUG] 51:29.212 AWSAppSyncRealTimeProvider - Notifying connection successful
ConsoleLogger.ts:115 [DEBUG] 51:29.214 AWSAppSyncRealTimeProvider - subscription message from AWS AppSync RealTime: {"type":"ka"}
ConsoleLogger.ts:118 [DEBUG] 51:29.214 AWSAppSyncRealTimeProvider {id: '', observer: null, query: '', variables: {…}}
ConsoleLogger.ts:125 [DEBUG] 51:29.214 Hub - Dispatching to datastore with {event: 'modelSynced', data: {…}}

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@chrisbonifacio chrisbonifacio added GraphQL Related to GraphQL API issues pending-triage Issue is pending triage labels Jun 30, 2022
@chrisbonifacio
Copy link
Contributor

This may be fixed by #10090

@mtrani
Copy link
Author

mtrani commented Aug 31, 2022

Currently I am not able to reproduce it with the same setup because so much changed and datastore was removed completely. For these reasons, for the moment, I will it close it

@mtrani mtrani closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GraphQL Related to GraphQL API issues p4
Projects
None yet
Development

No branches or pull requests

3 participants