aws-amplify / aws-amplify/amplify-hosting
Issue with github webhooks on save and deploy
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### App Id
NEW_APP
### AWS Region
us-east-1
### Amplify Hosting feature
Not Applicable
### Frontend framework
JavaScript
### Next.js version
N/A
### Next.js router
N/A
### Describe the bug
It's exactly the same bug as described in this issue: https://github.com/aws-amplify/amplify-hosting/issues/3434
My repository has React frontend and Node JS backend in folder frontend and backend. I use default build settings.
When I navigate to the repository and go to Settings -> Webhooks, it's empty so webhook never gets created.
### Expected behavior
App deploying after clicking Save and deploy.
### Reproduction steps
1. Follow the steps in the Amplify user-guide for connecting a Github repository: https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#setting-up-github-app
2. Receive "There was an issue setting up your repository." after clicking "Save & Deploy" on step 14
### Build Settings
```yaml
version: 1
frontend:
phases:
# IMPORTANT - Please verify your build commands
build:
commands: []
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: /
files:
- '**/*'
cache:
paths: []
```
### Log output
```
# Put your logs below this line
Houston, there's a problem
There was an issue setting up your repository. Please try again later.({"message":"Not Found","documentation_url":"https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook"})
```
### Additional information
When checking network tab in chrome I see that clicking Save and deploy tries to call POST https://amplify.us-east-1.amazonaws.com/apps and 400 gets returned with the error message above.
Body of the request:
```javascript
buildSpec:
"version: 1\nfrontend:\n phases:\n # IMPORTANT - Please verify your build commands\n build:\n commands: []\n artifacts:\n # IMPORTANT - Please verify your build output directory\n baseDirectory: /\n files:\n - '**/*'\n cache:\n paths: []\n",
customRules: [{source: "/<*>", target: "/index.html", status: "404-200"}]
environmentVariables: {}
name: "name_of_my_app" //sensitive data
oauthToken: "oauth_token_value" //sensitive data
platform: "WEB"
repository: "repo_uri" //sensitive data
```
Contributor guide
Assessment
This issue has not been assessed yet.