aws-amplify / aws-amplify/amplify-hosting

Amplify Console "Settings -> General" Page Crashes After Failed Repository Update

Open
#2,702 9 comments 0 reactions 0 assignees View on GitHub
bug console
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.

### App Id

d371tu609na9wc

### Region

us-east-2

### Amplify Hosting feature

Not applicable

### Describe the bug

Amplify console "Gernal -> Settings" page crashes and becomes blank white after attempting to update the Amplify app repository via the aws console. I believe the applicable console error causing the crash is `TypeError: V.repo is undefined`.
This is after updating from either GitHub or GitLab with a private account access token, and as the --repository destination using the ssh address. The command succeeds and updates the settings, but then breaks the console.
It is impossible to fix this since the console is now unusable, and the CLI only succeeds with the ssh link, and not the https link, using the same working access token.
`Error parsing parameter '--repository': Unable to retrieve https://gitlab.com//: received non 200 status code of 302`

### Expected behavior

Either:
1) The aws cli command to update the repository to an ssh address fails and tells me I should use an https address, or
2) The aws cli command updates the app with a bad repository and I can then fix the issue from the web console, or
3) The aws cli command succeeds and the repository is correctly updated, and the web console still works, or
4) The https link works and allows me to fix the issue by changing the repository to the correct link or reverting the change.

### Reproduction steps

1. Update the app repository: `aws amplify update-app --app-id --repository --access-token `
2. See success message in the terminal.
3. Open the app in the Amplify Web Console.
4. Left menu: "App settings" -> "General".
5. See a blank white screen.

### Build Settings

```yaml
After running the terminal command, we can see that the app was successfully updated to an ssh repository.
`"app": {
"appId": "---",
"appArn": "---",
"name": "---",
"tags": {},
"repository": "git@github.com:---/---.git",
...
`
```

### Additional information

Here is what the screen looks like when trying to view the console.

![aws_amplify_console_crash](https://user-images.githubusercontent.com/13738050/163300925-620e4089-b0a9-49f8-90ce-f787bf156b14.png)

Contributor guide

Open the contributing guide

Research direction

Start with the `aws amplify update-app` command using an SSH repository and then open App settings → General in the Amplify Web Console to reproduce the blank page and `TypeError: V.repo is undefined`. Done means the command and repository URL are handled consistently and the General settings page remains usable after the update.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, git
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.