vercel-action icon indicating copy to clipboard operation
vercel-action copied to clipboard

Deployment Error: The total size of all Environment Variables (7.12KB) exceeds 4KB

Open thesobercoder opened this issue 3 years ago • 6 comments

I'm getting this error during deployment.

Error! The total size of all Environment Variables (7.12KB) exceeds 4KB.
Learn More: https://vercel.com/docs/v2/platform/limits#environment-variables
Error: The process '/opt/hostedtoolcache/node/12.20.1/x64/bin/npx' failed with exit code 1

I have two branches, namely - dev and main and they point to staging and prod domains respectively. The staging is working fine, but the prod throwing this error. I have absolutely no environment variables defined in the Vercel project, I have double-checked that.

thesobercoder avatar Jan 17 '21 19:01 thesobercoder

Could you post the rest of the logs from the action? It might be that the commit message is too long (-m githubCommitMessage=)

cjcaj avatar May 04 '21 16:05 cjcaj

I am having the same problem. Our team is using squash merge as a merge strategy. But if you take a branch by dividing production and stage, the commit message can easily become long. It would be nice if an option was added so that the commit message could be selectively delivered.

taehwanno avatar Nov 10 '21 02:11 taehwanno

We're having the same issue here. The workaround is to clear the squash and merge description when merging (and leaving only the merge title), but the problem is that there's no way to disable vercel-action passing the description, and no way to disable the description being filled in automatically on the GitHub side, so if anyone merging their own commit (after being approved) forgets to clear the box, the deployment fails.

There's also a separate but partially-related issue (I believe it is independently reported here: #100), where the message isn't quoted properly so if you include certain special characters in commit messages (such as backticks for inline code blocks, which GitHub now supports in commit messages) it will have a syntax error, which, while it is a mostly unrelated issue, the ability to disable passing the message entirely would fix both.

ImOnMars avatar Mar 14 '22 15:03 ImOnMars

We ran into the same issue as well, but squashing the commits and giving it a short title fixed the problem. Thanks for the workaround on this.

enesse avatar Mar 21 '22 08:03 enesse

The commit message should be truncated by this GitHub Action once it reached the 4kb limit.

https://github.com/amondnet/vercel-action/blob/master/index.js#L135 https://www.npmjs.com/package/unicode-byte-truncate

henryruhs avatar Apr 27 '22 12:04 henryruhs

Hi there! Wanted to update you on this issue. The limit has now been increased to 64KB. Here is the changelog

MFCo avatar Aug 09 '22 18:08 MFCo