-
Notifications
You must be signed in to change notification settings - Fork 42
Description
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
My Github Action is failing to pull the environment backend
It is failing on the following command:
# Setup Amplify
- name: configure amplify
uses: ambientlight/amplify-cli-action@0.2.1
with:
amplify_command: configure
amplify_env: dev
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-xxxx
This command is giving the output:
amplify version Scanning for plugins...
Plugin scan successful
4.23.0
found existing environment dev
- Fetching updates to backend environment: dev from the cloud.
✔ Successfully pulled backend environment dev from the cloud.
✖ There was an error pulling the backend environment dev.
auth headless is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool
Error: auth headless is missing the following inputParams facebookAppIdUserPool, facebookAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool
at updateConfigOnEnvInit (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/provider-utils/awscloudformation/index.js:370:15)
at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-category-auth/index.js:240:28
at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/promise-sequential/index.js:16:18
at process._tickCallback (internal/process/next_tick.js:68:7)
There is a similar issue with the Amplify Console, however, there is a workaround with a custom version of amplifypush: aws-amplify/amplify-hosting#206
But it doesn't seem to be this case, I imagine that I should pass it to the action, but it doesn't have any documentation regarding it: https://github.com/marketplace/actions/amplify-cli-action
There are 2 changes that I have done that could have been the culprit of this error:
- Updated amplify-cli to 4.22.0, but it seems that the version running on Github actions is different anyway.
- Added more redirect urls to authentication, using a similar solution as the last one listed here
When I run pull/push locally it works fine
I also have seen a recent commit that might be related: aws-amplify/amplify-cli#4684
But I'm not sure.
Looking at the code of the action: https://github.com/ambientlight/amplify-cli-action/blob/master/entrypoint.sh
It looks like it might be needed to add smt similar to what was added to myamplifypush
Something like:
AUTHCONFIG="{\
\"googleAppIdUserPool\":\"${GOOGLE_CLIENT_ID}\",\
\"googleAppSecretUserPool\":\"${GOOGLE_CLIENT_SECRET}\",\
\"facebookAppIdUserPool\":\"${FACEBOOK_APP_ID}\",\
\"facebookAppSecretUserPool\":\"${FACEBOOK_APP_SECRET}\"\
}"
But again, I'm not sure, and I wonder why this error started happening only now?
I thought about also removing the redirect URLs I have added, but the amplify-cli doesn't give an option to remove them, only Add/Edit
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
4.22.0
To Reproduce
Steps to reproduce the behavior or terminal output if applicable
- Have a project with authentication and social logins (Facebook/Google)
- Add different redirect URLs (dev/staging/production) for the oAuth workflow
- Create a workflow on Github Action, using ambientlight/amplify-cli-action@0.2.1 to pull your environment
- Commit/push your changes to Github
Expected behavior
The Github action should run the pull successfully, update the backend and continue to run
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Mac/Windows/Ubuntu] Mac
- Node Version. You can use
node -vto check the node version on your system
v13.13.0
Additional context
If I pull/push it locally it works fine