'Error to processFiles' when sending a caption and an image using 'sendImageFromBase64' function
abhilash-screlinfo opened this issue · 19 comments
Description
i can login normally and it logs in fine.
issue happens when i send an image along with a caption using the built in function of venom-bot 'sendImageFromBase64'.
sending fails with error message 'Error to processFiles'.
Environment
- **Venom version(s): v5.0.21
- **Browser: chrome v116.0.5845.96
- **OS: ubuntu server v22.04
- **Node version: v18.17.0
Steps to Reproduce
- login your whatsapp to venom-bot
- send an image and a caption using the function 'sendImageFromBase64'
- get the error
{
erro: true,
text: 'Error to processFiles',
status: 404
}
- that's it
Log Output
Error when sending: {
me: {
id: {
server: 'c.us',
user: 'xxxxxxxxxxxx',
_serialized: 'xxxxxxxxxxxx@c.us'
},
displayName: null,
verifiedName: null,
searchName: null,
pushname: '',
notifyName: null,
isBusiness: null,
formattedUser: null,
tag: '2486081473',
eurl: '',
previewEurl: '',
fullDirectPath: '',
previewDirectPath: '',
filehash: 'MPKobT7nW3zvIyZhd1UsoepPjDh2dOIycK4RYIUSJtw=',
stale: false,
eurlStale: false,
timestamp: 1695472629462,
hostRetryCount: 0,
isPlaceholder: false,
description: '',
categories: [ [Object] ],
profileOptions: {
commerceExperience: 'none',
cartEnabled: true,
directConnection: false
},
email: null,
website: [],
latitude: ,
longitude: ,
businessHours: { config: [Object], timezone: 'Asia/Kolkata' },
address: ', , ',
fbPage: {},
igProfessional: {},
isProfileLinked: false,
directConnection: { enabled: false },
coverPhoto: null,
automatedType: 'unknown'
},
to: {
server: 'c.us',
user: 'xxxxxxxxxxxx',
_serialized: 'xxxxxxxxxxxx@c.us'
},
erro: true,
text: 'Error to processFiles',
status: 404
}
Your Code
If relevant, paste all of your challenge code in here
Additional context / Screenshot
Add any other context about the problem here. If applicable, add screenshots to help explain.
someone?
pls?
Description
i can login normally and it logs in fine. issue happens when i send an image along with a caption using the built in function of venom-bot 'sendImageFromBase64'. sending fails with error message 'Error to processFiles'.
Environment
- **Venom version(s): v5.0.21
- **Browser: chrome v116.0.5845.96
- **OS: ubuntu server v22.04
- **Node version: v18.17.0
Steps to Reproduce
- login your whatsapp to venom-bot
- send an image and a caption using the function 'sendImageFromBase64'
- get the error
{ erro: true, text: 'Error to processFiles', status: 404 }
- that's it
Log Output
Error when sending: { me: { id: { server: 'c.us', user: 'xxxxxxxxxxxx', _serialized: 'xxxxxxxxxxxx@c.us' }, displayName: null, verifiedName: null, searchName: null, pushname: '', notifyName: null, isBusiness: null, formattedUser: null, tag: '2486081473', eurl: '', previewEurl: '', fullDirectPath: '', previewDirectPath: '', filehash: 'MPKobT7nW3zvIyZhd1UsoepPjDh2dOIycK4RYIUSJtw=', stale: false, eurlStale: false, timestamp: 1695472629462, hostRetryCount: 0, isPlaceholder: false, description: '', categories: [ [Object] ], profileOptions: { commerceExperience: 'none', cartEnabled: true, directConnection: false }, email: null, website: [], latitude: , longitude: , businessHours: { config: [Object], timezone: 'Asia/Kolkata' }, address: ', , ', fbPage: {}, igProfessional: {}, isProfileLinked: false, directConnection: { enabled: false }, coverPhoto: null, automatedType: 'unknown' }, to: { server: 'c.us', user: 'xxxxxxxxxxxx', _serialized: 'xxxxxxxxxxxx@c.us' }, erro: true, text: 'Error to processFiles', status: 404 }
Your Code
If relevant, paste all of your challenge code in here
Additional context / Screenshot
Add any other context about the problem here. If applicable, add screenshots to help explain.
Same problem. Anyone?
same problem, please help
same problem, please help
The important part is that this has been working for the past 1 year no problems. Issue happened just now.
same, did anyone find any solution?
tbem estou com erro, para enviar.
},
to: {
server: 'g.us',
user: '551xxxxxxxxxxxxxxxxxx',
_serialized: 'xxxxxxxxxxxxxxxxx@g.us'
},
erro: true,
text: 'Error to processFiles',
status: 404
}
Thank you for making me realize I am not going mad. After a full day of debugging, I see I'm not alone. Please help. Same issue. Seems Caption isn't optional anymore either.
Same problem here, with sendImage
and sendImageFromBase64
"erro": true,
"text": "Error to processFiles",
"status": 404
Change your node_modules/venom-bot/dist/lib/wapi/wapi.js like this comment:
#2482 (comment)
search in file by 0.4.613
and change:
return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,1),n}
to:
return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}
This solution running in venon-bot 5.0.21
Thank you @riberman for helping out, much appreciated.
Change your node_modules/venom-bot/dist/lib/wapi/wapi.js like this comment: #2482 (comment) search in file by
0.4.613
and change:return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,1),n}
to:return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}
This solution running in venon-bot 5.0.21
Thank you @riberman , this worked for me venom-bot in version 5.0.20
Change your node_modules/venom-bot/dist/lib/wapi/wapi.js like this comment: #2482 (comment) search in file by
0.4.613
and change:return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,1),n}
to:return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}
This solution running in venon-bot 5.0.21Thank you, this worked for me.
solution is not work for venom 5.0.21
this solution works in development environment, i cant push node_modules to production, so which version has this solution integrated?
@Oladapodaniel It's not the best way, but I do it to fix it
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { readFileSync, writeFileSync } = require('fs');
const path = './node_modules/venom-bot/dist/lib/wapi/wapi.js'
let toFix = readFileSync(path);
toFix = toFix.toString().replace(
`return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,1),n}`,
`return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}`
)
writeFileSync(path, toFix)
and before start project, I run that script.
like
{
......
"prestart": "node fix-venom.js"
}
Change your node_modules/venom-bot/dist/lib/wapi/wapi.js like this comment: #2482 (comment) search in file by
0.4.613
and change:return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,1),n}
to:return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}
This solution running in venon-bot 5.0.21
Depois de perder um dia inteiro pra solucionar isso, eis que você salvou minha noite, obrigaaaaaaaaaaaado meu querido, de coração .... I LOVE YOU