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

auth headless is missing the following inputParams googleAppIdUserPool #6302

Closed
PawanMude opened this issue Jan 3, 2021 · 7 comments
Closed
Assignees
Labels
pending-triage Issue is pending triage platform Issues tied to the general CLI platform

Comments

@PawanMude
Copy link

PawanMude commented Jan 3, 2021

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 add auth
  • Default configuration with Social Provider (Federation)
  • Username
  • No, I am done.
  • Accept default domain prefix
  • redirect sign-in and sign-out URI's added <> (another redirect sign-in and sign-out URI is not added)
  • Social Provider selected Google
  • Add Google Client Id and client Secret

After following above steps code works on local ; when Amplify backend is integrated for CICD it throws error : "auth headless is missing the following inputParams googleAppIdUserPool" ; error screenshot is pasted below :

image

Amplify CLI Version
4.41.0

To Reproduce
Steps explained in Bug Description

Expected behavior
Success Build with Amplify Backend integrated.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Amazon Linux 2
  • Node Version. 10.23.0
    image

Additional context
Cloning Repository is successful ; Backend Build is failing ; details mentioned in screenshot below:
image

@akshbhu
Copy link
Contributor

akshbhu commented Jan 4, 2021

Hi @PawanMude

It seems you are using Amplify Console for your builds. One thing you would need to include those input params as environment variables. An example of this is noted in this comment: #4790 (comment)
Reference from Amplify Console Repo: aws-amplify/amplify-hosting#206 (comment).

Let me know if this works for you?

@akshbhu akshbhu added pending-triage Issue is pending triage platform Issues tied to the general CLI platform pending-close-response-required labels Jan 4, 2021
@PawanMude
Copy link
Author

@akshbhu included those input params (AMPLIFY_GOOGLE_CLIENT_ID, AMPLIFY_GOOGLE_CLIENT_SECRET) as environment variables in Amplify Console. Build is still failing with error code ELIFECYCLE , details mentioned below.

2021-01-05T14:05:18.337Z [INFO]: # Ensuring NPM package '@aws-amplify/cli' is version: 'latest'
2021-01-05T14:05:24.299Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 4.29.4 to 4.41.0...
2021-01-05T14:06:06.602Z [INFO]: # Done patching NPM package '@aws-amplify/cli'
2021-01-05T14:06:12.334Z [INFO]: ## Starting Frontend Build
                                 # Starting phase: preBuild
                                 # Executing command: npm ci
2021-01-05T14:06:12.681Z [WARNING]: npm
2021-01-05T14:06:12.682Z [WARNING]: WARN prepare removing existing node_modules/ before installation
2021-01-05T14:06:26.217Z [INFO]: > [email protected] postinstall /codebuild/output/src290553445/src/amplifyapp/node_modules/babel-runtime/node_modules/core-js
                                 > node -e "try{require('./postinstall')}catch(e){}"
2021-01-05T14:06:26.287Z [INFO]: > [email protected] postinstall /codebuild/output/src290553445/src/amplifyapp/node_modules/ejs
                                 > node ./postinstall.js
2021-01-05T14:06:26.326Z [INFO]: Thank you for installing �[35mEJS�[0m: built with the �[32mJake�[0m JavaScript build tool (�[32mhttps://jakejs.com/�[0m)
2021-01-05T14:06:26.484Z [INFO]: > [email protected] install /codebuild/output/src290553445/src/amplifyapp/node_modules/webpack-dev-server/node_modules/fsevents
                                 > node install.js
2021-01-05T14:06:26.524Z [INFO]: 
2021-01-05T14:06:26.524Z [INFO]: Skipping 'fsevents' build as platform linux is not supported
2021-01-05T14:06:26.548Z [INFO]: > [email protected] install /codebuild/output/src290553445/src/amplifyapp/node_modules/watchpack-chokidar2/node_modules/fsevents
                                 > node install.js
2021-01-05T14:06:26.589Z [INFO]: 
2021-01-05T14:06:26.589Z [INFO]: Skipping 'fsevents' build as platform linux is not supported
2021-01-05T14:06:26.809Z [INFO]: > [email protected] postinstall /codebuild/output/src290553445/src/amplifyapp/node_modules/core-js
                                 > node -e "try{require('./postinstall')}catch(e){}"
2021-01-05T14:06:27.160Z [INFO]: > [email protected] postinstall /codebuild/output/src290553445/src/amplifyapp/node_modules/core-js-pure
                                 > node -e "try{require('./postinstall')}catch(e){}"
2021-01-05T14:06:27.346Z [INFO]: added 2176 packages in 14.689s
2021-01-05T14:06:27.363Z [INFO]: # Completed phase: preBuild
                                 # Starting phase: build
                                 # Executing command: npm run build
2021-01-05T14:06:29.696Z [INFO]: > [email protected] build /codebuild/output/src290553445/src/amplifyapp
                                 > react-scripts build
2021-01-05T14:06:30.807Z [INFO]: Creating an optimized production build...
2021-01-05T14:06:31.794Z [INFO]: Failed to compile.
2021-01-05T14:06:31.794Z [INFO]: ./src/index.js
                                 Cannot find file './aws-exports' in './src'.
2021-01-05T14:06:31.805Z [WARNING]: npm
2021-01-05T14:06:31.806Z [WARNING]: ERR! code ELIFECYCLE
                                    npm ERR! errno 1
2021-01-05T14:06:31.808Z [WARNING]: npm
2021-01-05T14:06:31.808Z [WARNING]: ERR! [email protected] build: `react-scripts build`
                                    npm ERR! Exit status 1
                                    npm ERR!
                                    npm ERR! Failed at the [email protected] build script.
                                    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-01-05T14:06:31.816Z [WARNING]: 
2021-01-05T14:06:31.816Z [WARNING]: npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2021-01-05T14_06_31_808Z-debug.log
2021-01-05T14:06:31.816Z [HELP]: Outputting the npm debug log
                                 0 info it worked if it ends with ok
                                 1 verbose cli [
                                 1 verbose cli   '/root/.nvm/versions/node/v12.19.0/bin/node',
                                 1 verbose cli   '/root/.nvm/versions/node/v12.19.0/bin/npm',
                                 1 verbose cli   'run',
                                 1 verbose cli   'build'
                                 1 verbose cli ]
                                 2 info using [email protected]
                                 3 info using [email protected]
                                 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
                                 5 info lifecycle [email protected]~prebuild: [email protected]
                                 6 info lifecycle [email protected]~build: [email protected]
                                 7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
                                 8 verbose lifecycle [email protected]~build: PATH: /root/.nvm/versions/node/v12.19.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src290553445/src/amplifyapp/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6@global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v12.19.0/bin:/root/.local/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet/tools
                                 9 verbose lifecycle [email protected]~build: CWD: /codebuild/output/src290553445/src/amplifyapp
                                 10 silly lifecycle [email protected]~build: Args: [ '-c', 'react-scripts build' ]
                                 11 silly lifecycle [email protected]~build: Returned: code: 1  signal: null
                                 12 info lifecycle [email protected]~build: Failed to exec build script
                                 13 verbose stack Error: [email protected] build: `react-scripts build`
                                 13 verbose stack Exit status 1
                                 13 verbose stack     at EventEmitter.<anonymous> (/root/.nvm/versions/node/v12.19.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
                                 13 verbose stack     at EventEmitter.emit (events.js:314:20)
                                 13 verbose stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v12.19.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
                                 13 verbose stack     at ChildProcess.emit (events.js:314:20)
                                 13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
                                 13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
                                 14 verbose pkgid [email protected]
                                 15 verbose cwd /codebuild/output/src290553445/src/amplifyapp
                                 16 verbose Linux 4.14.203-116.332.amzn1.x86_64
                                 17 verbose argv "/root/.nvm/versions/node/v12.19.0/bin/node" "/root/.nvm/versions/node/v12.19.0/bin/npm" "run" "build"
                                 18 verbose node v12.19.0
                                 19 verbose npm  v6.14.8
                                 20 error code ELIFECYCLE
                                 21 error errno 1
                                 22 error [email protected] build: `react-scripts build`
                                 22 error Exit status 1
                                 23 error Failed at the [email protected] build script.
                                 23 error This is probably not a problem with npm. There is likely additional logging output above.
                                 24 verbose exit [ 1, true ]
2021-01-05T14:06:31.820Z [ERROR]: !!! Build failed
2021-01-05T14:06:31.820Z [ERROR]: !!! Non-Zero Exit Code detected
2021-01-05T14:06:31.820Z [INFO]: # Starting environment caching...
2021-01-05T14:06:31.821Z [INFO]: # Environment caching completed
Terminating logging...

@akshbhu
Copy link
Contributor

akshbhu commented Jan 5, 2021

@PawanMude This doesnt seem like a problem with amplify as previous error was related to amplify push

Can you try with clean your npm cache and removing node_modules folder and try again?

Let me know if that works for you?

@akshbhu akshbhu added pending-response Issue is pending response from the issue author pending-close-response-required labels Jan 5, 2021
@PawanMude
Copy link
Author

@akshbhu : I created new c9 environment and re-done all steps mentioned in the Bug Description + included those input params (AMPLIFY_GOOGLE_CLIENT_ID, AMPLIFY_GOOGLE_CLIENT_SECRET) as environment variables ; still getting same error
image

@edwardfoyle edwardfoyle removed the pending-response Issue is pending response from the issue author label Jan 11, 2021
@kaustavghosh06
Copy link
Contributor

@PawanMude Are you still stuck with this issue?
One thing would be helpful for us to know is that have you pinned down a specific Amplify CLI version in our Amplify console build settings?

@kaustavghosh06 kaustavghosh06 added pending-response Issue is pending response from the issue author pending-close-response-required and removed pending-response Issue is pending response from the issue author labels Jan 28, 2021
@PawanMude
Copy link
Author

@kaustavghosh06 : Kindly refer to above logs : '@aws-amplify/cli' is version: 'latest'
For now, i've moved ahead without amplify.

@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
pending-triage Issue is pending triage platform Issues tied to the general CLI platform
Projects
None yet
Development

No branches or pull requests

4 participants