Open ErhardScampi opened 1 year ago
Addition info : This line is red : apiartApi AWS::CloudFormation::Stack UPDATE_.
So I think its because of the schema.Graphlql. To solve my error I need to know which error, but this I can't find out because of the bug described above. only if You want help me out with a workaround here my schema.graphql :
type Collection @model @auth(rules: [{allow: owner, ownerField: "owner"}, {allow: public, provider: iam, operations: [read]}]) {
id: ID!
name: String!
uuid: String
presentationKinds: [String]
items: [ItemInCollection]
items_as_json: String
description_long: String
description_short: String
exportTemplate: String
url_leadingImage: String
visability: String
xxx: Boolean
profileId: String
userID: ID! @index(name: "byUser")
user: User @belongsTo(fields: ["userID"])
links_as_json: String
order: Int
}
type Import @model @auth(rules: [{allow: owner, ownerField: "owner"}, {allow: private, operations: [read]}]) {
id: ID!
importDate: String!
items: [Item] @hasMany(indexName: "byImport")
count: String
}
type Item @model @auth(rules: [{allow: owner, ownerField: "owner"}, {allow: public, provider: iam, operations: [read]}]) {
id: ID!
title: String
uuid: String @index(name: "byUUID", queryField: "itemsByUUID")
author: String
description_long: String
description_short: String
resolutions: [String]
edition_kind: String
edition_data: String
licence: String
ownLicence: String
originalFilename: String @index(name: "byOriginalFileName", queryField: "itemByOriginalFileName")
filename: String!
status: String
uploaded_year: Int
uploaded_month: Int
uploaded_day: Int
tags: [Tag]
path: String!
pathSec: String
importID: ID! @index(name: "byImport", queryField: "itemsByImport", sortKeyFields: ["id"])
ranking: Int
level: String
ipfs: String
Info: String
baseurl: String
subItems: [String]
kind: String
xxx: Boolean
userID: String
}
type Tag {
id: String
tagName: String
}
type ItemInCollection {
id: String
url: String
title: String
author: String
description_long: String
description_short: String
is_leading_image: Boolean
resolutions: [String]
tags: [Tag]
user: String
ipfs: String
uuid: String
profileId: String
order: Int
treatment: String
printDescription: Boolean
add_info: String
hide_details: Boolean
}
type FullTag @model @auth(rules: [{allow: owner, ownerField: "owner"}, {allow: public, provider: iam, operations: [read]}]) {
id: ID!
tagName: String! @index(name: "byTagName", queryField: "tagsByName")
itemIds: [String]
kind: String
userID: ID @index(name: "byUser", queryField: "tagsbyProfileId")
xxx: Boolean
}
type User @model @auth(rules: [{allow: owner, ownerField: "owner"}, {allow: public, provider: iam, operations: [read]}]) {
id: ID!
name: String @index(name: "byName", queryField: "userByName")
story: String
philosophy: String
collections: [Collection] @hasMany(indexName: "byUser", fields: ["id"])
FullTags: [FullTag] @hasMany(indexName: "byUser", fields: ["id"])
tags_as_json: String
avartar: String
ownNFTPlatforms: String
status: String
homepage: String
searchName: String @index(name: "bySearchName", queryField: "userBySearchName")
email: String @index(name: "byEmail", queryField: "userByEmail")
cognitoId: String! @index(name: "byCognitoId", queryField: "userByCognitoId")
adress: String
socialPlatforms: String
sex: String
callme: String
speech: String
payment_id: String
}
type Event @model @auth(rules: [{allow: owner, ownerField: "owner"}]) {
id: ID!
enventName: String
kind: String
payload: String
userID: String
eventYear: Int
eventMonth: Int
eventDay: Int
}
type Query {
reorganize(params: String): String @function(name: "reorganize-${env}")
myqueryresolver(params: String): String @function(name: "myqueryresolver-${env}") @auth(rules: [{allow: public, provider: iam}, {allow: owner}])
}```
Hey @ErhardScampi :wave: thanks for raising this! As we begin to take a further look at this I have a few questions to better understand the context:
--debug
to see if it prints a helpful stack trace?hey @josefaidt The last command was amplify serve --debug The output is Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
DeploymentFault: Resource is not in the state stackUpdateComplete at Object.run (/snapshot/repo/build/node_modules/amplify-provider-awscloudformation/lib/push-resources.js:444:11) at async Promise.all (index 0) at async providersPush (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/push-resources.js:125:5) at async AmplifyToolkit.pushResources [as _pushResources] (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/push-resources.js:102:13) at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/run.js:6:5) at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:177:9) at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:142:5) at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:40:9) at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)
Resource is not in the state stackUpdateComplete
ResourceNotReady: Resource is not in the state stackUpdateComplete
at constructor.setError (/snapshot/repo/build/node_modules/aws-sdk/lib/resource_waiter.js:182:47)
at Request.CHECK_ACCEPTORS (/snapshot/repo/build/node_modules/aws-sdk/lib/resource_waiter.js:44:12)
at Request.callListeners (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/snapshot/repo/build/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /snapshot/repo/build/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.
Session Identifier: 0fb4bf31-1af7-4c01-9754-69b284b33e2b
β Report saved: /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/Artbarrack/report-1677526414160.zip
β Done
Project Identifier: 36d4c405c5d2a8293fe6a5b2a72ea07f
I do not find this run under Cloudformation I event find no events tab
The last run was
amplify-artbarrack-alis-235933-functionartbarrackf557cb0ePreAuthentication-I8K7BKHY9C8FVERSCHACHTELT | CREATE_COMPLETE | 2023-02-26 17:05:31 UTC+0100 |
---|
amplify-artbarrack-alis-235933-functionartbarrackf557cb0ePreAuthentication-I8K7BKHY9C8F VERSCHACHTELT CREATE_COMPLETE 2023-02-26 17:05:31 UTC+0100
Hey @ErhardScampi :wave: thanks for clarifying. Can you try pushing your changes with amplify push --debug
?
Here the push output :
daphne code$ amplify push --debug
Not pulling components because this project is not configured with the "react" framework.
β There was an error pulling the backend environment alis.
π Client network socket disconnected before secure TLS connection was established
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
BackendPullFault: Client network socket disconnected before secure TLS connection was established
at syncCurrentCloudBackend (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/push.js:54:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/push.js:68:5)
at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:177:9)
at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:142:5)
at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:40:9)
at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)
Client network socket disconnected before secure TLS connection was established
Error: Client network socket disconnected before secure TLS connection was established
at connResetException (internal/errors.js:639:14)
at TLSSocket.onConnectEnd (_tls_wrap.js:1570:19)
at TLSSocket.emit (events.js:412:35)
at TLSSocket.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
Session Identifier: 3c1e8a01-9df4-4e8e-8aea-f78464b9165c
β
Report saved: /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/Artbarrack/report-1677527188569.zip
β Done
Project Identifier: 36d4c405c5d2a8293fe6a5b2a72ea07f
daphne code$ cd /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/A
AppTranslocation/ AudioComponentRegistrar/
Hey @ErhardScampi thanks for posting that, and that is interesting. Are you working behind a corporate proxy or VPN by chance?
No. direct access. But This error comes also when I push to github an the feature branch is build at aws. See below from build window in the aws console
## Checking for associated backend environment...
## Backend environment association found
2023-02-26T20:36:52.446Z [INFO]: [0mAmplify AppID found: do4aawpjdtirb. Amplify App name is: Artbarrack[0m
2023-02-26T20:36:52.499Z [INFO]: [0mBackend environment alis found in Amplify Console app: Artbarrack[0m
2023-02-26T20:36:53.400Z [WARNING]: - Fetching updates to backend environment: alis from the cloud.
2023-02-26T20:36:54.332Z [WARNING]: - Building resource api/artApi
2023-02-26T20:36:54.973Z [WARNING]: Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
2023-02-26T20:36:55.084Z [INFO]: β οΈ WARNING: owners may reassign ownership for the following model(s) and role(s): Collection: [owner], Import: [owner], Item: [owner], FullTag: [owner], User: [owner], Event: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
2023-02-26T20:36:56.375Z [INFO]: β
GraphQL schema compiled successfully.
Edit your schema at /codebuild/output/src736418681/src/artbarrack/code/amplify/backend/api/artApi/schema.graphql or place .graphql files in a directory at /codebuild/output/src736418681/src/artbarrack/code/amplify/backend/api/artApi/schema
2023-02-26T20:36:56.376Z [WARNING]: - Building resource auth/artbarrackf557cb0e
2023-02-26T20:36:56.455Z [WARNING]: - Building resource auth/userPoolGroups
2023-02-26T20:36:56.543Z [WARNING]: - Building resource storage/ItemStorage
2023-02-26T20:36:56.584Z [WARNING]: β Successfully pulled backend environment alis from the cloud.
2023-02-26T20:36:56.750Z [INFO]: β
2023-02-26T20:36:58.448Z [INFO]: [33mNote: It is recommended to run this command from the root of your app directory[39m
2023-02-26T20:36:59.823Z [WARNING]: - Initializing your environment: alis
2023-02-26T20:37:00.765Z [WARNING]: - Building resource api/artApi
2023-02-26T20:37:01.305Z [WARNING]: Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
2023-02-26T20:37:01.432Z [INFO]: β οΈ WARNING: owners may reassign ownership for the following model(s) and role(s): Collection: [owner], Import: [owner], Item: [owner], FullTag: [owner], User: [owner], Event: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
2023-02-26T20:37:02.844Z [INFO]: β
GraphQL schema compiled successfully.
Edit your schema at /codebuild/output/src736418681/src/artbarrack/code/amplify/backend/api/artApi/schema.graphql or place .graphql files in a directory at /codebuild/output/src736418681/src/artbarrack/code/amplify/backend/api/artApi/schema
2023-02-26T20:37:02.845Z [WARNING]: - Building resource auth/artbarrackf557cb0e
2023-02-26T20:37:02.943Z [WARNING]: - Building resource auth/userPoolGroups
2023-02-26T20:37:03.057Z [WARNING]: - Building resource storage/ItemStorage
2023-02-26T20:37:03.089Z [WARNING]: β Initialized provider successfully.
2023-02-26T20:37:04.850Z [WARNING]: - Uploading files.
2023-02-26T20:37:04.856Z [WARNING]: - Uploading files.
2023-02-26T20:37:05.650Z [WARNING]: - Uploading files.
2023-02-26T20:37:05.733Z [WARNING]: - Building resource api/artApi
2023-02-26T20:37:06.355Z [WARNING]: Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
2023-02-26T20:37:06.443Z [INFO]: β οΈ WARNING: owners may reassign ownership for the following model(s) and role(s): Collection: [owner], Import: [owner], Item: [owner], FullTag: [owner], User: [owner], Event: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-data-access.
2023-02-26T20:37:07.565Z [INFO]: β
GraphQL schema compiled successfully.
Edit your schema at /codebuild/output/src736418681/src/artbarrack/code/amplify/backend/api/artApi/schema.graphql or place .graphql files in a directory at /codebuild/output/src736418681/src/artbarrack/code/amplify/backend/api/artApi/schema
2023-02-26T20:37:07.566Z [WARNING]: - Building resource auth/artbarrackf557cb0e
2023-02-26T20:37:07.653Z [WARNING]: - Building resource auth/userPoolGroups
2023-02-26T20:37:07.721Z [WARNING]: - Building resource storage/ItemStorage
2023-02-26T20:37:07.757Z [WARNING]: - Uploading files.
2023-02-26T20:37:14.948Z [INFO]:
2023-02-26T20:37:14.954Z [INFO]: UPDATE_IN_PROGRESS amplify-artbarrack-alis-235933 AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:09 GMT+0000 (Coordinated Universal Time) User Initiated
UPDATE_IN_PROGRESS storageItemStorage AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:14 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS functionartbarrackf557cb0ePreAuthentication AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:14 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:37:19.943Z [INFO]:
2023-02-26T20:37:19.945Z [INFO]: UPDATE_COMPLETE storageItemStorage AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:15 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE functionartbarrackf557cb0ePreAuthentication AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:15 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS authartbarrackf557cb0e AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:17 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE authartbarrackf557cb0e AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:18 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:37:24.913Z [INFO]:
2023-02-26T20:37:24.915Z [INFO]: UPDATE_IN_PROGRESS apiartApi AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:20 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS authuserPoolGroups AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:21 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE authuserPoolGroups AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:22 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:37:25.049Z [INFO]:
2023-02-26T20:37:25.049Z [INFO]: UPDATE_IN_PROGRESS amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9 AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:21 GMT+0000 (Coordinated Universal Time) User Initiated
2023-02-26T20:37:30.024Z [INFO]:
2023-02-26T20:37:30.025Z [INFO]: UPDATE_IN_PROGRESS Collection AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:28 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS FunctionDirectiveStack AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:28 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Collection AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:29 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE FunctionDirectiveStack AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:29 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:37:35.155Z [INFO]:
2023-02-26T20:37:35.156Z [INFO]: UPDATE_IN_PROGRESS User AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:31 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS Import AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:32 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS Event AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:32 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS FullTag AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:32 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS Item AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:32 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE User AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:32 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Event AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:33 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Import AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:33 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Item AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:33 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:37:35.289Z [INFO]:
2023-02-26T20:37:35.290Z [INFO]: UPDATE_IN_PROGRESS amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9-FullTag-330TT34AI68D AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:32 GMT+0000 (Coordinated Universal Time) User Initiated
2023-02-26T20:37:45.263Z [INFO]:
2023-02-26T20:37:45.265Z [INFO]: CREATE_IN_PROGRESS QueryTagsByNameDataResolverFnQueryTagsByNameDataResolverFnAppSyncFunction9BA9B1C9 AWS::AppSync::FunctionConfiguration Sun Feb 26 2023 20:37:41 GMT+0000 (Coordinated Universal Time)
CREATE_IN_PROGRESS QueryTagsByNameDataResolverFnQueryTagsByNameDataResolverFnAppSyncFunction9BA9B1C9 AWS::AppSync::FunctionConfiguration Sun Feb 26 2023 20:37:43 GMT+0000 (Coordinated Universal Time) Resource creation Initiated
CREATE_COMPLETE QueryTagsByNameDataResolverFnQueryTagsByNameDataResolverFnAppSyncFunction9BA9B1C9 AWS::AppSync::FunctionConfiguration Sun Feb 26 2023 20:37:43 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:37:50.264Z [INFO]:
2023-02-26T20:37:50.266Z [INFO]: CREATE_IN_PROGRESS QuerytagsByNameResolver AWS::AppSync::Resolver Sun Feb 26 2023 20:37:46 GMT+0000 (Coordinated Universal Time)
CREATE_FAILED QuerytagsByNameResolver AWS::AppSync::Resolver Sun Feb 26 2023 20:37:47 GMT+0000 (Coordinated Universal Time) Only one resolver is allowed per field. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException; Request ID: 8d00fec7-d6c5-4c6c-a4ce-eee494290ee2; Proxy: null)
UPDATE_ROLLBACK_IN_PROGRESS amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9-FullTag-330TT34AI68D AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:48 GMT+0000 (Coordinated Universal Time) The following resource(s) failed to create: [QuerytagsByNameResolver].
2023-02-26T20:37:55.039Z [INFO]:
2023-02-26T20:37:55.041Z [INFO]: UPDATE_FAILED FullTag AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:54 GMT+0000 (Coordinated Universal Time) Embedded stack arn:aws:cloudformation:eu-central-1:807731452828:stack/amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9-FullTag-330TT34AI68D/5bfc3c60-9856-11ed-a229-0653b6118a76 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to create: [QuerytagsByNameResolver].
2023-02-26T20:38:00.059Z [INFO]:
2023-02-26T20:38:00.061Z [INFO]: UPDATE_ROLLBACK_IN_PROGRESS amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9 AWS::CloudFormation::Stack Sun Feb 26 2023 20:37:55 GMT+0000 (Coordinated Universal Time) The following resource(s) failed to update: [FullTag].
2023-02-26T20:38:09.977Z [INFO]:
2023-02-26T20:38:09.979Z [INFO]: UPDATE_FAILED apiartApi AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:08 GMT+0000 (Coordinated Universal Time) Embedded stack arn:aws:cloudformation:eu-central-1:807731452828:stack/amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9/2d727a80-9856-11ed-8730-0a8255980cbc was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [FullTag].
UPDATE_ROLLBACK_IN_PROGRESS amplify-artbarrack-alis-235933 AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:09 GMT+0000 (Coordinated Universal Time) The following resource(s) failed to update: [apiartApi].
2023-02-26T20:38:14.978Z [INFO]:
2023-02-26T20:38:14.981Z [INFO]: UPDATE_IN_PROGRESS storageItemStorage AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:13 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS functionartbarrackf557cb0ePreAuthentication AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:13 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE storageItemStorage AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:13 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE functionartbarrackf557cb0ePreAuthentication AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:14 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:15.049Z [INFO]:
2023-02-26T20:38:15.049Z [INFO]: UPDATE_IN_PROGRESS authartbarrackf557cb0e AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:14 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:19.974Z [INFO]:
2023-02-26T20:38:19.976Z [INFO]: UPDATE_COMPLETE authartbarrackf557cb0e AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:15 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS apiartApi AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:15 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS authuserPoolGroups AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:15 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE authuserPoolGroups AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:16 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:25.067Z [INFO]:
2023-02-26T20:38:25.069Z [INFO]: UPDATE_IN_PROGRESS Collection AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:22 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS FunctionDirectiveStack AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:22 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Collection AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:22 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE FunctionDirectiveStack AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:22 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS FullTag AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS User AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS Item AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS Event AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_IN_PROGRESS Import AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE User AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Item AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Event AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE Import AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:23 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:45.294Z [INFO]:
2023-02-26T20:38:45.296Z [INFO]: UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9-FullTag-330TT34AI68D AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:44 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:50.109Z [INFO]:
2023-02-26T20:38:50.111Z [INFO]: UPDATE_COMPLETE FullTag AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:45 GMT+0000 (Coordinated Universal Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS amplify-artbarrack-alis-235933-apiartApi-1FGH01N8AIUR9 AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:47 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:50.200Z [INFO]:
2023-02-26T20:38:50.200Z [INFO]: UPDATE_COMPLETE apiartApi AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:49 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:38:54.987Z [INFO]:
2023-02-26T20:38:54.988Z [INFO]: UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS amplify-artbarrack-alis-235933 AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:51 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE authuserPoolGroups AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:52 GMT+0000 (Coordinated Universal Time)
UPDATE_COMPLETE storageItemStorage AWS::CloudFormation::Stack Sun Feb 26 2023 20:38:52 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:39:15.014Z [INFO]:
2023-02-26T20:39:15.016Z [INFO]: UPDATE_COMPLETE apiartApi AWS::CloudFormation::Stack Sun Feb 26 2023 20:39:13 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:39:15.091Z [INFO]:
2023-02-26T20:39:15.091Z [INFO]: UPDATE_COMPLETE authartbarrackf557cb0e AWS::CloudFormation::Stack Sun Feb 26 2023 20:39:14 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:39:20.002Z [INFO]:
2023-02-26T20:39:20.003Z [INFO]: UPDATE_COMPLETE functionartbarrackf557cb0ePreAuthentication AWS::CloudFormation::Stack Sun Feb 26 2023 20:39:15 GMT+0000 (Coordinated Universal Time)
UPDATE_ROLLBACK_COMPLETE amplify-artbarrack-alis-235933 AWS::CloudFormation::Stack Sun Feb 26 2023 20:39:16 GMT+0000 (Coordinated Universal Time)
2023-02-26T20:39:40.139Z [INFO]: [K
2023-02-26T20:39:45.142Z [INFO]: π The following resources failed to deploy:
2023-02-26T20:39:45.144Z [INFO]: π Resource is not in the state stackUpdateComplete
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
2023-02-26T20:39:45.144Z [WARNING]: β There was an error initializing your environment.
2023-02-26T20:39:45.151Z [INFO]:
2023-02-26T20:39:45.152Z [INFO]: Session Identifier: 97a7ac18-c96d-4c4e-aac4-50d0e98eabc7
2023-02-26T20:39:45.153Z [WARNING]: - Creating Zip
2023-02-26T20:39:45.221Z [INFO]:
2023-02-26T20:39:45.221Z [INFO]: β
Report saved: /tmp/Artbarrack/report-1677443985170.zip
2023-02-26T20:39:45.221Z [WARNING]: - Sending zip
2023-02-26T20:39:46.814Z [WARNING]: β Done
2023-02-26T20:39:46.815Z [INFO]: Project Identifier: 36d4c405c5d2a8293fe6a5b2a72ea07f
2023-02-26T20:39:46.842Z [ERROR]: !!! Build failed
2023-02-26T20:39:46.842Z [ERROR]: !!! Non-Zero Exit Code detected
2023-02-26T20:39:46.842Z [INFO]: # Starting environment caching...
2023-02-26T20:39:46.842Z [INFO]: # Uploading environment cache artifact...
2023-02-26T20:39:46.908Z [INFO]: # Uploaded environment cache artifact
2023-02-26T20:39:46.908Z [INFO]: # Environment caching completed
Terminating logging...
Hey @ErhardScampi thanks for clarifying! Here is the error I was looking for, and it appears this is under the context of a GraphQL API
CREATE_FAILED QuerytagsByNameResolver AWS::AppSync::Resolver Sun Feb 26 2023 20:37:47 GMT+0000 (Coordinated Universal Time) Only one resolver is allowed per field. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException; Request ID: 8d00fec7-d6c5-4c6c-a4ce-eee494290ee2; Proxy: null)
Is this a custom resolver by chance? Would you mind sharing your GraphQL Schema and describe any modifications/overrides applied?
The complete schema I send yet yesterday (Please scroll a little bit up). Here the critical lines ?
type Query { reorganize(params: String): String @function(name: "reorganize-${env}") myqueryresolver(params: String): String @function(name: "myqueryresolver-${env}") @auth(rules: [{allow: public, provider: iam}, {allow: owner}]) }```
I did not change the resolvers . I just added these lines of code and my functions have been called
This are two lamda functions. If you need them I send You. This is a very good feature of amplify.... I can call functions do something and get the result via that query......
Is there another way instead to call lamda functions perhaps to solve my problem ? But.... its not easy to find that error . Thank You very much. Perhaps the message on the local device can be a little bit more senseful.
Here for additional info the use in the code. I searched for myqueryresolver A lot of things are generated by amplify. This is hidden from me. I just put the lines in the schema file and use it in the frontend. So I have access to the whole lamda world in the backend via this automatism . I hope this is possible with tranformer2 also. Here is my use of it : try { const params = { paramsStack: [{ what: "getPublicCollections", profileId: id }], }; const dataObj = await API.graphql({ query: myqueryresolver, variables: { params: JSON.stringify(params) }, authMode: "AWS_IAM", }); let rawdata; let objData; objData = dataObj; rawdata = JSON.parse(dataObj.data.myqueryresolver); const body = rawdata["body"]; const retWert = body[0][0]; return retWert; } catch (error) {
Hey @ErhardScampi thanks for clarifying! Were there any changes made to the schema prior to pushing? Was this index changed?
tagName: String! @index(name: "byTagName", queryField: "tagsByName")
Hello @josefaidt No I did not make any change here. A made a diff to a version prior amplify migrate. A lot of changes were made by amplify migrate. The complete diff output I attached . The line you mentioned was new and replaced
I upgraded to latest 10.8.1. --> same error
Then I deleted this lines from schema.graphql type Query { reorganize(params: String): String @function(name: "reorganize-${env}") myqueryresolver(params: String): String @function(name: "myqueryresolver-${env}") @auth(rules: [{allow: public, provider: iam}, {allow: owner}]) }
It works. -> Ergo this lines causes the error. But I need the functionality to call lamda functions from the frontend. Should I downgrade to transformer v1 ?
Hi @ErhardScampi, if you are able to push without any issues after removing the Query section. could you please retry adding the query section again and run "amplify push" and let us know?
Hi @AnilMaktala Yes It work now. I added the query section again and now lets say no error when amplify push ...... It also work when building via GitHub hook . But puuh no public access any more to the query functions and to the normal requests where I need public read access....
@AnilMaktala It works means the application builds remote and the push is without any errors. But....
I logged in user does not have access to the API. If I make the query from the AWS console (in APPSYNC) it works fine. From the code not. Here the output and the Codesnippet. (same Code worked with V1) (Browseroutput see screenshot. Code :
console.log("-----Begin ----- > searchId"); console.log(searchId); console.log("-----Ende ----- > searchId");
const allUsers = await API.graphql({ query: listUsers });
console.log("-----Begin ----- only to see> allUsers");
console.log(allUsers);
console.log("-----Ende ----- > allUsers");
const result = await API.graphql({
query: userByCognitoId,
variables: { cognitoId: searchId },
});
console.log("-----Begin ----- > result");
console.log(result);
console.log("-----Ende ----- > result");
if (result.data.userByCognitoId.items.length > 0) {
//save it to local storage//
The schema snippet is : type User @model @auth(rules: [{ allow: owner, operations: [create, read, update, delete] }]) { id: ID! name: String @index(name: "byName", queryField: "userByName") story: String philosophy: String.
Perhaps it helps for others, spend the whole night on this....
If You enable both IAM and user_pool auth in auth setup then you need explicit set the authmode in the code:
authMode: "AMAZON_COGNITO_USER_POOLS" in this case.
Here the example request
const result = await API.graphql({
query: createUser,
variables: { input: emptyUser },
authMode: "AMAZON_COGNITO_USER_POOLS", <<<<------
});
This was not necessary in v1 --> something for the docu.....
Remains the public access for my happyness. How do I have to change the IAM Rules to gain public access from the amazon managenemt Console Appsync query. There are to unauthRoles in the IAM for that environment. What have I to add there ?
I added custom-roles.json to the api directory with the content and pushed { "adminRoleNames": ["arn:aws:sts::50accountId2828:UnauthRole"] } The idea is from
https://github.com/aws-amplify/amplify-category-api/issues/100
Then the public access worked. I even can modify the access thru the IAM Access Editor ! great. Then I deleted the file custom-roles.json again and pushed only for curiousity...... It kept working...... Its so strange. Now I can modify the public access behavior thru the IAM System But this IAM json is not under Version control. Is there a way to do it locally and push the access-profile of the unAuthRole ? Perhaps with amplify push ? If I go thru my stages I do not want to modify it manually in every stage (branch).
Hey @ErhardScampi :wave: apologies for the delay here! Yes, you will need to specify the authMode
when you are attempting to use an auth mechanism that is not set as the default for your GraphQL API.
If you'd like to allow any logged-in user to access your API you can use allow: private
. allow: public, provider: iam
will allow guest access with your unauth role.
Now I can modify the public access behavior thru the IAM System
What sort of modifications are you looking at making to the unauth role?
@josefaidt : I found out that in transformer v1 I did not need to set the authmode AMAZON_COGNITO_USER_POOLS because it was default. I only needed AWS_IAM in case of public read. Now I need the specification always if not I get a auth error. This holds for all except lamdafunctions in @function There is a problem with the @function directive somehow --> I made a ticket aws-amplify/amplify-category-api#1397 Here I get always an auth error. This ticket (1312) is concerning the fact that the zip file is not generated despite the message of success. If you read aws-amplify/amplify-category-api#1397 @AnilMaktala also needs the zip file. So it is a circle. My problem is I have 2 productive systems unfortunatelly I started migration of one yet....
I have found the error of 1312: amplify diagnose --send-report. does not write the filesystems path. It makes the first letter in capital despite the directory in the filesystem is in lower letters. Here the output : Report saved: /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/Artbarrack/report-1681423075118.zip
But in this case Artbarrack is artbarrack on the filesystem :
cd /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/artbarrack/ analytics/ artbarrack/
There is no directory "Artbrrack" but "artbarrack".
Hey @ErhardScampi is the name of your project (found in amplify/.config/project-config.json
)? I created a sample app named MyProject
and generated a report:
MyProject on ξ main
β la /var/folders/w8/s6ds11f567b8bsk18jcmxdnc0000gr/T/ | grep MyProject
drwxr-xr-x@ 4 josef staff 128B Apr 17 16:42 MyProject
if I change this to myProject
it creates
β
Report saved: /var/folders/w8/s6ds11f567b8bsk18jcmxdnc0000gr/T/myProject/report-1681775097114.zip
however these reports are actually stored under MyProject
since the macOS filesystem is case-insensitive
MyProject on ξ main
β la /var/folders/w8/s6ds11f567b8bsk18jcmxdnc0000gr/T/MyProject/
total 32
-rw-r--r--@ 1 josefai staff 2.1K Apr 17 16:42 report-1681774936012.zip
-rw-r--r--@ 1 josefai staff 2.1K Apr 17 16:42 report-1681774942542.zip
-rw-r--r--@ 1 josefai staff 2.1K Apr 17 16:44 report-1681775097114.zip
-rw-r--r--@ 1 josefai staff 2.1K Apr 17 16:49 report-1681775367543.zip
Was the project name changed recently from Artbarrack
to artbarrack
?
Hi @josefaidt , its in capital letter in the config file.
{ "providers": [ "awscloudformation" ], "projectName": "Artbarrack", "version": "3.1", "frontend": "javascript", "javascript": { "framework": "vue", "config": { "SourceDir": "src", "DistributionDir": "dist", "BuildCommand": "npm run-script build", "StartCommand": "npm run-script serve" } } }
I deleted the artbarrack folder. Provocated an error and then a Artrbarrack folder is generated. So I think it was a bug in a previous version. The artbarrack then prohibits to generate Artbarrack. So I think this ticket can be closed or you make it a little bit resilient and add timestamps to the foldername or something like that.
Hey @ErhardScampi glad to hear it's able to generate properly after deleting the folder, and I believe you might be right. In any event, I think that is a reasonable move to add timestamps to the foldername or create a folder name that will always be lowercase. Something like
os.tmpdir()/amplify-${projectName.toLowerCase()}
I've transferred this back over to the CLI repo and will be marking this as a feature request to improve the experience here π
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli
If applicable, what version of Node.js are you using?
v16.18.0
Amplify CLI Version
10.7.3
What operating system are you using?
MAC M1
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes
Describe the bug
Backendbuild fails locally and remote Errormessage not usable No zip log File generated
Expected behavior
Should show me a error message or at least generate an error zip
Reproduction steps
amplify migrate perhaps my GraphQL.shema is wrong but how can I find out ?
Project Identifier
36d4c405c5d2a8293fe6a5b2a72ea07f
Log output
Additional information
Here the srcreenOutput I made an amplify serve. At the end You can see that there is no error zip even no directory with the zip
? Are you sure you want to continue? Yes
Deployment failed. Deploying root stack Artbarrack [ =========================----------- amplify-artbarrack-alis-235933 AWS::CloudFormation::Stack UPDATE storageItemStorage AWS::CloudFormation::Stack UPDATE functionartbarrackf557cb0ePre⦠AWS::CloudFormation::Stack UPDATE authartbarrackf557cb0e AWS::CloudFormation::Stack UPDATE apiartApi AWS::CloudFormation::Stack UPDATE authuserPoolGroups AWS::CloudFormation::Stack UPDATE
Deployed auth artbarrackf557cb0e [ =================================== Deployed auth userPoolGroups [ ======================================= Deploying function myqueryresolver [ --------------------------------- Deploying function reorganize [ -------------------------------------- Deployed function artbarrackf557cb0ePreAuthentication [ ==============
π The following resources failed to deploy: π Resource is not in the state stackUpdateComplete
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Session Identifier: bd709ceb-87fc-4626-b1f9-4bc6e378104a
β Report saved: /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/Artbarrack/report-1677445189855.zip
β Done
Project Identifier: 36d4c405c5d2a8293fe6a5b2a72ea07f
daphne code$ cd /var/folders/2w/cs5c31ln07l07km7mt594pnc0000gq/T/A Pressing TAB now to see the possibilities:
AppTranslocation/ AudioComponentRegistrar/
No Artbarrack subDir as mentioned in the Report saved line.
Before submitting, please confirm: