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

amplify env add fails when notification add #13443

Closed
hirokazu opened this issue Dec 1, 2023 · 4 comments
Closed

amplify env add fails when notification add #13443

hirokazu opened this issue Dec 1, 2023 · 4 comments
Labels
notifications Issues tied to the notifications category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question

Comments

@hirokazu
Copy link

hirokazu commented Dec 1, 2023

Amplify CLI Version

12.8.2

Question

Describe the bug

Happened when I added a new env in a project that added push notifications to the amplify project.

% amplify env add upsandbox
Note: It is recommended to run this command from the root of your app directory
Using default provider  awscloudformation
? Select the authentication method you want to use: AWS profile

For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

? Please choose the profile you want to use xxxxxxxxxxxxxxxx
Adding backend environment upsandbox to AWS Amplify app: xxxxxxxxxxxxxxxx

Deployment completed.
Deploying root stack xxx [ ---------------------------------------- ] 0/4
        amplify-xxx-ups… AWS::CloudFormation::Stack     CREATE_IN_PROGRESS             Fri Dec 01 2023 15:16:00…     
        AuthRole                       AWS::IAM::Role                 CREATE_IN_PROGRESS             Fri Dec 01 2023 15:16:03…     
        DeploymentBucket               AWS::S3::Bucket                CREATE_IN_PROGRESS             Fri Dec 01 2023 15:16:03…     
        UnauthRole                     AWS::IAM::Role                 CREATE_IN_PROGRESS             Fri Dec 01 2023 15:16:03…     

Deployment state saved successfully.
⠹ Initializing your environment: upsandbox
⠸ Initializing your environment: upsandbox
✅ GraphQL schema compiled successfully.

Edit your schema at /Users/hirokazu/source/xxx-xxx-app/amplify/backend/api/xxx/schema.graphql or place .graphql files in a directory at /Users/hirokazu/source/xxx-xx-app/amplify/backend/api/xxx/schema
✔ Initialized provider successfully.
⚠️ Pinpoint resource is only locally created
⚠️ Run "amplify push" to deploy the Pinpoint resource and then retry...
Channel APNS requires a Pinpoint resource in the cloud. Proceeding to deploy Auth and Pinpoint resources...

    Current Environment: upsandbox
    
┌──────────┬────────────────────────────────────────────┬───────────┬───────────────────┐
│ Category │ Resource name                              │ Operation │ Provider plugin   │
├──────────┼────────────────────────────────────────────┼───────────┼───────────────────┤
│ Auth     │ appxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx          │ Create    │ awscloudformation │
├──────────┼────────────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ appxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │ Create    │ awscloudformation │
└──────────┴────────────────────────────────────────────┴───────────┴───────────────────┘
🛑 Channel APNS: Auth and Pinpoint resources deployment failed with Error PushResourcesFault: Failed to create Pinpoint resource for the given environment: Cannot read properties of undefined (reading 'logicalId')
✖ There was an error initializing your environment.
🛑 Failed to create Pinpoint resource for the given environment: Cannot read properties of undefined (reading 'logicalId')

Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: xxxxxxxxxxxxxxxx-b7eb-47c1-b859-1b4f3efc2c45

Steps To Reproduce

Steps to reproduce the behavior:
1. run `amplify add notifications`
2. Choose the notification channel to enable · APNS |  Apple Push Notifications
3. Provide your pinpoint resource name: "myprojectname"
4. Apps need authorization to send analytics events. Do you want to allow guests and unauthenticated use
rs to send analytics events? (we recommend you allow this when getting started) "Yes"
5. `amplify push`
6. `amplify env add`

Is this a regression?

No

Regression additional context

No response

Device

No response

iOS Version

No response

Specific to simulators

No response

Additional context

No response

@hirokazu hirokazu added pending-triage Issue is pending triage question General question labels Dec 1, 2023
@ykethan
Copy link
Member

ykethan commented Dec 1, 2023

Issue appears to be similar to #13208

@ykethan ykethan added the notifications Issues tied to the notifications category label Dec 1, 2023
@ykethan
Copy link
Member

ykethan commented Dec 1, 2023

@hirokazu tried reproducing the issue with the following

  1. amplify init
  2. amplify add notifications which auto pushed auth and analytics
  3. select APNS and added p12 file
  4. amplify add env
  5. auto created auth, analytics and prompted for APNS channel.
    did not observe any error.

Could you run amplify diagnose --send-report and provide us the project identifier output. Could you provide some information on the auth resource was the auth resource added via the notifications category or via add auth?
Was the pinpoint/Analytics resource removed before the add env?

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Dec 1, 2023
@josefaidt
Copy link
Contributor

Closing due to inactivity

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notifications Issues tied to the notifications category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question
Projects
None yet
Development

No branches or pull requests

3 participants