amplify-cli: deployment-secrets.json migration causes amplify[hostedUIProviderCreds] must have values error on amplify push
After upgrading cli to 4.34.0, the cli forces to move secrets from team-provider-info.json to deployment-secrets.json on amplify push After selecting Yes, it seem like the migration is successful and push works just fine. However, the deployment-secrets.json is never created and on the future pushes, I get the following error:
amplify[hostedUIProviderCreds] must have values
It is due to deletion of the hostedUIProviderCreds from the team-provider-info.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 14
- Comments: 51 (11 by maintainers)
@wcomicho The file should be under
~/.aws/amplify/deployment-secrets.jsonSame issue here. On top of that my Cognito schema (which contains custom fields) gets overwritten.
Getting the same issue trying to perform a very simple schema update (not sure why the auth update is even necessary in this situation)
Rolling back version is not helpful
Ok, so I was able to get this to work. It seems like version 4.34.0 removed the
hostedUIProviderCreds: []in theteam-provider-info.jsonbut didn’t successfully add it todeployment-secrets.json.I updated the
categoriessection inteam-provider-info.jsonwith:The next time I ran
amplify pushit asked me to migrate todeployment-secrets.jsonand if I wanted to backupteam-provider-info.json. I said yes and it successfully updateddeployment-secrets.json:And this overrides some information on Auth Cloud Formation template, like UsernameConfiguration or AccountRecoverySetting 👎 so any time that I need to push, I have to do this step plus modify the template and push again.
to solve this, I performed the following steps:
amplify pushanswerywhen prompted for backup creationIn my app, there is no hostedUIProvider creds. The existing behavior should not require a config in deployment-secrets if there are none in the app.
@ammarkarachi I do not remember if the CLI threw an error at me or not. After I upgraded to version 4.34.0 I do remember it asking me if I wanted to backup
team-provider-info.json. I recall typing yes but don’t remember if it errored on me or not. I was able to push after that upgrade.When I updated to version 4.35.0 this morning and tried to do a push, it gave me the
[hostedUIProviderCreds] must have valueserror. I then checked myteam-provider-info.jsonon another branch, pre-upgrade, and noticed under thecategories -> authsection, I had:So I added that back into my
team-provider-info.jsonfile, re-ranamplify push, and the CLI then asked me to migrate todeployment-secrets.jsonagain. After it migrated I checked thedeployment-secrets.jsonfile and thehostedUIProviderCredswere added. Upon a successful push,hostedUIProviderCredswere removed but every push since has worked.I hope all that made sense.
I’m guessing forcing the migration again must correct something in the CLI?
I am also having this issue. I upgraded to 4.35.0 and am receiving this error when trying to amplify push:
[hostedUIProviderCreds] must have valuesThe
deployment-secrets.jsonfile gets created but only has this in it: