amplify-cli: Amplify pull misses hostedUIProviderCreds in the team-provider.info file - An error occured during the push operation: Resource is not in the state stackUpdateComplete

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker

Describe the bug Amplify pull misses hostedUIProviderCreds in the team-provider.info file. This causes a push to fail with the following cloudformation error:

UPDATE_FAILED      authxxxxxxx630360af         AWS::CloudFormation::Stack Tue Mar 10 2020 23:26:52 GMT+0000 (Greenwich Mean Time) Template format error: Unresolved resource dependencies [hostedUIProviderCreds] in the Resources block of the template

Following resources failed

✖ An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete
An error occured during the push operation: Resource is not in the state stackUpdateComplete

Amplify CLI Version 4.13.4

To Reproduce

  • Add federated login to project with add auth and add fb/google oauth details.
  • Then push with amplify push
  • create another project in a different folder and amplify pull (yes this project will update backend)
  • make a change to auth (I changed the redirect urls)
  • amplify push

Expected behavior push should work/update as with the original project

Desktop (please complete the following information):

  • OS: Mac
  • Node Version. v13.5.0

Additional context Missing following section from team-provider.info file:

"categories": {
            "auth": {
                "roarapp630360af": {
                    "hostedUIProviderCreds": "[{\"ProviderName\":\"Facebook\",\"client_id\":\"xxxxxxxxxxxxxxx\",\"client_secret\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"},{\"ProviderName\":\"Google\",\"client_id\":\"xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com\",\"client_secret\":\"xxxxxxxxxxxxxxxxxxxxxxxx\"}]"
                }
            }
        }

Adding the section fixes the issue

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 7
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Any news on this issue? I’ve got the same problem.

+1, it’s happening in 4.36.2

  • . Same issue happening in 4.37.1

Same issue still happening in 4.37.1

Added the hostedUIProviderCreds in the team-provider-info.json. It works

{
  "dev": {
    "awscloudformation": {
      ......
    },
    "categories": {
      "auth": {
        "backendName": {
          "hostedUIProviderCreds": "[{\"ProviderName\":\"Facebook\",\"client_id\":\"xxxxxxxxx\",\"client_secret\":\"xxxxxxxxx\"},{\"ProviderName\":\"Google\",\"client_id\":\"xxxxxxxxx\",\"client_secret\":\"xxxxxxxxx\"}]"
        },
        "userPoolGroups": {}
      }
    }
  }
}
amplify --version
4.41.2

UPDATE_FAILED authtagspaces96743d89 AWS::CloudFormation::Stack Tue Jan 26 2021 16:16:33 GMT+0200 (Eastern European Standard Time) Parameters: [hostedUIProviderCreds] do not exist in the template

This screenshot fix issue for me: https://github.com/aws-amplify/amplify-cli/issues/5466#issue-713207570 edit team-provider-info.json like this:

"categories": {
      "auth": {
        "tagspaces96743d89": {
              "hostedUIProviderCreds": []
         }
      }
    }

hey, I recently had that exact issue with my project. it seemed to be fixed after I added the following to my ./amplify/backend/auth/[ResourceName]/parameter.json:

{ ...
      "hostedUIProviderCreds": "[{\"ProviderName\":\"Facebook\",\"client_id\":\"xxxxxxxxxxxxxxx\",\"client_secret\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"},{\"ProviderName\":\"Google\",\"client_id\":\"xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com\",\"client_secret\":\"xxxxxxxxxxxxxxxxxxxxxxxx\"}]",
...
}

hope it will be helpful for someone