Skip to content
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

Getting 500 Internal Server Error for SSR pages when deploying nextjs 14 app to firebase hosting and functions #6620

Closed
marcellintacite opened this issue Dec 15, 2023 · 4 comments

Comments

@marcellintacite
Copy link

Here's my firebase.json file :

{
  "hosting": {
    "source": ".",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "frameworksBackend": {
      "region": "europe-west1"
    },
    "appAssociation": "AUTO"
  }
}

app/courses/page.tsx and app/courses/[id]/page.tsx are SSR pages and these pages are working normally when using the firebase emulator but when deploying on the cloud, i am gettting this :
Capture d'écran 2023-12-15 141156

[REQUIRED] Environment info

firebase-tools:

Platform:

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

[REQUIRED] Actual behavior

@google-oss-bot
Copy link
Contributor

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@aalej
Copy link
Contributor

aalej commented Dec 15, 2023

Hey @marcellintacite, thanks for reaching out. I’m unable to reproduce the issue you mentioned. I tried deploying a Next.js app, and I was able to access the routes without any issues.

Could you let us know which version of firebase-tools you’re using? I’m currently using v13.0.2. Also, it would be helpful if you could provide an MCVE or details on the steps you took to set up your Next.js project so that we can try to replicate it on our end.

@aalej aalej added the Needs: Author Feedback Issues awaiting author feedback label Dec 15, 2023
@leoortizz
Copy link
Member

@marcellintacite You can check the server logs in the Google Cloud console: https://console.cloud.google.com/logs/query

Can you share the error you see in the GCP logs when you see the error page?

@marcellintacite
Copy link
Author

Thank you, I appreciate your efforts in investigating the issue. After diving into the problem, I found a resolution in discussion #58244. The bug appears to be related to the nextjs build error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants