vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.07k stars 27.01k forks source link

Server Error 500: Server Actions + Interception Routes combo #49934

Closed sFritsch09 closed 11 months ago

sFritsch09 commented 1 year ago

Verify canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.1.0
    Binaries:
      Node: 18.16.0
      npm: 9.5.0
      Yarn: 1.22.19
    Relevant packages:
      next: 13.4.3-canary.1
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Routing (next/router, next/navigation, next/link)

Link to the code that reproduces this issue

https://github.com/sFritsch09/next-serveractions-with-modal

To Reproduce

Clone repository click on Test Modal button to see modal is working.

Then refresh page or go to /contact route. There you see a simple form which is using server action to just console log the formData to the server. With Modal activated the server responds with status 500.

To deactivate the modal just rename app/@modal to app/.@modal

Describe the Bug

When there is no modal activated for the same route where the server action is started, the formData is logged to the server console just fine.

Expected Behavior

I like to use server actions and interception routes to have a modal with a contact form using server actions

Which browser are you using? (if relevant)

Chrome, Opera GX

How are you deploying your application? (if relevant)

next start

github-actions[bot] commented 11 months ago

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.