Open snozoka opened 1 year ago
Hey @snozoka, thank you for reaching out. Could you try adding the --debug
and provide the output being displayed.
The issue appears to be similar to https://github.com/aws-amplify/amplify-cli/issues/12747 where i observed the update command threw a different error.
Additionally, for could you try pulling the Amplify backend with the --debug
in a new directory and re-run amplify update notification
then run amplify push --debug
. Do let us know if you observe the same error message.
Hi @ykethan thanks for your response. Here's what I get when I run 'amplify update notification --debug' :
π pushTransform already has a running timer
Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
UnknownFault: pushTransform already has a running timer
at genericErrorToAmplifyException (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:126:49)
at handleException (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:27:28)
at process.<anonymous> (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:48:93)
at process.emit (node:events:513:28)
at process.processEmit [as emit] (/snapshot/repo/build/node_modules/signal-exit/index.js:199:34)
at process._fatalException (node:internal/process/execution:149:25)
pushTransform already has a running timer
Error: pushTransform already has a running timer
at UsageData.startCodePathTimer (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/domain/amplify-usageData/UsageData.js:74:19)
at AmplifyToolkit.pushResources (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/push-resources.js:38:23)
at run (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-analytics/lib/commands/analytics/push.js:17:18)
at inAppMessagingMigrationCheck (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-analytics/lib/migrations/in-app-messaging-migration.js:125:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async analyticsMigrations (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-analytics/lib/migrations/index.js:11:3)
at async migrationCheck (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-notifications/lib/migrations/index.js:7:9)
at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-notifications/lib/index.js:57:5)
at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:135:5)
at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:33:9)
at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)
Session Identifier: 34e25dc3-ff52-463f-bf84-f94a1145959e
β
Report saved: /tmp/Soar/report-1687094368886.zip
β Done
Project Identifier: adf24a36f9a97bc1518d1dfa8861c7ae
Additionally, below is the error I get when I try pulling the Amplify backend with the '--debug'
"
β οΈ Local changes detected. β οΈ Pulling changes from the cloud will override your local changes. ? Are you sure you would like to continue? Yes β Έ Fetching updates to backend environment: staging from the cloud.Overrides functionality is not implemented for this category β ΄ Building resource api/Soar[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. [WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated. use addDependency This API will be removed in the next major release. β § Building resource api/Soarβ GraphQL schema compiled successfully.
Edit your schema at /Users/Scott/Documents/GitHub/Soar/amplify/backend/api/Soar/schema.graphql or place .graphql files in a directory at /Users/Scott/Documents/GitHub/Soar/amplify/backend/api/Soar/schema Overrides functionality is not implemented for this category Overrides functionality is not implemented for this category β Successfully pulled backend environment staging from the cloud. β Successfully retrieved channel information for FCM. β Channel information retrieved for Email β There was an error initializing your environment. π Could not initialize categories for 'staging': Cannot read properties of undefined (reading 'Soar4JrbB')
Resolution: Review the error message and stack trace for additional information. Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
ProjectInitFault: Could not initialize categories for 'staging': Cannot read properties of undefined (reading 'Soar4JrbB') at initializeEnv (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/initialize-env.js:114:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async pullBackend (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/pull-backend.js:31:5) at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/pull.js:46:17) at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:189:9) at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:135:5) at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:33:9) at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5)
Cannot read properties of undefined (reading 'Soar4JrbB') TypeError: Cannot read properties of undefined (reading 'Soar4JrbB') at writeData (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-notifications/lib/multi-env-manager-utils.js:60:89) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.initEnv (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-notifications/lib/multi-env-manager.js:76:13) at async initEnv (/snapshot/repo/build/node_modules/@aws-amplify/amplify-category-notifications/lib/index.js:47:5)
Session Identifier: e4911749-7286-403f-83b5-139e56e41269
β Report saved: /tmp/Soar/report-1687094787166.zip
β Done
Project Identifier: adf24a36f9a97bc1518d1dfa8861c7ae
And here's what I get when I run amplify push --debug:
Not pulling components because this project is not configured as a javascript frontend.
β Fetching updates to backend environment: staging from the cloud.Overrides functionality is not implemented for this category
β Fetching updates to backend environment: staging from the cloud.[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
β Έ Fetching updates to backend environment: staging from the cloud.β
GraphQL schema compiled successfully.
Edit your schema at /Users/Scott/Documents/GitHub/Soar/amplify/backend/api/Soar/schema.graphql or place .graphql files in a directory at /Users/Scott/Documents/GitHub/Soar/amplify/backend/api/Soar/schema
Overrides functionality is not implemented for this category
Overrides functionality is not implemented for this category
β Successfully pulled backend environment staging from the cloud.
Current Environment: staging
βββββββββββββββββ¬ββββββββββββββββββββββββ¬ββββββββββββ¬ββββββββββββββββββββ
β Category β Resource name β Operation β Provider plugin β
βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Auth β soar β No Change β awscloudformation β
βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Api β Soar β No Change β awscloudformation β
βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β soarlambdafunction β No Change β awscloudformation β
βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Notifications β Soar4JrbB β No Change β β
βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Storage β s3soarstoragecb023aae β No Change β awscloudformation β
βββββββββββββββββ΄ββββββββββββββββββββββββ΄ββββββββββββ΄ββββββββββββββββββββ
β Are you sure you want to continue? (Y/n) Β· yes
Overrides functionality is not implemented for this category
β Ό Building resource api/Soar[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
use addDependency
This API will be removed in the next major release.
β ¦ Building resource api/Soarβ
GraphQL schema compiled successfully.
Edit your schema at /Users/Scott/Documents/GitHub/Soar/amplify/backend/api/Soar/schema.graphql or place .graphql files in a directory at /Users/Scott/Documents/GitHub/Soar/amplify/backend/api/Soar/schema
Overrides functionality is not implemented for this category
Overrides functionality is not implemented for this category
Deployment state saved successfully.
GraphQL transformer version: 2
Not pulling components because this project is not configured as a javascript frontend.
Hey @snozoka, thank you for the information. Could you let us know the Amplify CLI version the project and the notifications category created on as this would enable us in reproducing the issue? Additionally, if possible could you try removing the notifications channel and then re-add the channels back in?
Marking this as bug for further investigation.
Hi @ykethan below are the responses to your question. I attempted to remove the notifications category but it still appears when I run 'amplify status'
... % sudo amplify status
Current Environment: staging
βββββββββββββββββ¬ββββββββββββββββββββββββ¬ββββββββββββ¬ββββββββββββββββββββ β Category β Resource name β Operation β Provider plugin β βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€ β Auth β soar β No Change β awscloudformation β βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€ β Api β Soar β No Change β awscloudformation β βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€ β Function β soarlambdafunction β No Change β awscloudformation β βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€ β Notifications β Soar4JrbB β No Change β β βββββββββββββββββΌββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€ β Storage β s3soarstoragecb023aae β No Change β awscloudformation β βββββββββββββββββ΄ββββββββββββββββββββββββ΄ββββββββββββ΄ββββββββββββββββββββ
Pinpoint URL to track events GraphQL endpoint: GraphQL API KEY:
GraphQL transformer version: 2
... % sudo amplify remove notifications
Password:
? Choose the notification channel to remove β¦
FCM | Β» Firebase Push Notifications
β― All channels on Pinpoint resource : Soar4JrbB
β Choose the notification channel to remove Β· All channels on Pinpoint resource : Soar4JrbB β Confirm that you want to delete the associated Amazon Pinpoint application (y/N) Β· yes Deployment state saved successfully. The Pinpoint application has been successfully deleted. ...Soar % sudo amplify remove notifications Password: ? Choose the notification channel to remove β¦ (Use arrow keys or type to filter) β― FCM | Β» Firebase Push Notifications Email All channels on Pinpoint resource : Soar4JrbB Cancel
Hey @snozoka, thank you for the information. I observed that the project currently does not have a analytics resource present in the project as when adding a notifications resource a analytics pinpoint resource automatically gets added to the project. was the analytics resource manually removed? unfortunately it appears we may have to manually remove the resource from the project. To remove the notifications and analytics from the project we can utilize the following steps.
amplify/backend/
amplify/team-provider-info.json
amplify/backend/backend-config.json
. this includes the parameters as well.amplify env checkout <current-env-name>
DELETE
stateamplify push -y
Hi @ykethan it appears the analytics and notifications resources are removed, but for some reason I'm still not able to pull the project from Amplify Studio; I'm getting an error saying "Cannot read properties of undefined" (se images below) which was the error I was previously getting, and which was related to Notifications.
I'm now thinking it may be best to start all over, clean AWS from the Android project and pull the project from Amplify Studio; how can I do this?
Hello,
Any help with the above?
I'm still not able to pull the project from the cloud or save and deploy my data model.
Thanks
Please ignore; I've deleted the Amplify project and started over.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.15.1
Amplify CLI Version
12.0.3
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
I ran 'amplify update notifications' and get the follow error/resolution message:
" Edit your schema at /.../schema.graphql or place .graphql files in a directory at /...schema Deployment state saved successfully.
GraphQL transformer version: 2
π pushTransform already has a running timer
Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report' Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
"
Expected behavior
I expect 'notifications' category to be updated (even though I have not made any manual change). I also expect to be able to run 'amplify pull --appId XXX --envName staging' and 'amplify push' successfully. Currently I'm getting "Could not initialize categories for 'staging': Cannot read properties of undefined (reading 'Soar4JrbB')" when I run 'amplify pull'
Reproduction steps
Project Identifier
adf24a36f9a97bc1518d1dfa8861c7ae
Log output
" β § Building resource api/Soarβ GraphQL schema compiled successfully.
Edit your schema at /.../schema.graphql or place .graphql files in a directory at /...schema Deployment state saved successfully.
GraphQL transformer version: 2
π pushTransform already has a running timer
Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report' Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Session Identifier: c774bd85-f540-4c40-b2db-a822f7201ecf
β Report saved: /...zip
β Done
"
Additional information
No response
Before submitting, please confirm: