prisma: Could not figure out an ID in create
Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions
| Name | Version |
|---|---|
| Node | v21.6.0 |
| OS | linux-arm64-openssl-3.0.x |
| Prisma Client | 5.12.1 |
| Query Engine | 473ed3124229e22d881cb7addf559799debae1ab |
| Database | postgresql |
Logs
prisma:tryLoadEnv Environment variables not found at null
prisma:tryLoadEnv Environment variables loaded from /home/sonichigi.linux/bun-sql/.env
prisma:client checkPlatformCaching:postinstall false
prisma:client checkPlatformCaching:ciName
prisma:tryLoadEnv Environment variables not found at null
prisma:tryLoadEnv Environment variables loaded from /home/sonichigi.linux/bun-sql/.env
prisma:client dirname /home/sonichigi.linux/bun-sql/node_modules/.prisma/client
prisma:client relativePath ../../../prisma
prisma:client cwd /home/sonichigi.linux/bun-sql/prisma
prisma:client clientVersion 5.12.1
prisma:client:libraryEngine internalSetup
prisma:get-platform Found distro info:
{
"targetDistro": "debian",
"familyDistro": "debian",
"originalDistro": "debian"
}
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu")
prisma:get-platform Falling back to "ldconfig" and other generic paths
prisma:get-platform Command "ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | grep -v "libssl.so.0"" successfully returned "libssl.so
libssl.so.3
libssl3.so
"
prisma:get-platform Found libssl.so file using "ldconfig" or other generic paths: libssl.so
libssl.so.3
libssl3.so
prisma:get-platform The parsed libssl version is: 3.0.x
prisma:client:engines:resolveEnginePath enginePath /home/sonichigi.linux/bun-sql/node_modules/.prisma/client/libquery_engine-linux-arm64-openssl-3.0.x.so.node
prisma:client:libraryEngine sending request, this.libraryStarted: false
prisma:client:libraryEngine library starting
prisma:client:libraryEngine library started
prisma:client:request_handler {"name":"PrismaClientRustPanicError","clientVersion":"5.12.1"}
prisma:client:libraryEngine sending request, this.libraryStarted: true
prisma:client:libraryEngine sending request, this.libraryStarted: true
Client Snippet
//index.ts
import Elysia from "elysia";
import { recipeController } from "./controllers/post.controller";
import { PrismaClient } from "@prisma/client";
import { userController } from "./controllers/user.controller";
import { commentController } from "./controllers/comments.controller";
//Create instances of prisma and Elysia
const prisma = new PrismaClient();
const app = new Elysia();
//Use controllers as middleware
app.use(userController as any);
app.use(recipeController as any);
app.use(commentController as any);
//Listen for traffic
app.listen(4040, () => {
console.log("Server is running on port 4040");
});
export { app, prisma };
Schema
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
password String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
posts Post[]
comments Comment[]
}
model Post {
id Int @id @default(autoincrement())
title String
body String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id])
userId Int
comments Comment[]
}
model Comment {
id Int @id @default(autoincrement())
body String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id])
userId Int
post Post @relation(fields: [postId], references: [id])
postId Int
}
Prisma Engine Query
{"X":true}}}
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17 (7 by maintainers)
Hey @janpio, so what i observed was that the test case and mock for that specific test are not matched, this is happening due to the fact that the mock and test are based on binary matching while mostly resulted in random mocks for the test cases. Due to this the tests were failing, so when I tried to run
keploy test -c "bun --watch index.ts" --removeUnusedMocks, i was able to get actual test result randomly out of 10 times.I have created a issue :- https://github.com/keploy/keploy/issues/1944
Here are few curl commands :-
Sure, would need sometime, to change to Node and experiment with others.
Hey @Sonichigo,
Would you mind trying with a newer version of Prisma and confirm whether the bug is still present?
Thank you š