aws-amplify / aws-amplify/amplify-hosting
Some pages becomes randomly white useing next.js with ISR.
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [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
d1bxok73m14yc9
### Region
eu-north-1
### Amplify Hosting feature
_No response_
### Describe the bug
Randomly did we get white pages on the website which is using next.js. I have been debugging and do see that those pages have 0 bytes in the s3 bucket. Look at the photo. This happens randomly and 1 way to solve it is by removing the HTML file and it will be rebuilt and published.
I think that the invalidation is ok and that next.js revalidates the page successfully but when AWS pushes the file into s3 bucket it fail and I don't see any error logs on this and so on.

### Expected behavior
Page to revalidated successfully and pushed into s3 bucket without that the file will be blank and have 0 bytes.
### Reproduction steps
It's hard to reproduce. The only way I see is to trigger a lot of revalidations and check for blank pages.
### Build Settings
```yaml
next.js default
```
### Additional information
_No response_
Contributor guide
Research direction
Start by triggering many Next.js ISR revalidations for the Amplify Hosting app d1bxok73m14yc9 in eu-north-1, then inspect the generated HTML objects in the S3 bucket and available deployment logs. Done means revalidated pages are never published as zero-byte files and any failed upload is reported with an actionable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, next.js
- Domain
- ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100