#Unable to build using Amplify Hosting

10 messages · Page 1 of 1 (latest)

viral ledge
#

I've been trying to deploy a new NextJS app using Amplify hosting but get several errors related to hostedUIProviderCreds. I've added "HostedUIProviderCreds": [] to auth/[ID]/cli-inputs.json but now it fails on The following resource(s) failed to create: [UserPoolClientRole, SNSRole]. Any thoughts / ideas?

tender quarry
#

Hi @viral ledge 👋 , can you share your Amplify app id and some steps to reproduce this behavior? The error in the deployment seems related to your auth or social sign in setup.

viral ledge
#

Hi Jay, will PM you the ID.

When I remove the amplify directory it builds fine, but this results in the aws-exports not being generated and cognito authentication not working correctly i.e. Auth UserPool not configured.

I've pulled amplify directory into my nextJS app and purposely selected that I don't plan on modifying the backend. This has now built successfully but continues to state that the userPool is not configured, presumably due to aws-exports.js not being generated.

#

If I re-pull the amplify environment and select that I plan on modifying the back-end I'm back to [hostedUIProviderCreds] do not exist in this template.

viral ledge
#

As a workaround I've got the amplify directory but without the usual backend subdirectory within it, and I've manually configured the Auth UI via custom env variables. This is working as expected now, but it should be deploying correctly with the amplify backend and using the generated aws-exports.js file without the need for this workaround.

I know the hostedUIProviderCreds issue has been ongoing for awhile, due to it not pulling the appropriate config, but the known workaround of adding it manually to team-provider-info.json doesn't seem to work since the changeover to use deployment-secrets.json

tender quarry
#

@viral ledge 👋 , I noticed you had hopped on today's office hours and as discussed the next step in the debugging process is to open a GitHub issue on the Amplify CLI repository: https://github.com/aws-amplify/amplify-cli/issues. Do let us know here once you have created the GitHub issue and we can look into it further.

viral ledge
viral ledge
#

Agree with the comments in previous PR.

This is a real pain and becomes a complete blocker to push updates

tender quarry
#

cc @astral timber

astral timber
#

hey, thank you for opening the GitHub issue. Did reply on the issue but posting it here as well

ould you try running amplify update auth, select Update OAuth social providers, re-enter the credentials and run amplify push. This should update the ~/.aws/amplify/deployment-secrets.json file