amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

Reconnect repository not working

Open christiangerarddr opened this issue 4 years ago • 16 comments

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

christiangerarddr avatar Jan 14 '21 10:01 christiangerarddr

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

hsspain avatar Jan 19 '21 17:01 hsspain

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

Seamooo avatar Apr 21 '21 02:04 Seamooo

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

gnomeria avatar May 11 '21 21:05 gnomeria

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

tjto avatar May 12 '21 07:05 tjto

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

shaunclark5649 avatar Jun 21 '21 13:06 shaunclark5649

same issue

christianwensel avatar Sep 09 '21 21:09 christianwensel

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

christianwensel avatar Sep 09 '21 22:09 christianwensel

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.

jaubrey-ebar avatar Sep 16 '21 05:09 jaubrey-ebar

@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

VaZark avatar Feb 10 '22 14:02 VaZark

This is still an issue for me @hsspain

reddyakhil avatar Mar 02 '22 04:03 reddyakhil

Still seems to be an issue...

tornvallalexander avatar Jun 15 '22 12:06 tornvallalexander

@hsspain any updates?

ErykAttoua avatar Sep 27 '22 09:09 ErykAttoua

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

johnnytomcat avatar Jan 25 '23 15:01 johnnytomcat

2 years later and this issue still exists...

uniknife avatar Apr 12 '23 09:04 uniknife

+1 Running into this as well in 2024.

codenimble avatar Jan 27 '24 09:01 codenimble

Having the same issue with AWS Amplify and Code Commit.

RichardMeyes avatar Feb 12 '24 04:02 RichardMeyes