This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Description
Issue Summary
When using next js, you can't call different api endpoints from react's useEffect hook in two different pages without a full reload. It results in a 503 error while the actual API endpoint works perfectly fine.
Actual behavior
Using next/link or next/react router to switch to another page results in subsequent api calls (made using axis) in the useEffect hook to fail after 10s of loading with a 503 error, when the API endpoint and the actual page work fine after a reload of the browser. The error in cloud watch is: Task timed out after 10.01 seconds
Expected behavior
Being able to make api calls in useEffect hooks after page switching.
Steps to reproduce
Create a new repo with latest next-auth beta version and make an api endpoint protected by their server side session utility. Try to access this endpoint in two different pages using axios.get(), with the second page accessed via a link.
Screenshots/Code/Configuration/Logs
serverless.yml:
component: "@sls-next/[email protected]"
Versions
- OS/Environment: macOS 12 Monterey Beta (Apple M1)
- @sls-next/serverless-component version: 3.4.0-alpha.8
- Next.js version: 11.1.2
Additional context
Checklist