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

Nextjs Server Action is not working on hosting #6653

Closed
OhDavit opened this issue Dec 29, 2023 · 1 comment · Fixed by #6664
Closed

Nextjs Server Action is not working on hosting #6653

OhDavit opened this issue Dec 29, 2023 · 1 comment · Fixed by #6664

Comments

@OhDavit
Copy link

OhDavit commented Dec 29, 2023

[REQUIRED] Environment info

firebase-tools: 13.0.2

Platform: macOS

[REQUIRED] Test case

Deploying Next js app with form and server actions

[REQUIRED] Steps to reproduce

  • Create an application next js app with npx
  • Add React form and Server Action as a form handler(onSubmit)
  • Initiate firebase project within the existing next js app
  • Deploy to hosting
  • Go to the page web.app.mydomain.com/discovery, fill the form and click on submit button

[REQUIRED] Expected behavior

Should work exactly as in the emulator, i.e. pressing Submit button calls backend function(server action) which does process request.

[REQUIRED] Actual behavior

Pressing Submit button doesn't call backend function(server action)

@OhDavit OhDavit changed the title Server Action is not working on hosting Nextjs Server Action is not working on hosting Dec 29, 2023
@leoortizz leoortizz self-assigned this Jan 5, 2024
@mycob
Copy link

mycob commented Feb 12, 2024

I am seeing the same exact issue.

firebase-tools: 13.0.3
firebase-frameworks: ^0.11.2
next: 14.0.1

The app behaves as expected when run on firebase emulators but not when deployed to hosting. SSR function is generated in both emulators as well as deployment.

Thank you for your efforts.

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

Successfully merging a pull request may close this issue.

3 participants