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

Server action resolving to undefined when Vercel throws an error in Next v14 #74948

Closed
okcoker opened this issue Jan 15, 2025 · 4 comments
Closed
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@okcoker
Copy link
Contributor

okcoker commented Jan 15, 2025

Link to the code that reproduces this issue

https://github.com/okcoker/vercel-server-action-bug

To Reproduce

  1. Visit demo and upload an image larger than the 4.5mb imposed by vercel
  2. Vercel will throw a 413 error
  3. The server action will resolve with an undefined value

Current vs. Expected behavior

I expect the server action to reject, which seems to be the case in next.js v15

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031
  Available memory (MB): 49152
  Available CPU cores: 16
Binaries:
  Node: 22.10.0
  npm: 10.9.0
  Yarn: 1.22.21
  pnpm: 9.11.0
Relevant Packages:
  next: 14.2.23 // An outdated version detected (latest is 15.1.4), upgrade is highly recommended!
  eslint-config-next: 14.2.23
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

create-next-app, Runtime

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

Testing with the latest next v15 doesn't seem to have this issue.

@okcoker okcoker added the bug Issue was opened via the bug report template. label Jan 15, 2025
@github-actions github-actions bot added create-next-app Related to our CLI tool for quickly starting a new Next.js application. Runtime Related to Node.js or Edge Runtime with Next.js. labels Jan 15, 2025
@samcx samcx removed the bug Issue was opened via the bug report template. label Jan 16, 2025
@blakewilson
Copy link

This is related to #74903. Was fixed via #69945 I believe. Hopefully this can get back ported to Next 14 🙏 cc @samcx

@samcx
Copy link
Member

samcx commented Jan 24, 2025

@blakewilson Taking a look!

@ztanner
Copy link
Member

ztanner commented Jan 26, 2025

Hi @okcoker -- unfortunately we're not able to backport the v15 fix for this, as folks were relying on the behavior of the action promise not being rejected (eg: #71740). To avoid introducing a breaking change, we're not currently planning to backport it to v14.

Please let us know if there's anything blocking you from upgrading to v15.

@ztanner ztanner closed this as completed Jan 26, 2025
@okcoker
Copy link
Contributor Author

okcoker commented Jan 26, 2025

@ztanner Thanks for checking into it. I have plans to upgrade to v15 at some point but wanted to do my part in reporting the issue I found in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

4 participants