amplify-cli: @aws-amplify/cli@4.23.1 breaks build: Failed to pull the backend. auth headless is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool

Describe the bug Version change broke our production deploy

Amplify CLI Version @aws-amplify/cli@4.23.1

To Reproduce

  phases:	  phases:
    build:	    build:
      commands:
        - npm install -g @aws-amplify/cli
        - amplify pull --providers '{"awscloudformation":{"configLevel":"project","useProfile":true,"profileName":"default"}}' --appId ${BACKEND_APP_ID} --envName ${BACKEND_APP_ENV} --yes

Expected behavior The pull command to complete

Screenshots

                                 # Starting phase: build
                                 # Executing command: npm install -g @aws-amplify/cli
2020-07-09T22:44:32.415Z [WARNING]: npm WARN deprecated merge-graphql-schemas@1.7.8: Merge GraphQL Schemas has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-merge-graphql-schemas for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2020-07-09T22:44:33.527Z [WARNING]: npm WARN deprecated @graphql-toolkit/common@0.10.4: GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2020-07-09T22:44:35.114Z [WARNING]: npm WARN deprecated @graphql-toolkit/common@0.6.6: GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2020-07-09T22:44:35.673Z [WARNING]: npm WARN deprecated @graphql-toolkit/common@0.9.7: GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2020-07-09T22:44:39.326Z [WARNING]: npm WARN
2020-07-09T22:44:39.328Z [WARNING]: deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
2020-07-09T22:44:41.184Z [WARNING]: npm WARN deprecated graphql-import@0.7.1: GraphQL Import has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2020-07-09T22:44:43.483Z [WARNING]: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
2020-07-09T22:44:59.670Z [INFO]: /root/.nvm/versions/node/v10.16.0/bin/amplify -> /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/bin/amplify
2020-07-09T22:44:59.748Z [INFO]: > core-js@3.6.5 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-graphql-types-generator/node_modules/core-js
                                 > node -e "try{require('./postinstall')}catch(e){}"
2020-07-09T22:44:59.811Z [INFO]: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
                                 The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
                                 > https://opencollective.com/core-js 
                                 > https://www.patreon.com/zloirock 
                                 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
2020-07-09T22:44:59.820Z [INFO]: > core-js@2.6.11 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/core-js
                                 > node -e "try{require('./postinstall')}catch(e){}"
2020-07-09T22:44:59.882Z [INFO]: > core-js-pure@3.6.5 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/core-js-pure
                                 > node -e "try{require('./postinstall')}catch(e){}"
2020-07-09T22:44:59.986Z [INFO]: > ejs@3.1.3 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/ejs
                                 > node --harmony ./postinstall.js
2020-07-09T22:45:00.045Z [INFO]: Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
2020-07-09T22:45:00.049Z [INFO]: > @aws-amplify/cli@4.23.1 postinstall /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli
                                 > node scripts/post-install.js
2020-07-09T22:45:00.225Z [INFO]: 
2020-07-09T22:45:00.227Z [INFO]: ----------------------------------------
2020-07-09T22:45:00.227Z [INFO]: Successfully installed the Amplify CLI
                                 ----------------------------------------
                                 JavaScript Getting Started - https://docs.amplify.aws/start
                                 Android Getting Started - https://docs.amplify.aws/start/q/integration/android
                                 iOS Getting Started - https://docs.amplify.aws/start/q/integration/ios
2020-07-09T22:45:00.239Z [WARNING]: npm
2020-07-09T22:45:00.239Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@aws-amplify/cli/node_modules/chokidar/node_modules/fsevents):
                                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
                                    npm WARN inquirer-autocomplete-prompt@1.0.2 requires a peer of inquirer@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
                                    npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
                                    npm WARN
2020-07-09T22:45:00.240Z [WARNING]: ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
2020-07-09T22:45:00.241Z [INFO]: + @aws-amplify/cli@4.23.1
                                 added 397 packages from 212 contributors, removed 1555 packages, updated 297 packages and moved 65 packages in 40.275s
2020-07-09T22:45:00.271Z [INFO]: # Executing command: amplify pull --providers '{awscloudformation:{configLevel:project,useProfile:true,profileName:default}}' --appId XXXXXXxjq1 --envName prod --yes
2020-07-09T22:45:01.060Z [INFO]: Scanning for plugins...
2020-07-09T22:45:01.096Z [INFO]: Plugin scan successful
2020-07-09T22:45:05.270Z [INFO]: For more information on AWS Profiles, see:
2020-07-09T22:45:05.271Z [INFO]: https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
2020-07-09T22:45:05.934Z [INFO]: Amplify AppID found: XXXXXXxjq1. Amplify App name is: XXX-prod
2020-07-09T22:45:06.125Z [INFO]: Backend environment prod found in Amplify Console app: XXX-prod
2020-07-09T22:45:06.269Z [INFO]: 
2020-07-09T22:45:06.270Z [WARNING]: - Fetching updates to backend environment: prod from the cloud.
2020-07-09T22:45:06.797Z [WARNING]: ✖ There was an error pulling the backend environment prod.
2020-07-09T22:45:06.798Z [INFO]: Failed to pull the backend.
                                 auth headless is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool
2020-07-09T22:45:06.799Z [INFO]: Error: auth headless is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool
                                 at updateConfigOnEnvInit (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/provider-utils/awscloudformation/index.js:370:15)
                                 at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/index.js:240:28
                                 at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/promise-sequential/index.js:16:18
                                 at process._tickCallback (internal/process/next_tick.js:68:7)
2020-07-09T22:45:06.811Z [ERROR]: !!! Build failed
2020-07-09T22:45:06.923Z [ERROR]: !!! Non-Zero Exit Code detected
2020-07-09T22:45:06.924Z [INFO]: # Starting environment caching...
2020-07-09T22:45:06.924Z [INFO]: # Environment caching completed
Terminating logging...

Desktop (please complete the following information): NA default build container

About this issue

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

Most upvoted comments

My fix:

    build:
      commands:
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple

Then in the Amplify console add the environment variables:

AMPLIFY_AMAZON_CLIENT_ID
AMPLIFY_AMAZON_CLIENT_SECRET
AMPLIFY_FACEBOOK_CLIENT_ID
AMPLIFY_FACEBOOK_CLIENT_SECRET
AMPLIFY_GOOGLE_CLIENT_ID
AMPLIFY_GOOGLE_CLIENT_SECRET

yep me too

I am suddenly getting the same error.

workaround: fallback to 4.21.3

    build:
      commands:
        - npm install -g @aws-amplify/cli@4.21.3
        - amplify pull --providers '{"awscloudformation":{"configLevel":"project","useProfile":true,"profileName":"default"}}' --appId ${BACKEND_APP_ID} --envName ${BACKEND_APP_ENV} --yes