amplify-backend
amplify-backend copied to clipboard
Error in older deployments
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.
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?
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:
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)
@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 thank you for the finding. I was able to reproduce this issue, marking as bug.
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.
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.