Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Error to processFiles' when sending a caption and an image using 'sendImageFromBase64' function #2485

Closed
abhilash-screlinfo opened this issue Sep 23, 2023 · 19 comments
Labels
bug Something isn't working needs triage Needs avaliation

Comments

@abhilash-screlinfo
Copy link

abhilash-screlinfo commented Sep 23, 2023

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

  1. login your whatsapp to venom-bot
  2. send an image and a caption using the function 'sendImageFromBase64'
  3. get the error

{
erro: true,
text: 'Error to processFiles',
status: 404
}

  1. 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.

@abhilash-screlinfo abhilash-screlinfo added bug Something isn't working needs triage Needs avaliation labels Sep 23, 2023
@abhilash-screlinfo
Copy link
Author

someone?
pls?

@cesarhcq
Copy link

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

  1. login your whatsapp to venom-bot
  2. send an image and a caption using the function 'sendImageFromBase64'
  3. get the error

{ erro: true, text: 'Error to processFiles', status: 404 }

  1. 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?

@Oladapodaniel
Copy link

same problem, please help

1 similar comment
@AwesomeAbhaySingh
Copy link

same problem, please help

@abhilash-screlinfo
Copy link
Author

The important part is that this has been working for the past 1 year no problems. Issue happened just now.

@k0renn
Copy link

k0renn commented Sep 26, 2023

same, did anyone find any solution?

@onitorrinco
Copy link

onitorrinco commented Sep 26, 2023

tbem estou com erro, para enviar.

},
to: {
server: 'g.us',
user: '551xxxxxxxxxxxxxxxxxx',
_serialized: 'xxxxxxxxxxxxxxxxx@g.us'
},
erro: true,
text: 'Error to processFiles',
status: 404
}

@chris-kck
Copy link

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.

@rafaelsupport
Copy link

Same problem here, with sendImage and sendImageFromBase64

  "erro": true,
  "text": "Error to processFiles",
  "status": 404

@ono77
Copy link

ono77 commented Sep 26, 2023

did you read #2482 ?

@riberman
Copy link

riberman commented Sep 26, 2023

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

@FaelN1 FaelN1 closed this as completed Sep 26, 2023
@abhilash-screlinfo
Copy link
Author

Thank you @riberman for helping out, much appreciated.

@enosgb
Copy link

enosgb commented Sep 27, 2023

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

@AwesomeAbhaySingh
Copy link

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, this worked for me.

solution is not work for venom 5.0.21

@Oladapodaniel
Copy link

this solution works in development environment, i cant push node_modules to production, so which version has this solution integrated?

@kurybr
Copy link

kurybr commented Oct 22, 2023

@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"
}

@w7br
Copy link

w7br commented Dec 13, 2023

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

@w7br
Copy link

w7br commented Jan 14, 2024

Mais uma vez fui salvo pela expertise do Riberman por sollucionar e ao KURYBR pela automação, prática pakas... OBRIGADO!

@w7br
Copy link

w7br commented Jan 14, 2024

praticamente a cada mês eu entro aqui pra agradecer o cara hahahaha

PS: Claro, até achar o comentário do KuryBR hahaha ... agora ficou prático

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Needs avaliation
Projects
None yet
Development

No branches or pull requests