Frequently Asked Questions
- How do I run crons only in production?
- How do I stop functions from running?
- Why am I getting “Event key not found" errors in branch environments?
- How do I specify multiple serve paths for a same Vercel application on the Dashboard?
- What's the recommended way to redact data from step outputs?
- Why am I getting a
FUNCTION_INVOCATION_TIMEOUT
error? - My app's serve endpoint requires authentication. What should I do?
- Why am I getting a
killed
error when running the Dev Server? - Why am I getting a
NON_DETERMINISTIC_FUNCTION
error? - Why am I getting an
Illegal invocation
error?
How do I run crons only in production?
There are multiple ways to achieve it:
- Conditionally rendering depending on the environment.
process.env.NODE_ENV === "production" ? { cron: "* * *" } : { event: "dev/manualXYZ" }
💡 If you render an event instead of a cron in the other environments, you can still trigger your functions manually if needed.
How do I stop functions from running?
The best way to ensure a deprecated function doesn't run is to deploy without including it in your serve handler. You can temporarily achieved the same result by archiving the function on our dashboard, but note that a new deployment will unarchive the function.
Why am I getting “Event key not found" errors in branch environments?
Branch environments are automatically archived 3 days after their latest deploy. It's possible to disable the auto archive functionality for each active environment on our dashboard.
How do I specify multiple serve paths for a same Vercel application on the dashboard?
You can pass multiple paths as comma-delimited values under the Vercel app in the Vercel Integration’s settings.
What's the recommended way to redact data from step outputs?
We recommend doing E2E encryption instead, as it's more secure and plaintext data never leaves your servers.
Why am I getting a FUNCTION_INVOCATION_TIMEOUT
error?
This is a Vercel error that means your function timed out within Vercel's infrastructure before it was able to respond to Inngest. More information can be found in Vercel's docs.
If you're unable to sufficiently extend the timeout within Vercel, our streaming feature can help.
My app's serve endpoint requires authentication. What should I do?
Your app's serve endpoint needs to be accessible by our servers, so we can trigger your functions. For this reason, we recommend disabling authentication for the serve endpoint.
Our servers communicate securely with your app's serve endpoint using your signing key.
Vercel
By default, Vercel enables Deployment Protection for both preview and generated production URLs. This means that your app's serve endpoint will be unreachable by our servers unless you disable Deployment Protection or, if you're on Vercel's Pro plan, configure protection bypass.
Why am I getting a killed
error when running the Dev Server?
The Inngest CLI binary may become corrupted, particularly during updates while
being downloaded. Symptoms can also include the CLI giving no output or a
Segmentation fault
.
Clear your npx cache by running rm -rf ~/.npm/_npx
, or the cache of whichever
package manager you're using to run the Dev Server (for example pnpm prune
, yarn cache clean
).
If the error still persists, please reach out to us on our Discord.
Why am I getting a NON_DETERMINISTIC_FUNCTION
error?
This is an error present in v2.x.x of the TypeScript SDK that can be thrown when a deployment changes a function in the middle of a run.
If you're seeing this error, we encourage you to upgrade to v3.x.x of the TypeScript SDK, which will recover and continue gracefully from this circumstance.
For more information, see the Upgrading from v2 to v3 migration guide.
Why am I getting an Illegal invocation
error?
When making requests to an Inngest Server, the TypeScript SDK uses
fetch
. The
actual implementation of this varies across different runtimes, versions, and
environments. The SDK tries to account for these differences internally, but
sometimes providing a custom fetch
function is necessary or wanted.
This error is usually indicative of providing a custom fetch
function to
either a new Inngest()
or serve()
call, but not carrying over its
binding.
This is a common JavaScript gotcha, where bound methods lose their binding when
passed into an object.
To resolve, make sure that you rebind the fetch
function as it is passed. This
is commonly bound to globalThis
, though your specific runtime/version/environment
may vary.
new Inngest({
fetch: fetch.bind(globalThis),
});