aws-amplify / aws-amplify/amplify-hosting
All environments on custom domains suddenly 404'ing with “x-cache: Error from cloudfront”
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked the [custom domains troubleshooting guide](https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html).
- [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
arn:aws:amplify:us-east-1:123831848463:apps/d34je5hlq2q26a
### Region
us-east-1
### Step
Accessing app via custom domain, e.g. https://payb.ticto.app/O7951502B
### Status
404
### Issue or question
I'm getting 404 | X-Cache: Error from cloudfront, from https://payb.ticto.app/O7951502B, is one of the pages in the production environment, I noticed that on some computers, cell phones, they can open it, others cannot. I use Cloudflare in front, I tested activating and removing proxy, the same error occurs. PS: The same problem happens with custom domains, or with amplify itself
### Error message
```
Cf-Cache-Status: DYNAMIC
Cf-Ray: 813fd425aef61aac-GRU
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Date: Tue, 10 Oct 2023 15: 7: 0 GMT
Server: cloudflare
Vary: Accept-Encoding
Via: 1.1 fad3f173366d4dbb66574501c04f58ec.cloudfront.net (CloudFront)
X-Amz-Cf-Id: pLxRCP161B-nTpljJff5Gr1AI4IPHcdHenfQ_GQzNSeD2a5HkJoARA==
X-Amz-Cf-Pop: GRU3-P5
X-Cache: Error from cloudfront
X-Powered-By: Next.js
```
### Additional information
I hope to load the same on Vercel using cloudflare, link:https://payment.ticto.app/O7951502B
Pending: https://github.com/aws-amplify/amplify-hosting/issues/3755
Contributor guide
Research direction
No repository files, tests, or entry points are identified. Start by reproducing the custom-domain request at the supplied URL and compare its CloudFront and Cloudflare response headers with the working Vercel URL; review pending issue #3755 for related context. Done means identifying a repository-owned cause and a reproducible fix, but the issue does not currently define one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, next.js
- Domain
- cloud, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100