Closed bwalsh closed 4 years ago
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
Hello @bwalsh Do you have HostedUI setup in your project?
I am suddenly getting the same error.
yep me too
Previous builds with the CLI would fail on a push as the social provider credentials were not available in the project on doing a pull. This was an issue in #3642 by adding those hosted credentials on a pull this would avoid a failed push. You can provide the social credentials using this example here: https://github.com/aws-amplify/amplify-cli/issues/3642#issuecomment-655804757
Ref Issues https://github.com/aws-amplify/amplify-cli/issues/3642 https://github.com/aws-amplify/amplify-console/issues/206
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
Hello @bwalsh Do you have HostedUI setup in your project?
@SwaySway Yes. We use the HostedUI
Puzzled. Why client id's and secrets needed when they already exist in cognito? Thought the point of pull was to retrieve that from stack. Our build simply deploys the app, does not make changes to auth.
same here. my temp solution was to downgrade cli version to 4.20
. and I also submitted the issue #4806.
I finally resolved that issue. even though it is temp fix... here is my comment in issue
@bwalsh Correct though to change credentials we expose this value. We realize this workflow isn't convenient as you would need to resend the credentials. In the long term we are looking at changing this, as noted in https://github.com/aws-amplify/amplify-console/issues/206#issuecomment-649046388.
Closing this issue. Should you experience any other issues related to the auth config on the CLI please comment below to re-open.
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
Worked for me!
Same issue. Using social federation with facebook, google, and amazon. Never had this issue until upgrading recently. I believe it was 4.22 that broke my code. The credentials were properly set up through the cli and have not changed since. I have CD set up through the amplify console. Again, not sure why my pushes are failing now since they never have before. If anyone could elaborate on whether or not this will be fixed, or if in fact this is not a bug, that'd be great
edit: I was able to temporarily fix this issue in a similar way as @bwalsh I simply edited the _LIVE_UPDATES environment variable in the environment variables tab of the amplify console
Before
_LIVE_UPDATES [{"name":"Amplify CLI","pkg":"@aws-amplify/cli","type":"npm","version":"latest"}]
After
_LIVE_UPDATES [{"name":"Amplify CLI","pkg":"@aws-amplify/cli","type":"npm","version":"4.21.3"}]
@nipoonp
Hi there, how did you generate the values for the following 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
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.
Describe the bug Version change broke our production deploy
Amplify CLI Version @aws-amplify/cli@4.23.1
To Reproduce
Expected behavior The pull command to complete
Screenshots
Desktop (please complete the following information): NA default build container