amplify-cli: Build Failed - Parameters: [oAuthSecretsPathAmplifyAppId] must have values after upgrading Amplify CLI to latest version

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v16.10.0

Amplify CLI Version

8.3.0

What operating system are you using?

Windows

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Amplify Categories

auth, function, api, hosting

Amplify Commands

push

Describe the bug

Upgraded Amplify Version to latest and local build and as well as build from Amplify Hosting (CICD) failing with

Following resources failed

× An error occurred when pushing the resources to the cloud
🛑 An error occurred during the push operation: /
Resource is not in the state stackUpdateComplete

Error from CFN stack is

UPDATE_FAILED authelevatehire293576c8 AWS::CloudFormation::Stack Tue May 24 2022 11:05:12 GMT-0600 (Mountain Daylight Time) Parameters: [oAuthSecretsPathAmplifyAppId] must have values

Project does not have any Secrets value configured.

Expected behavior

Amplify Push successful and updated resources in the cloud.

Reproduction steps

  1. Upgrade to latest version of Amplify
  2. amplify push
  3. Observer the error.

Workaround

  1. Downgrade Amplify CLI - 8.2
  2. amplify push
  3. Works fine

GraphQL schema(s)

# Put schemas below this line


Log output

# Put your logs below this line


Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (4 by maintainers)

Most upvoted comments

We have reverted the change that caused this issue. Please upgrade to version 8.3.1

Hey @YuantongL we can step back through amplify update auth > Walkthrough all configurations and re-apply the social provider credentials:

> amplify update auth
Please note that certain attributes may not be overwritten if you choose to use defaults settings.

You have configured resources that might depend on this Cognito resource.  Updating this Cognito resource could have unintended side effects.

Using service: Cognito, provided by: awscloudformation
 What do you want to do? 
  Apply default configuration without Social Provider (Federation) 
❯ Walkthrough all the auth configurations 
  Add/Edit signin and signout redirect URIs 
  - Update OAuth social providers (Disabled: You have not initially configured OAuth.)
  Create or update Cognito user pool groups 
  Create or update Admin queries API
What do you want to do? Walkthrough all the auth configurations
 Select the authentication/authorization services that you want to use: User Sign-Up, Sign-In, con
nected with AWS IAM controls (Enables per-user Storage features for images or other content, Analy
tics, and more)
 Allow unauthenticated logins? (Provides scoped down permissions that you can control via AWS IAM)
 No
 Do you want to enable 3rd party authentication providers in your identity pool? Yes
 Select the third party identity providers you want to configure for your identity pool: Facebook
  
 You've opted to allow users to authenticate via Facebook.  If you haven't already, you'll need to
 go to https://developers.facebook.com and create an App ID. 
 
 Enter your Facebook App ID for your identity pool:  fakeappid
 Do you want to add User Pool Groups? No
 Do you want to add an admin queries API? No
 Multifactor authentication (MFA) user login options: OFF
 Email based user registration/forgot password: Enabled (Requires per-user email entry at registra
tion)
 Specify an email verification subject: Your verification code
 Specify an email verification message: Your verification code is {####}
 Do you want to override the default password policy for this User Pool? No
 Specify the app's refresh token expiration period (in days): 30
 Do you want to specify the user attributes this app can read and write? No
 Do you want to enable any of the following capabilities? 
 Do you want to use an OAuth flow? Yes
 What domain name prefix do you want to use? 10466ba580d2b-ba580d2b
 Which redirect signin URIs do you want to edit? 
 Do you want to add redirect signin URIs? No
 Which redirect signout URIs do you want to edit? 
 Do you want to add redirect signout URIs? No
 Select the OAuth flows enabled for this project. Authorization code grant
 Select the OAuth scopes enabled for this project. Phone, Email, OpenID, Profile, aws.cognito.sign
in.user.admin
 Select the identity providers you want to configure for your user pool: Facebook
  
 You've opted to allow users to authenticate via Facebook.  If you haven't already, you'll need to
 go to https://developers.facebook.com and create an App ID. 
 
 Enter your Facebook App ID for your OAuth flow:  fakeappid
 Enter your Facebook App Secret for your OAuth flow:  fakeappsecret
? Do you want to configure Lambda Triggers for Cognito? No

This worked for me . @josefaidt , you are a saviour again 👍 🙇‍♂️

Hey @YuantongL we can step back through amplify update auth > Walkthrough all configurations and re-apply the social provider credentials:

> amplify update auth
Please note that certain attributes may not be overwritten if you choose to use defaults settings.

You have configured resources that might depend on this Cognito resource.  Updating this Cognito resource could have unintended side effects.

Using service: Cognito, provided by: awscloudformation
 What do you want to do? 
  Apply default configuration without Social Provider (Federation) 
❯ Walkthrough all the auth configurations 
  Add/Edit signin and signout redirect URIs 
  - Update OAuth social providers (Disabled: You have not initially configured OAuth.)
  Create or update Cognito user pool groups 
  Create or update Admin queries API
What do you want to do? Walkthrough all the auth configurations
 Select the authentication/authorization services that you want to use: User Sign-Up, Sign-In, con
nected with AWS IAM controls (Enables per-user Storage features for images or other content, Analy
tics, and more)
 Allow unauthenticated logins? (Provides scoped down permissions that you can control via AWS IAM)
 No
 Do you want to enable 3rd party authentication providers in your identity pool? Yes
 Select the third party identity providers you want to configure for your identity pool: Facebook
  
 You've opted to allow users to authenticate via Facebook.  If you haven't already, you'll need to
 go to https://developers.facebook.com and create an App ID. 
 
 Enter your Facebook App ID for your identity pool:  fakeappid
 Do you want to add User Pool Groups? No
 Do you want to add an admin queries API? No
 Multifactor authentication (MFA) user login options: OFF
 Email based user registration/forgot password: Enabled (Requires per-user email entry at registra
tion)
 Specify an email verification subject: Your verification code
 Specify an email verification message: Your verification code is {####}
 Do you want to override the default password policy for this User Pool? No
 Specify the app's refresh token expiration period (in days): 30
 Do you want to specify the user attributes this app can read and write? No
 Do you want to enable any of the following capabilities? 
 Do you want to use an OAuth flow? Yes
 What domain name prefix do you want to use? 10466ba580d2b-ba580d2b
 Which redirect signin URIs do you want to edit? 
 Do you want to add redirect signin URIs? No
 Which redirect signout URIs do you want to edit? 
 Do you want to add redirect signout URIs? No
 Select the OAuth flows enabled for this project. Authorization code grant
 Select the OAuth scopes enabled for this project. Phone, Email, OpenID, Profile, aws.cognito.sign
in.user.admin
 Select the identity providers you want to configure for your user pool: Facebook
  
 You've opted to allow users to authenticate via Facebook.  If you haven't already, you'll need to
 go to https://developers.facebook.com and create an App ID. 
 
 Enter your Facebook App ID for your OAuth flow:  fakeappid
 Enter your Facebook App Secret for your OAuth flow:  fakeappsecret
? Do you want to configure Lambda Triggers for Cognito? No