P
Prisma5d ago
Mika

Missing field enableTracing

I'm having a problem with prisma in the production server. It is working fine locally Error:
thread '<unnamed>' panicked at query-engine/query-engine-node-api/src/engine.rs:76:45:

Failed to deserialize constructor options.

This usually happens when the javascript object passed to the constructor is missing
properties for the ConstructorOptions fields that must have some value.

If you set some of these in javascript through environment variables, make sure there are
values for data_model, log_level, and any field that is not Option<T>
: Error { status: InvalidArg, reason: "missing field `enableTracing`", maybe_raw: 0x0 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
thread '<unnamed>' panicked at query-engine/query-engine-node-api/src/engine.rs:76:45:

Failed to deserialize constructor options.

This usually happens when the javascript object passed to the constructor is missing
properties for the ConstructorOptions fields that must have some value.

If you set some of these in javascript through environment variables, make sure there are
values for data_model, log_level, and any field that is not Option<T>
: Error { status: InvalidArg, reason: "missing field `enableTracing`", maybe_raw: 0x0 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
2 Replies
Prisma AI Help
You chose to compile with the bot. One moment while I piece together your answer… The error you're encountering is related to a version mismatch between your Prisma packages or an incompatibility with tracing functionality. This is a common issue that appears in production environments but not in development. Based on the error message about "missing field enableTracing", this typically happens when: 1. You have mismatched versions of Prisma packages (e.g., prisma CLI and @prisma/client) 2. You're using an observability/tracing tool (like Sentry) that's not compatible with your Prisma version 3. You've recently upgraded to Prisma 6.x (particularly 6.1.0 or newer) Solutions: 1. Ensure version consistency: Make sure all your Prisma packages have the exact same version. Check your package.json for:
"prisma": "x.x.x",
"@prisma/client": "x.x.x"

"prisma": "x.x.x",
"@prisma/client": "x.x.x"

2. Check your CI/CD pipeline: If you're using npx prisma generate in production, it might be using a different version than what's installed. Try specifying the version explicitly:
npx [email protected] generate

npx [email protected] generate

3. Downgrade if necessary: Several users reported that downgrading to version 6.0.1 or 5.22.0 resolved this issue, as seen in Issues with Prisma 6.6.0 and Prisma 6.6.0 does not work with prismaSchemaFolder. 4. Check observability tools: If you're using Sentry or other monitoring tools, they might be causing conflicts with Prisma's tracing. Try disabling them temporarily to see if that resolves the issue. 5. Install @prisma/instrumentation: Some users reported that explicitly installing this package helped resolve tracing-related issues. This error is particularly common when deploying to cloud environments like Azure App Services or when using Docker containers, where the environment might differ from your local setup. 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
Nurul
Nurul4d ago
Hey 👋 When exactly do this happen? Did it start occurring after you upgraded prisma version? Which prisma version are you using?

Did you find this page helpful?