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

Error in older deployments

Open hddananjaya opened this issue 1 year ago • 5 comments

Environment information

Sorry I don't know where I should run this code.

Description

I had multiple next.js apps that were hosted in Amplify Gen 1. Now one of them gives me this error when I try to open it.

For now, I can successfully deploy this app using aws amplify start-job command. But the Amplify app does not get triggered when there are new changes in github.

image

hddananjaya avatar May 13 '24 08:05 hddananjaya

Hey @hddananjaya, thank you for reaching out. Is this occurring on Safari browser? could you try switching to a different browser? Do you observe any error messages on the browser debug console?

ykethan avatar May 13 '24 20:05 ykethan

Hey @hddananjaya, thank you for reaching out. Is this occurring on Safari browser? could you try switching to a different browser? Do you observe any error messages on the browser debug console?

It happens in Brave on PopOS for me and we tested it on Chrome on Ubuntu, and Safari & Chrome on MacOS and also. Same issue.

Console: image

hddananjaya avatar May 14 '24 05:05 hddananjaya

So according to the above error, I assume it tries to work with an invalid URL and fails. I tried to see what this URL is with a bit of debugging but couldn't see it.

One thing that I saw after inspecting the network tab is that the repositoryCloneMethod method of this particular project is set as SSH. But all of the other projects that work fine are set as TOKEN. Maybe it fails there because SSH one doesn't have a valid HTTP URL as the "repository".

PS:

I double checked and it's the reason behind this (at least for the frontend crash)

image

hddananjaya avatar May 14 '24 06:05 hddananjaya

@ykethan I was able to fix that frontend crashing problem by changing the repository link, but we will need a proper fix.

aws amplify update-app --app-id APP_ID --repository https://github.com/myrepo.git --access-token MY_PERSONAL_ACCESS_TOKEN

hddananjaya avatar May 15 '24 05:05 hddananjaya

@hddananjaya thank you for the finding. I was able to reproduce this issue, marking as bug.

ykethan avatar May 16 '24 04:05 ykethan

Hey @hddananjaya, we have made some improvements to this. Was not able to reproduce the issue on re-testing. Closing this thread. Do let us know if are still experiencing this issue.

ykethan avatar Jun 13 '24 15:06 ykethan

Hey @hddananjaya, we have made some improvements to this. Was not able to reproduce the issue on re-testing. Closing this thread. Do let us know if are still experiencing this issue.

Hi @ykethan thanks for addressing this. I only had one Amplify project that didn't work properly. I re-created it.

hddananjaya avatar Jun 13 '24 18:06 hddananjaya