desert.elf
desert.elf
Explore posts from servers
DTDrizzle Team
Created by desert.elf on 10/31/2024 in #help
drizzle-kit push keeps trying to drop and recreate the same constraints
│ALTER TABLE "authenticator" DROP CONSTRAINT authenticator_userId_credentialID_pk;
│--> statement-breakpoint
│ALTER TABLE "authenticator" ADD CONSTRAINT authenticator_userId_credentialID_pk PRIMARY KEY(userId,credentialID);
│ALTER TABLE "account" DROP CONSTRAINT account_provider_providerAccountId_userId_pk;
│--> statement-breakpoint
│ALTER TABLE "account" ADD CONSTRAINT account_provider_providerAccountId_userId_pk PRIMARY KEY(provider,providerAccountId,userId);
│ALTER TABLE "authenticator" DROP CONSTRAINT authenticator_userId_credentialID_pk;
│--> statement-breakpoint
│ALTER TABLE "authenticator" ADD CONSTRAINT authenticator_userId_credentialID_pk PRIMARY KEY(userId,credentialID);
│ALTER TABLE "account" DROP CONSTRAINT account_provider_providerAccountId_userId_pk;
│--> statement-breakpoint
│ALTER TABLE "account" ADD CONSTRAINT account_provider_providerAccountId_userId_pk PRIMARY KEY(provider,providerAccountId,userId);
[email protected] using vercel-neon postgres I see many posts with this happening but no responses. Any clues ? This is becoming a huge headache in production for us.
2 replies
TTCTheo's Typesafe Cult
Created by desert.elf on 7/28/2024 in #questions
Issues with attaching `customId` to Files using `utapi.uploadFiles()`
Hey all! I'm using uploadthing server side via the utapi library but when i try to attach a customId to a file object and upload I error out vs just uploading w/ no customId. This is the code
const uploadFile = new File([blob], `${imageCustomId}.png`, {
type: 'image/png'
}) as FileEsque;

uploadFile.customId = imageCustomId; // Set the customId to the imageCustomId

// Upload the image using fetch
const uploadResponse = await utapi.uploadFiles(uploadFile);

if (uploadResponse.error) {
throw new Error(
`Upload failed with Error: ${uploadResponse.error.message} and code: ${uploadResponse.error.code}`
);
}
const uploadFile = new File([blob], `${imageCustomId}.png`, {
type: 'image/png'
}) as FileEsque;

uploadFile.customId = imageCustomId; // Set the customId to the imageCustomId

// Upload the image using fetch
const uploadResponse = await utapi.uploadFiles(uploadFile);

if (uploadResponse.error) {
throw new Error(
`Upload failed with Error: ${uploadResponse.error.message} and code: ${uploadResponse.error.code}`
);
}
Now when i do this - i get the following error (with debug mode on) - note that this is not a uploadResponse.error but an error caught by the wider try catch i have around this code.
Waiting for the debugger to disconnect...
Error capturing or uploading image: (FiberFailure) BadRequestError: Request to https://uploadthing.com/api/uploadFiles failed with status 500
at eval (webpack-internal:///(rsc)/./node_modules/@uploadthing/shared/dist/index.js:465:102)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:1295:199)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:1043:5)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:679:3)
at Object.execute (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:654:7)
at resume (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:847:22)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:889:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
GET /api/device/update 500 in 5858ms
Waiting for the debugger to disconnect...
Error capturing or uploading image: (FiberFailure) BadRequestError: Request to https://uploadthing.com/api/uploadFiles failed with status 500
at eval (webpack-internal:///(rsc)/./node_modules/@uploadthing/shared/dist/index.js:465:102)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:1295:199)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:1043:5)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:679:3)
at Object.execute (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:654:7)
at resume (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:847:22)
at eval (webpack-internal:///(rsc)/./node_modules/effect/dist/esm/Micro.js:889:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
GET /api/device/update 500 in 5858ms
If i simply comment out the customId assignment it works completely fine and i get a successful upload - having a customId is really important to how i'm using this - any help is appreciated!
1 replies
RRailway
Created by desert.elf on 2/22/2024 in #✋|help
Puppeteer: Failed to launch the browser process - `GLIBC_2.36' not found.
Hi! I'm using puppeteer to take a screenshot of a website being hosted on the railway service itself but everytime i get to the code i get the following error:
Error: Failed to launch the browser process!

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libmount.so.1)

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libmount.so.1)

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libblkid.so.1)

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libuuid.so.1)

TROUBLESHOOTING: https://pptr.dev/troubleshooting

at Interface.onClose (file:///app/node_modules/@puppeteer/browsers/lib/esm/launch.js:262:24)

at Interface.emit (node:events:526:35)

at Interface.close (node:internal/readline/interface:527:10)

at Socket.onend (node:internal/readline/interface:253:10)

at Socket.emit (node:events:526:35)

at endReadableNT (node:internal/streams/readable:1408:12)

at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: Failed to launch the browser process!

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libmount.so.1)

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libmount.so.1)

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libblkid.so.1)

/root/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dnhl6kcdmhad5402v0irwx3mdfjyzf6i-util-linux-minimal-2.39.2-lib/lib/libuuid.so.1)

TROUBLESHOOTING: https://pptr.dev/troubleshooting

at Interface.onClose (file:///app/node_modules/@puppeteer/browsers/lib/esm/launch.js:262:24)

at Interface.emit (node:events:526:35)

at Interface.close (node:internal/readline/interface:527:10)

at Socket.onend (node:internal/readline/interface:253:10)

at Socket.emit (node:events:526:35)

at endReadableNT (node:internal/streams/readable:1408:12)

at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
I'm using node js. I've added the following to the nixpacks.toml from the puppeteer troubleshooting doc but keep running into the same https://pptr.dev/troubleshooting#chrome-doesnt-launch-on-linux project id: a8a105b0-b1ab-4a67-9304-89816de88393
17 replies