P
Postiz2mo ago
Support

Ticket: Media Attachment Causes Post Failure - TypeError: fetch failed

@Dalek ☕🫰 Just created a ticket
Question: Posts fail when media is attached but no problems when it is text only TypeError: fetch failed Tested via twitter and discord integrations.
Attempted: Re-deploy of Postiz
Working On: Deployment and testing
Using Postiz On: Docker compose
Take it from here @Postiz
17 Replies
Dalek ☕🫰
Dalek ☕🫰2mo ago
{ data: { id: 'b8291bde-2235-4999-8256-51ab0db5dae2' }, error: null }
[Error] posting on discord TypeError: fetch failed
at node:internal/deps/undici/undici:13178:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DiscordProvider.post (/app/dist/apps/workers/main.js:11512:35)
at async PostsService.postSocial (/app/dist/apps/workers/main.js:12139:36)
at async PostsService.post (/app/dist/apps/workers/main.js:12075:19)
at async /app/node_modules/@nestjs/microservices/context/rpc-proxy.js:11:32
at async bullmq_1.Worker.connection [as processFn] (/app/dist/apps/workers/main.js:15111:60)
at async /app/node_modules/bullmq/dist/cjs/classes/worker.js:512:32
at async Worker.retryIfFailed (/app/node_modules/bullmq/dist/cjs/classes/worker.js:741:24) {
[cause]: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:2331:28)
at node:internal/deps/undici/undici:2283:50
at Immediate._onImmediate (node:internal/deps/undici/undici:2315:13)
at process.processImmediate (node:internal/timers:483:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
{ data: { id: 'b8291bde-2235-4999-8256-51ab0db5dae2' }, error: null }
[Error] posting on discord TypeError: fetch failed
at node:internal/deps/undici/undici:13178:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DiscordProvider.post (/app/dist/apps/workers/main.js:11512:35)
at async PostsService.postSocial (/app/dist/apps/workers/main.js:12139:36)
at async PostsService.post (/app/dist/apps/workers/main.js:12075:19)
at async /app/node_modules/@nestjs/microservices/context/rpc-proxy.js:11:32
at async bullmq_1.Worker.connection [as processFn] (/app/dist/apps/workers/main.js:15111:60)
at async /app/node_modules/bullmq/dist/cjs/classes/worker.js:512:32
at async Worker.retryIfFailed (/app/node_modules/bullmq/dist/cjs/classes/worker.js:741:24) {
[cause]: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:2331:28)
at node:internal/deps/undici/undici:2283:50
at Immediate._onImmediate (node:internal/deps/undici/undici:2315:13)
at process.processImmediate (node:internal/timers:483:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
Posts fail when media is attached but no problems when it is text only, last discord log^
cao
cao4w ago
Can u send payload?
Nevo David
Nevo David4w ago
Which channel
cao
cao4w ago
discord
Dalek ☕🫰
Dalek ☕🫰4w ago
Sure!, Just re-attempted using the following jpeg test image It worked on instagram, but failed on twitter, bluesky, and discord
No description
Dalek ☕🫰
Dalek ☕🫰4w ago
I just also re-attempted sending a text only test to bluesky, discord, and twitter, and those were succesful I feel it may be a mis config somewhere, but I just dont know what to look for
cao
cao4w ago
Can u send payload? What are u sending to their servers?
Dalek ☕🫰
Dalek ☕🫰4w ago
sorry by payload I thought you wanted the file being sent, uh, let me check these logs Here's the event when I click to post now
{
"type": "now",
"date": "2024-12-17T07:00:00",
"posts": [
{
"integration": {
"name": "DalekCoffee",
"id": "cm4k78y7b0001h2y78tpmsqxz",
"internalId": "1830691706217373700",
"disabled": false,
"picture": "https://post.oshi.social/uploads/2024/12/17/810fd810b8bcb7b6fffc7d2ef72dea97d3.jpeg",
"identifier": "x",
"inBetweenSteps": false,
"refreshNeeded": false,
"display": "DalekCoffee",
"type": "social",
"time": [
{
"time": 920
},
{
"time": 1210
},
{
"time": 1500
}
],
"changeProfilePicture": false,
"changeNickName": false
},
"value": [
{
"content": "Test image with penguin",
"image": [
{
"id": "219ba596-42af-48bb-a9de-6a9c4ebe3123",
"name": "PenguinTestImage.jpg",
"path": "https://post.oshi.social/uploads/2024/12/17/101610622a589b592fcdba1d342f27b54.jpg",
"organizationId": "0b44bb6a-f1da-4738-a8f0-2e9ab5deec8b",
"createdAt": "2024-12-17T07:06:38.608Z",
"updatedAt": "2024-12-17T07:06:38.608Z"
}
]
}
],
"valid": true,
"settings": {},
"maximumCharacters": 280
}
]
}
event to dispatch: {
pattern: 'post',
data: {
id: 'cm4s4t5lv000cwyedhx64vvqu',
options: { delay: 0 },
payload: { id: 'cm4s4t5lv000cwyedhx64vvqu' }
}
}
proceccsing { id: 'cm4s4t5lv000cwyedhx64vvqu' }
{
"type": "now",
"date": "2024-12-17T07:00:00",
"posts": [
{
"integration": {
"name": "DalekCoffee",
"id": "cm4k78y7b0001h2y78tpmsqxz",
"internalId": "1830691706217373700",
"disabled": false,
"picture": "https://post.oshi.social/uploads/2024/12/17/810fd810b8bcb7b6fffc7d2ef72dea97d3.jpeg",
"identifier": "x",
"inBetweenSteps": false,
"refreshNeeded": false,
"display": "DalekCoffee",
"type": "social",
"time": [
{
"time": 920
},
{
"time": 1210
},
{
"time": 1500
}
],
"changeProfilePicture": false,
"changeNickName": false
},
"value": [
{
"content": "Test image with penguin",
"image": [
{
"id": "219ba596-42af-48bb-a9de-6a9c4ebe3123",
"name": "PenguinTestImage.jpg",
"path": "https://post.oshi.social/uploads/2024/12/17/101610622a589b592fcdba1d342f27b54.jpg",
"organizationId": "0b44bb6a-f1da-4738-a8f0-2e9ab5deec8b",
"createdAt": "2024-12-17T07:06:38.608Z",
"updatedAt": "2024-12-17T07:06:38.608Z"
}
]
}
],
"valid": true,
"settings": {},
"maximumCharacters": 280
}
]
}
event to dispatch: {
pattern: 'post',
data: {
id: 'cm4s4t5lv000cwyedhx64vvqu',
options: { delay: 0 },
payload: { id: 'cm4s4t5lv000cwyedhx64vvqu' }
}
}
proceccsing { id: 'cm4s4t5lv000cwyedhx64vvqu' }
Dalek ☕🫰
Dalek ☕🫰4w ago
And here is my output error after it finished processing:
Dalek ☕🫰
Dalek ☕🫰4w ago
is this the info that is needed?
cao
cao4w ago
Can u access image path?
Dalek ☕🫰
Dalek ☕🫰4w ago
Yes, container was paused just now so you may not have been able to, but should be able to now
No description
Dalek ☕🫰
Dalek ☕🫰4w ago
also confirmed on a secondary incognito browser
No description
Dalek ☕🫰
Dalek ☕🫰4w ago
I just keep pausing the container because I dont want to leave it exposed for public sign ups at the moment I do that way after the errors of course, not during the scheduled posting time
m4rk
m4rk2w ago
This seems to be same issue as mine , I am able to post text , but unable to post images to : facebook discord instagram X Have you tried using R2 ?
Matt
Matt2w ago
@m4rk I tried using R2 and the images don't even get uploaded to the bucket. There seems to be some issues on the code end tbh
m4rk
m4rk2w ago
seems like something is wrong ... hope support can help us and reproduce as well This is Solved using the cloudflare R2 @Support please close ticket

Did you find this page helpful?