index gives 404 @3.1.0-alpha.6
See original GitHub issueDescribe the bug
The index page gives 404
response headers:
age: 3
cache-control: public, max-age=0, s-maxage=2678400, must-revalidate
content-encoding: gzip
content-type: text/html
date: Tue, 22 Jun 2021 12:08:02 GMT
etag: W/"c9bf02fb02561a8f39002ccba9ae135b"
last-modified: Tue, 22 Jun 2021 12:04:04 GMT
server: AmazonS3
vary: Accept-Encoding
via: 1.1 81d299a580e85cd7d4af1e1123f3282a.cloudfront.net (CloudFront)
x-amz-cf-id: RauBQ_qL2RxhP0SGEsX4RhAuOC0WiBqA-jE_Qs5TLQly1P0wMJQa0Q==
x-amz-cf-pop: GRU3-C2
x-cache: Error from cloudfront
Actual behavior
After deploy, the index page gives 404
Expected behavior
Status code must be 20x
Steps to reproduce
1 - create a new next app 2 - create a simple serverless.yml 3 - deploy to aws
repo: https://github.com/lalvesoliveira/teste-aws my application: https://da8ewscicjuzd.cloudfront.net/
Versions
- OS/Environment: Windows 10
- @sls-next/serverless-component version: 3.1.0-alpha.6
- Next.js version: 10.0.2
Checklist
- You have reviewed the README and FAQs, which answers several common questions.
- Please first try using the most recent
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
ASP.NET Core 3.1 areas return 404 on some methods but ...
c# - ASP.NET Core 3.1 areas return 404 on some methods but not on the Index one - Stack Overflow. Stack Overflow for...
Read more >index 404 not found · Issue #861 · serverless-nextjs ...
On website load/reload, App renders the complete layout with nav bar and footer but index page ('/') is not found. When clicking in...
Read more >Net 6 API - 404 Not found
NET 6 and locally, I can see all controllers working and using them through swagger. ... run DEBUG, copy swagger url /swagger/index.html.
Read more >PEP 440 – Version Identification and Dependency Specification
“Index servers” are active distribution registries which publish version and ... Pre-releases for a given release are ordered first by phase (alpha, beta, ......
Read more >Firebase JavaScript SDK Release Notes - Google
Updated "missing index" error message to include the link to create the composite ... FCM now provides delivery data export to BigQuery as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found the problem… the origin response handler tries to reverse the s3 page -> original URL. So
index.html
became/index
but actually it should be/
as/index
isn’t found as any route, so it sets to 404 page.I thought we had sufficient tests for this but somehow the e2e tests stopped testing index page with SSG/HTML page. Will add back tests for it and fix
Ah nice catch, thanks @dphang