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

Getting amplify deployment error: auth headless init is missing the following inputParams #2877

Closed
oahmaro opened this issue Nov 28, 2019 · 11 comments
Assignees
Labels
auth Issues tied to the auth category of the CLI pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@oahmaro
Copy link

oahmaro commented Nov 28, 2019

Note: If your question is regarding the AWS Amplify Console service, please log it in the
official AWS Amplify Console forum

Which Category is your question related to?
Amplify console, deploying multi env backend with auth.

Amplify CLI Version

You can use amplify -v to check the amplify CLI version on your system
4.2.0

What AWS Services are you utilizing?
Amplify, and Cognito

Provide additional details e.g. code snippets
Error: auth headless init 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:315:15) at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/index.js:241: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)

I have created 2 environments, prod, and dev. And both of them had google and facebook app id and app secret configured. and I checked the Cognito identity provider and I can see the correct App Id and App secret for both facebook and google there. I don't understand why I am having this error.

Can someone please explain in detail why I am getting this error and how should I fix it.

@oahmaro oahmaro changed the title Why am i getting this error, auth headless init is missing the following inputParams ? I am getting this error: auth headless init is missing the following inputParams Nov 28, 2019
@oahmaro oahmaro changed the title I am getting this error: auth headless init is missing the following inputParams Getting amplify deployment error: auth headless init is missing the following inputParams Nov 28, 2019
@Jkap7788
Copy link

Jkap7788 commented Dec 1, 2019

@oahmaro Are you using the amplify console for deployment?

If so, I had the same error, see my comment here: https://github.com/aws-amplify/amplify-cli/issues/2833#issuecomment-558876796

The amplify console team are working on a fix and this is a temp workaround :)

@ammarkarachi ammarkarachi added bug Something isn't working platform Issues tied to the general CLI platform labels Dec 4, 2019
@ammarkarachi
Copy link
Contributor

@oahmaro Thanks for the issue we are looking into this.

@kaustavghosh06
Copy link
Contributor

@oahmaro Are you using the headless CLI scripts of the Ampliy console?

@kaustavghosh06 kaustavghosh06 added pending-triage Issue is pending triage auth Issues tied to the auth category of the CLI pending-response Issue is pending response from the issue author and removed bug Something isn't working platform Issues tied to the general CLI platform labels Dec 10, 2019
@kaustavghosh06
Copy link
Contributor

If you're using headless CLI scripts - please checkout this sample - https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-cli/sample-headless-scripts/headless_init_env_auth.sh which incorporates adding og the inputParams as a part of the headless scripts

@yuyokk
Copy link

yuyokk commented Jan 5, 2020

Facing the same issue on Amplify Console. Team, any plans on fixing the issue?

UPDATE: Ok I see issue is tracked here aws-amplify/amplify-hosting#206

@luizdanieldesouza
Copy link

Facing the same issue on Amplify Console. Could you please help?

Thanks, Dan

@BhanukaUOM
Copy link

BhanukaUOM commented Feb 22, 2020

Define facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool in AUTHCONFIG.

Amplify-Cli command

amplify init \
--amplify "{\"envName\":\"dev\"}" \
--categories "{\"auth\":{\"googleAppIdUserPool\":\"googleAppId\",\"googleAppSecretUserPool\":\"googleAppSecret\"}}" \
--yes

or, If you use Bash Script use as follow

#!/bin/bash
set -e
IFS='|'

AUTHCONFIG="{\
\"facebookAppId\":\"fbid1\",\
\"googleClientId\":\"goog\",\
\"facebookAppIdUserPool\":\"facebookAppId\",\
\"facebookAppSecretUserPool\":\"facebookAppSecret\",\
\"googleAppIdUserPool\":\"facebookAppSecret\",\
\"googleAppSecretUserPool\":\"googleAppSecret\"\
}"
AWSCLOUDFORMATIONCONFIG="{\
\"configLevel\":\"project\",\
\"useProfile\":true,\
\"profileName\":\"default\"\
}"

AMPLIFY="{\
\"envName\":\"dev8\"\
}"
PROVIDERS="{\
\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG\
}"
CATEGORIES="{\
\"auth\":$AUTHCONFIG\
}"

amplify init \
--amplify $AMPLIFY \
--providers $PROVIDERS \
--categories $CATEGORIES \
--yes

@jafbueno-zz
Copy link

@BhanukaUOM please edit your comment to fix this part:
"googleAppSecretUserPool ":"googleAppSecret"\

You added space just in front of "googleAppSecretUserPool", when executing this script an error appears indicating that this parameter does not exist. However, when removing the space, the parameter is accepted.

I had used this script in my tests, and I noticed this problem.

@aleksei-tro
Copy link

I just had the same issue and I found a neat solution
modify your amplify.yml and add
- amplifyPush -e $AWS_BRANCH --simple
after npm ci

@blkc
Copy link

blkc commented Oct 10, 2020

Referring to Issue 206

Docs are updated: https://docs.amplify.aws/lib/auth/social/q/platform/js#deploying-to-amplify-console

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auth Issues tied to the auth category of the CLI pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

10 participants