You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked and am using the latest version of the library.
What type of session are you experiencing this issue on?
Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag
What type of host account are you experiencing this issue on?
Business account
Mode
My own code
Current Behavior
I'm receiving this error:
[messageHandler.js] > sendMp4AsSticker Axios: {
"message": "Unsupported protocol e:",
name": "AxiosError",
"stack": "AxiosError: Unsupported protocol e:\n at dispatchHttpRequest (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2813:21)\n at E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2690:5\n at new Promise ()\n at wrapAsync (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2670:10)\n at http (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2708:10)\n at Axios.dispatchRequest (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4135:10)\n at Axios._request (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4415:33)\n at Axios.request (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4282:25)\n at wrap (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:28:15)\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:173:47\n at Generator.next ()\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:31:71\n at new Promise ()\n at __awaiter (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:27:12)\n at getBufferFromUrl (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:170:57)\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:193:68\n at Generator.next ()\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:31:71\n at new Promise ()\n at __awaiter (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:27:12)\n at getDUrl (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:190:48)\n at Client. (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\api\Client.js:3719:58)\n at Axios.request (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4287:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
"config": {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
},
"adapter": [
"xhr",
"http",
"fetch"
],
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
"headers": {
"Accept": "application/json, text/plain, /",
"DNT": "1",
"Upgrade-Insecure-Requests": "1"
},
"method": "get",
"url": "E:/AmecaCore/media/3A298A972CCFAF62A79A_undefined_1732018804_compressed.mp4",
"responseType": "arraybuffer"
},
"code": "ERR_BAD_REQUEST"
}
Expected Behavior
Expected it to send the mp4 from the filepath as a sticker. The file meets the criterea for stickers.
No matter what file i try as mp4, it errors.
Steps To Reproduce
Code:
case 'save':
if (isAdmin) {
const { processMedia } = require('E:/AmecaCore/lib/webpToMP4.js');
const fs = require('fs-extra'); // Zorg ervoor dat fs-extra is geïmporteerd
(async () => {
try {
const filePath = await processMedia(client, message);
if (filePath) {
console.log(`De video is succesvol verwerkt en het bestandspad is: ${filePath}`);
let result;
try {
const currentDate = new Date();
const day = currentDate.getDate().toString().padStart(2, '0');
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0');
const year = currentDate.getFullYear().toString().slice(-2);
console.log(`Case 'sticker' > sendMp4AsSticker(): Attempting to send sticker.`);
await client.sendMp4AsSticker(from, filePath, null, null);
console.log(colors.greenBright.bold(`S\nU\nC\nC\nC\nE\nS\n!`));
} catch (error) {
console.log(colors.redBright.bold(`E\nR\nR\nO\nR\n!`));
console.error(`[messageHandler.js] > sendMp4AsSticker Axios: ${JSON.stringify(error, null, 2)}`);
client.sendText(message.from, 'Er is een fout opgetreden bij het verzenden van de sticker.');
}
} else {
console.log('Er is iets misgegaan bij het verwerken van de media.');
client.sendText(message.from, 'Er is iets misgegaan bij het verwerken van de media.');
}
} catch (error) {
console.error('Fout tijdens het verwerken van de media:', error);
client.sendText(message.from, 'Er is een fout opgetreden bij het verwerken van de media.');
}
})(); // Direct aanroepen van de async functie
}
break;
Yes, i'm 100% sure processMedia returns a valid filepath. I've checked the file by checking the DataURL and Base64 string, and both are ok.
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag
What type of host account are you experiencing this issue on?
Business account
Mode
My own code
Current Behavior
I'm receiving this error:
[messageHandler.js] > sendMp4AsSticker Axios: {
"message": "Unsupported protocol e:",
name": "AxiosError",
"stack": "AxiosError: Unsupported protocol e:\n at dispatchHttpRequest (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2813:21)\n at E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2690:5\n at new Promise ()\n at wrapAsync (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2670:10)\n at http (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:2708:10)\n at Axios.dispatchRequest (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4135:10)\n at Axios._request (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4415:33)\n at Axios.request (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4282:25)\n at wrap (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:28:15)\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:173:47\n at Generator.next ()\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:31:71\n at new Promise ()\n at __awaiter (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:27:12)\n at getBufferFromUrl (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:170:57)\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:193:68\n at Generator.next ()\n at E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:31:71\n at new Promise ()\n at __awaiter (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:27:12)\n at getDUrl (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\utils\tools.js:190:48)\n at Client. (E:\AmecaCore\node_modules\@open-wa\wa-automate\dist\api\Client.js:3719:58)\n at Axios.request (E:\AmecaCore\node_modules\axios\dist\node\axios.cjs:4287:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
"config": {
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
},
"adapter": [
"xhr",
"http",
"fetch"
],
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"env": {},
"headers": {
"Accept": "application/json, text/plain, /",
"DNT": "1",
"Upgrade-Insecure-Requests": "1"
},
"method": "get",
"url": "E:/AmecaCore/media/3A298A972CCFAF62A79A_undefined_1732018804_compressed.mp4",
"responseType": "arraybuffer"
},
"code": "ERR_BAD_REQUEST"
}
Expected Behavior
Expected it to send the mp4 from the filepath as a sticker. The file meets the criterea for stickers.
No matter what file i try as mp4, it errors.
Steps To Reproduce
Code:
Yes, i'm 100% sure processMedia returns a valid filepath. I've checked the file by checking the DataURL and Base64 string, and both are ok.
Input file (as a example) below.
3A298A972CCFAF62A79A_undefined_1732018804_compressed.mp4
create() code OR full CLI command + CONFIG
No response
DEBUG INFO
Environment
Screenshots/Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: