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

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

Open UncleSnail opened this issue 2 years ago • 9 comments

Before opening, please confirm:

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/<account>/<repository>: 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 <value> --repository <ssh-address> --access-token <personal 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

After running the terminal command, we can see that the app was successfully updated to an ssh repository.
`"app": {
        "appId": "---",
        "appArn": "---",
        "name": "---",
        "tags": {},
        "repository": "[email protected]:---/---.git",
        ...
`

Additional information

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

aws_amplify_console_crash

UncleSnail avatar Apr 14 '22 02:04 UncleSnail

I am experiencing the exact same problem for App Id djtcp9yl28a69 (eu-west-1)

brandalive avatar Apr 14 '22 11:04 brandalive

Hello! Please try following both the "Install the Amplify GitHub App in your account" and "Generate a personal access token in your GitHub account" steps here

Athena96 avatar Apr 14 '22 15:04 Athena96

Thank you for the suggestion. Unfortunately, that is solving a slightly different issue. I did have a GitHub account already linked and working, similar to what is described in the referenced article. The issue came up when trying to switch the repository of an existing app from this working GitHub app connection to GitLab. Although I may be able to get the old GitHub working again, it doesn't change the fact that there is a bug causing the web console to crash. Once again, thank you for the quick response. I will try that solution to get the app back up and running for the time being.

UncleSnail avatar Apr 14 '22 16:04 UncleSnail

@UncleSnail thanks for bringing this issue to our attention. I've added this bug to our backlog for prioritization. In the mean time I'll try to reproduce and figure out how to workaround this issue.

ghost avatar Apr 19 '22 14:04 ghost

@UncleSnail I have exactly same issue. do you get any solution for this?

pritesh511 avatar Jul 08 '22 12:07 pritesh511

@pritesh511 No, I never resolved this issue. For me, I just created a new Amplify application with all the same settings and code to avoid the issue.

UncleSnail avatar Jul 08 '22 18:07 UncleSnail

@UncleSnail how it's possible with configure new app with existing settings of existing app. I was just make also another app and try to configure that with that existing app settings. Beacusee i checked for that but I can not get any docs and YouTube videos that help to use existing userpool, existing appsync api , existing storage etc..

pritesh511 avatar Jul 08 '22 21:07 pritesh511

In AWS Amplify app, We have a backend environments, Is it possible to copy all backend environment and add into newly created app?

pratikbalochiya avatar Jul 15 '22 14:07 pratikbalochiya

@pritesh511 and @pratikbalochiya , AFAIK, it is not possible to copy any settings to new apps from the web portal. You can point apps to the same code repository, and there may be a way to copy settings from the command line, but I haven't seen one anywhere. It must all be done manually.

UncleSnail avatar Sep 15 '22 14:09 UncleSnail