-
Notifications
You must be signed in to change notification settings - Fork 26.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to debug on AWS? Error display 404, no logs #3988
Comments
Upgrade to latest canary. Should be fixed there. |
@timneutkens Okay, I'll try that. Also, I just noticed I don't find any example of Page using class Index extends Component {
static async getInitialProps({req}) {
const groupName = resolveCurrentGroupName(req.headers.host);
console.log('groupName resolved: ', groupName);
const settings = await getSettings();
const group = await getGroup(groupName, settings);
return {settings, group};
}
render() {
const {settings, group} = this.props;
return (
<LoanAdvisor
settings={settings}
group={group}
>
<IndexPage />
</LoanAdvisor>
);
}
}
export default Index; Edit: Actually I just found this example which does use |
@timneutkens Indeed, updating from canary 09 to 14 worked. I still have errors but they are visible on the AWS logs now. Thanks! |
👍 there was a bug which I fixed in 14 👍 |
I uploaded my Next.js/Express app on AWS and it's failing at runtime for unknown reason.
I have the following AWS logs:
What I could deduce from those logs is that a request is handled at http://staging.loan-advisor.studylink.fr/ by Express and then a new request from http://staging.loan-advisor.studylink.fr/_next/fa74e99a-3209-47d0-b35e-096852884958/page/_error.js is handled.
Next loads correctly IMHO, since it's able to load the http://staging.loan-advisor.studylink.fr/_next/fa74e99a-3209-47d0-b35e-096852884958/page/_error.js script, which, I guess, displays a 404?
So, something is wrong when Next.js app tries to display something initially, but I have nothing to help me debug the issue 😕
Locally, everything works correctly, but I'm concerned about the lack of logs in the AWS environment, which makes it super hard to debug anything.
I did force
quiet: false
when instanciating my Next.js app but it doesn't have any effect.Edit: I made a simple debug page at https://staging.loan-advisor.studylink.fr/debug which works fine and gets rendered correctly, so my first assumption is right, an exception happens in the index page which leads to throwing a 404 somehow. (instead of a 500 :/)
The text was updated successfully, but these errors were encountered: