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

Custom domain not serving latest version of app

Open stitch-rich opened this issue 2 years ago • 11 comments

Before opening, please confirm:

App Id

dq8ai2n6pg8pv

Region

eu-west-2

Step

deployment

Status

Available

Issue or question

We are using Amplify to host 3 front end only React applications. These are deployed through our Github action pipelines using the API.

This runs successfully and the app is updated on the Amplify url each time we run it with the latest code. However it appears the version of our app being served on the custom domain configured is a version from about a week ago. Each time we run the build we get the same result so appears this stopped being updated mid-end of last week.

We have been across our code, setup and anything we can see our side but cannot find anything that would have changed to cause this. It is affection all 3 of our apps in Amplify which are run across 2 custom domains. No changes were made to DNS or pipelines in this time so we are a at a bit of a loss as to next steps to rectify this.

Error message

No response

Additional information

No response

stitch-rich avatar Jul 05 '22 12:07 stitch-rich

I have been conducting some further testing and when creating a new application with a different custom domain I am getting a similar issues (all via the API). I created a new app and deployment and associated a different custom domain. When the first deployment went out the custom domain verified and issued SSL correctly but was serving the default amplify page inviting me to create my first deployment. Whereas the amplify generated url was showing the actual application

After this i deleted the custom domain name from amplify via the UI and then re-associated it (again via the UI) this did pickup the latest version. However, as soon as I run a new deployment I end up back in the same position where the deployments created via the API are visible on the amplify generated url but not my custom domain which is just serving the old version of the app

stitch-rich avatar Jul 05 '22 14:07 stitch-rich

Hi @stitch-rich 👋🏽 thanks for raising this issue. I've not setup CI/CD with Github Actions before so I need some more information from you to fully understand. Are there any workflow logs you can share that are output by GitHub when you run a deployment? Also, could you share the yml script you are running for the workflow? Please be sure to redact any sensitive information.

ghost avatar Jul 06 '22 21:07 ghost

I seem to be having a similar issue using Manual Deployment. I have documented the issue in #2860 . Please let me know if I can provide additional information to help troubleshoot this issue.

dereke55 avatar Jul 12 '22 13:07 dereke55

Yep, we have the same issue as well. The whole CI/CD pipeline was working fine till weeks ago. But then this problem started to show up.

There's no errors from the Github Actions (we're using plain AWS CLI for deployments [start-deployment]) and can confirm the Amplify Console has no issues either (shows the correct deployment time which aligns with the GH action).

But once we run the following command,

aws amplify update-app --app-id xxxxxxxxxxxx --platform WEB --region xx-xxxx-x

It gets updated (or the cloudfront cache gets cleared).

But when I run this script as the part of CI/CD it just updates the previous build (not the one currently built)

DeltaCircuit avatar Jul 20 '22 08:07 DeltaCircuit

We've root-caused the issue and are currently working on the fix. In the meantime, please use one of the following workarounds:

  1. Disable, then re-enable the custom domain in App Settings > Domain Management > Manage subdomains
  2. Only upload compressed .zip build artifact folders

oliver-leung avatar Jul 20 '22 22:07 oliver-leung

@oliver-leung is there an ETA on resolving this?

katherinepamina avatar Aug 11 '22 03:08 katherinepamina

@katherinepamina Unfortunately we can't provide an ETA on the fix, but it has been implemented and we're hoping to deploy it soon. In the meantime, please use one of the above provided workarounds.

oliver-leung avatar Aug 11 '22 17:08 oliver-leung

Hey guys, I'm experiencing the same issue with CI enabled. Had to disable and re enable custom domains to get it working

maurhub avatar Sep 19 '22 20:09 maurhub

I am as well. And this response from tech support is awful

markAking avatar Sep 19 '22 21:09 markAking

I have faced this issue too, Had to disable and re-enable it. Can we get this fixed sooner please ?

mbj36 avatar Sep 20 '22 16:09 mbj36

Can this be addressed, it's a pretty ridiculous bug to have around for so long.

runtman avatar Sep 21 '22 09:09 runtman

The fix has already been deployed and verified in all regions. Please retry your deployments, and let me know if the issue persists.

oliver-leung avatar Oct 07 '22 21:10 oliver-leung

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Oct 07 '22 21:10 github-actions[bot]