question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic route at pages level leds request for public resources to 503 Error

See original GitHub issue

Describe the bug

When dynamic route is at pages level (e.g. pages/[lang]/index.jsx) public folder content return a 503 Error: “The Lambda function associated with the CloudFront distribution is invalid or doesn’t have the required permissions. We can’t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.”

Actual behavior

When getStaticPaths is being used on a root level dynamic route (pages/[lang]/index.jsx), public folder or any not generated request that is issued at that level (www.example.com/foo), respond 503

Expected behavior

Public resources should be served correctly, and all the not generated request at root level should respond with a 404 page

Steps to reproduce

Put a dynamic route at root level /pages/[lang]/index.jsx with getStaticPaths and a public folder with favicon and the favicon is not reachable.

Versions

1.18.0-alpha.5

Checklist

  • You have reviewed the README and FAQs, which answers several common questions.
  • Please first try using the latest @sls-next/serverless-component release version, which may have already fixed your issue. Note that the old serverless-next.js component and the serverless-next.js plugin are deprecated and no longer maintained.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

3reactions
dphangcommented, Oct 15, 2020

Supported 404 pages for fallback: false in 1.18.0-alpha.8. Please try and let me know if there are any issues.

2reactions
dphangcommented, Oct 13, 2020

May be related to this: https://github.com/serverless-nextjs/serverless-next.js/issues/646. I will take a look this week at both. Was making e2e tests more extensible so it’s easier to add new ones, we will add tests for these cases so it shouldn’t break in the future once fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is HTTP error 503 and how do you fix it? - IT PRO
Essentially, the 503 error is your first warning that something is preventing the browser from accessing the website server. This is where said...
Read more >
Azure Application Insights for JavaScript web apps
Get page view and session counts, web client data, and single-page applications and track usage patterns. Detect exceptions and performance ...
Read more >
RFC 7231: Hypertext Transfer Protocol (HTTP/1.1)
This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header ...
Read more >
Routing in Next.js – How to Set Up Dynamic Routing with Pre ...
There is also a backendData folder at the root level of our Next.js application with the some-backend-data.json file (thus not in the pages...
Read more >
Sea Level Rise and Implications for Low-Lying Islands, Coasts ...
For example, adaptation pathway analysis recognises and enables sequenced long-term decision making in the face of dynamic coastal risk characterised by deep ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found