question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Console error reading inputParams googleClientId, facebookAppId

See original GitHub issue

Describe the bug Build using - amplifyPush --environment $AWS_BRANCH in amplify.yml generates Error: auth headless init is missing the following inputParams googleClientId, facebookAppId while working with amplify push using amplify CLI.

To Reproduce Steps to reproduce the behavior:

  1. Using Amplify Console define backend build steps
version: 0.9
backend:
  phases:
     preBuild:
       commands:
        # Test Get Amplify CLI Cloud-Formation stack info from environment cache
         - export STACKINFO="$(envCache --get stackInfo)"
     build:
      commands:
        - echo "printing env"
        - env
        # Execute Amplify CLI with the helper script
        - amplifyPush --environment $AWS_BRANCH
     postBuild:
      commands:
        # Store Amplify CLI CloudFormation stack info in environment cache
        - envCache --set stackInfo "$(amplify env get --json --name $AWS_BRANCH)"
  1. Define in googleClientId and facebookAppId amplify/team-provider-info.json
{
    "prod": {
        "categories": {
            "auth": {
                "Cognito": {
                    "facebookAppId": "xxxx",
                    "googleClientId": "xxxxx"
                }
            }
        }
    }
}
  1. git push to kick the build process
  2. the build logs indicates:
# Executing command: amplifyPush --environment master
2019-01-06T02:59:10.121Z [INFO]: # Start initializing Amplify environment: master
2019-01-06T02:59:10.124Z [INFO]: # Initializing new Amplify environment: master (amplify init)
....
2019-01-06T01:59:24.985Z [WARNING]: ✔ Successfully created initial AWS cloud resources for deployments.
2019-01-06T01:59:25.123Z [WARNING]: - Initializing your environment: master
2019-01-06T01:59:25.125Z [WARNING]: ✔ Initialized provider successfully.
2019-01-06T01:59:25.134Z [WARNING]: ✖ There was an error initializing your environment.
2019-01-06T01:59:25.134Z [INFO]: init failed
2019-01-06T01:59:25.137Z [INFO]: Error: auth headless init is missing the following inputParams googleClientId, facebookAppId
    at updateConfigOnEnvInit (/root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/provider-utils/awscloudformation/index.js:237:15)
    at /root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/index.js:200:28
    at /root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/promise-sequential/index.js:16:18
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
2019-01-06T01:59:25.142Z [ERROR]: !!! Build failed
2019-01-06T01:59:25.142Z [ERROR]: !!! Non-Zero Exit Code detected
  1. I also tried to populate the keys using Amplify Console Environment variables with: googleClientId and prod.categories.auth.Cognito. googleClientId as well as populating FACEBOOK_APP_ID and GOOGLE_CLIENT_ID per https://github.com/aws-amplify/amplify-cli/issues/572 without help

  2. When executing amplify push using CLI the error does not occuring

Expected behavior Succesfull build

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
luizdanieldesouzacommented, Jan 11, 2020

Hi,

I’m getting exactly the same error. Let me know if you might find a resolution for this issue.

Thanks, Dan

0reactions
github-actions[bot]commented, Jun 12, 2021

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 or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amplify Error: auth headless init is missing the following ...
A simple fix for me is to update the environmental variable from amplify. AMPLIFY_AMAZON_CLIENT_ID. AMPLIFY_AMAZON_CLIENT_SECRET.
Read more >
JS Console Error Message: “Cannot read property 'destId' of ...
ERROR MESSAGE: “Cannot read property 'destId' of undefined”. This ERROR message will appear in the JS Console on the node where there is...
Read more >
There is a JavaScript error in your browser conso...
"There is a JavaScript error in your browser console" error message appears when accessing the Service Portal form. Client script not found.
Read more >
Amplify Admin UI Deployment - auth headless is missing the ...
Amplify Admin UI Deployment - auth headless is missing the following inputParams googleClientId, facebookAppId.
Read more >
JavaScript console.error() Method - W3Schools
Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found