aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
456 stars 115 forks source link

Reconnect repository not working #1457

Open christiangerarddr opened 3 years ago

christiangerarddr commented 3 years ago

I'm trying to change the source repository of my app, but the reconnect repository doesn't work on my end.

To Reproduce Steps to reproduce the behavior:

  1. Go to frontend environments > App settings > General
  2. Click on Reconnect repository
  3. Click on the new repository
  4. And nothing changes
hsspain commented 3 years ago

@christiangerarddr Can you provide your app ID and region? Which source control provider are you configured with? We will look into this issue ASAP.

Seamooo commented 3 years ago

Was able to replicate this recently. Looking at the api calls it was due to the github hook already existing for that application.

message: "There was an issue setting up your repository. Please try again later.({"message":"Validation Failed","errors":[{"resource":"Hook","code":"custom","message":"Hook already exists on this repository"}],"documentation_url":"https://docs.github.com/rest/reference/repos#create-a-repository-webhook"})" 

Manually deleting it through the github api solved the issue

gnomeria commented 3 years ago

I think this has major blocking in the behavior, because we cannot request another github approval request. In my case, I have 2 organizations that will be using amplify, but the github connection in the amplify could only detect 1 of them

tjto commented 3 years ago

I have same issue, but with CodeCommit instead of Github. What should be the solution for handling it.

shaunclark5649 commented 3 years ago

1 month later and this is still not fixed... this is poor

christianwensel commented 3 years ago

same issue

christianwensel commented 3 years ago

I was able to resolve by deleting all environments and reconnected the repository. Not a workflow I would like to repeat.

jaubrey-ebar commented 3 years ago

I see this problem chronically with Amplify and CodeCommit and both only have a single repo... It's bizarre that it already has the inputs it needs and knows the action to take but then prompts me to do it? Seriously?! And then if I do it it often doesn't work for MANY attempts with ~5 minutes lost on each attempt. The last 10 builds just failed in the same way. I detach the branch and still the same nonsense. Is the problem Amplify or CodeCommit?

The problem occurs regardless of whether the trigger is a git push or a manual click of the 'redeploy this version' button in Amplify console.

I was finally able to get it to build successfully after ~15 attempts. My guess is the error about reconnecting the repository is unrelated to the actual problem. In the most recent build, the only change was to remove the amplify.yml file from the repo and the default was used.

VaZark commented 2 years ago

@jaubrey-ebar Thanks for the heads-up. I'm in the same position and the build runs normally when I remove the amplify.yml file

reddyakhil commented 2 years ago

This is still an issue for me @hsspain

tornvallalexander commented 2 years ago

Still seems to be an issue...

ErykAttoua commented 2 years ago

@hsspain any updates?

johnnytomcat commented 1 year ago

The github app didnt work for me but using a personal access token does https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#setting-up-github-app-cloudformation

aws amplify  update-app --app-id APP_ID --repository https://github.com/Myaccount/react-app --access-token MY_TOKEN
uniknife commented 1 year ago

2 years later and this issue still exists...

codenimble commented 8 months ago

+1 Running into this as well in 2024.

RichardMeyes commented 8 months ago

Having the same issue with AWS Amplify and Code Commit.