Giovani Granzotto
Giovani Granzotto
Explore posts from servers
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
No description
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
No description
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
No description
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
It happens at only one point in the code, even though similar queries with the in filtering exist elsewhere. There's nothing very remarkable about it. We might upgrade the prisma client in a future update and will let you know if it continues happening.
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
log transcript:
Executing backorder findMany with orgId: org_2kkwpfy6QEpuF9w0xVYA5Ikb2xy and skus: [
'107082022484',
'107082022492',
'107082004816',
'107082020113',
'107082022495',
'107085008705',
'107082022450'
]
PrismaClientValidationError:
Invalid `prisma.backOrderQueue.findMany()` invocation:

{
where: {
orgId: "org_2kkwpfy6QEpuF9w0xVYA5Ikb2xy",
sku: {
in: [
"107082022484",
"107082022492",
"107082004816",
"107082020113",
"107082022495",
"107085008705",
"107082022450"
]
}
}
}

Argument `in`: Invalid value provided. Expected ListStringFieldRefInput, provided (Null, Null, Null, Null, Null, Null, Null).
at An (/var/task/node_modules/@prisma/client/runtime/library.js:114:7526)
at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7392)
at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7057)
at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:121:6741)
at async Array.$allOperations (/var/task/.next/server/chunks/4499.js:38:691)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:130:9355)
at async k (/var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:5696)
at async Promise.all (index 0)
at async s.Z.$transaction.maxWait (/var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:4848)
at async Proxy._transactionWithCallback (/var/task/node_modules/@prisma/client/runtime/library.js:130:7722) {
clientVersion: '5.17.0'
}
Executing backorder findMany with orgId: org_2kkwpfy6QEpuF9w0xVYA5Ikb2xy and skus: [
'107082022484',
'107082022492',
'107082004816',
'107082020113',
'107082022495',
'107085008705',
'107082022450'
]
PrismaClientValidationError:
Invalid `prisma.backOrderQueue.findMany()` invocation:

{
where: {
orgId: "org_2kkwpfy6QEpuF9w0xVYA5Ikb2xy",
sku: {
in: [
"107082022484",
"107082022492",
"107082004816",
"107082020113",
"107082022495",
"107085008705",
"107082022450"
]
}
}
}

Argument `in`: Invalid value provided. Expected ListStringFieldRefInput, provided (Null, Null, Null, Null, Null, Null, Null).
at An (/var/task/node_modules/@prisma/client/runtime/library.js:114:7526)
at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7392)
at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7057)
at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:121:6741)
at async Array.$allOperations (/var/task/.next/server/chunks/4499.js:38:691)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:130:9355)
at async k (/var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:5696)
at async Promise.all (index 0)
at async s.Z.$transaction.maxWait (/var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:4848)
at async Proxy._transactionWithCallback (/var/task/node_modules/@prisma/client/runtime/library.js:130:7722) {
clientVersion: '5.17.0'
}
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
No description
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
This is the whole function code. I thought it might have something to do with closures and the strings getting garbage collected or something else low-level like that, but it still doesn't make sense
const getBackorderQuantities = async (
items: { sku: string }[],
orgId: string,
prisma: Prisma.DefaultPrismaClient,
): Promise<Record<string, BackOrderQueue | undefined>> => {
const skus = items.map((i) => i.sku).filter((sku) => sku !== null);
return buildIdentityMap(
await prisma.backOrderQueue.findMany({
where: { orgId, sku: { in: skus } },
}),
(i) => i.sku,
);
};
const getBackorderQuantities = async (
items: { sku: string }[],
orgId: string,
prisma: Prisma.DefaultPrismaClient,
): Promise<Record<string, BackOrderQueue | undefined>> => {
const skus = items.map((i) => i.sku).filter((sku) => sku !== null);
return buildIdentityMap(
await prisma.backOrderQueue.findMany({
where: { orgId, sku: { in: skus } },
}),
(i) => i.sku,
);
};
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
Hi @Nurul . This does not work, as a developer added this filter a few days ago when he saw the error and it happened again now. Also, why would the library log the query with a non null string if it was passed as null?
PrismaClientValidationError:
Invalid `prisma.backOrderQueue.findMany()` invocation:

{
where: {
orgId: "org_2p02m0j784obFqd5TJzIAcVwHzN",
sku: {
in: [
"207082011377"
]
}
}
}

Argument `in`: Invalid value provided. Expected ListStringFieldRefInput, provided (Null).
PrismaClientValidationError:
Invalid `prisma.backOrderQueue.findMany()` invocation:

{
where: {
orgId: "org_2p02m0j784obFqd5TJzIAcVwHzN",
sku: {
in: [
"207082011377"
]
}
}
}

Argument `in`: Invalid value provided. Expected ListStringFieldRefInput, provided (Null).
15 replies
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
Nonsense error on correctly structured query
Hi @Nurul . Yes, I got this error on my production deploy. I wasn't able to reproduce it either locally or in the deployed environment, it seemed like a one off or intermittent error, do you have any information on the conditions that could cause it?
15 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
Thanks for the confirmation, Nurul. I deployed to vercel and it did not hang at all 👍
11 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
I've tried running the SQL directly on the the database while I was testing it, but I did it in a "statement by statement" basis and not the entire script at once, so this could be related. It works, it even works through prisma sometimes (I tried running it, then manually running a "reverse" migration multiple times), but through prisma it's not deterministic. I think it hanging could be just an artifact of repeatedly running it and reversing it on my development machine since I've found that restarting the PC can make it run successfully (maybe unknown state on the database or the prisma migration rust service).
11 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
Thank you! This is the sort of confirmation I was looking for. I was worried there could be some underlying limitation to using DML queries since I don't know how the migration engine works, but if you've used them like this I think I can trust it and try it out on my preview/QA database.
11 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
I'll need to bump this... does anyone know if this is supported by prisma migrations or not?
11 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
Ok, actually it seems to work or hang intermittently...
11 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
No description
11 replies
CCConvex Community
Created by Giovani Granzotto on 7/30/2024 in #support-community
Prod build error broken: 403 Forbidden: ReadOnlyAdminKey: You do not have permission
No description
13 replies
CCConvex Community
Created by Giovani Granzotto on 7/30/2024 in #support-community
Prod build error broken: 403 Forbidden: ReadOnlyAdminKey: You do not have permission
done
13 replies
CCConvex Community
Created by Giovani Granzotto on 7/30/2024 in #support-community
Prod build error broken: 403 Forbidden: ReadOnlyAdminKey: You do not have permission
Hmmm ok, I'll ask the owner to generate a key when I get the chance then
13 replies