await client.sendStickerfromUrl() returns error: TypeError: ((intermediate value)(intermediate value)(intermediate value) || (intermediate value)(intermediate value)(intermediate value)).replace is not a function
TVARecordings opened this issue Β· comments
Are you using the latest version of the library?
- 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
EASY API/CLI
Current Behavior
Code
const currentDate = new Date();
const day = currentDate.getDate().toString().padStart(2, '0'); // Get the day and pad with leading zero if needed
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // Get the month (months are zero-based) and pad with leading zero if needed
const year = currentDate.getFullYear().toString().slice(-2); //
console.log(`${message.body.split(' ')[0]} Step 11`)
await client.sendStickerfromUrl(from, 'https://c.tenor.com/c07YTR6SIE8AAAAC/tenor.gif', { author: `π€ Ameca ${day}/${month}/${year}`, pack: `π± www.tva-community.chat`, keepScale: true, crop: false })
returns error:
[messageHandler.js] TypeError: ((intermediate value)(intermediate value)(intermediate value) || (intermediate value)(intermediate value)(intermediate value)).replace is not a function
Error [TypeError]: _0x23febf(_0x281f83(...) + "QU") is not a function
at window.. (evaluate at E:\AmecaCore\node_modules@open-wa\wa-automate\dist\controllers\patch_manager.js:127:50, :0:511775)
at #evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\ExecutionContext.js:222:56)
at async ExecutionContext.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\ExecutionContext.js:117:16)
at async IsolatedWorld.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\IsolatedWorld.js:124:16)
at async CdpFrame.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Frame.js:342:20)
at async CdpPage.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Page.js:828:20)
Expected Behavior
To just send the sticker like it did in the past.
Steps To Reproduce
[messageHandler.js] TypeError: ((intermediate value)(intermediate value)(intermediate value) || (intermediate value)(intermediate value)(intermediate value)).replace is not a function
Error [TypeError]: _0x23febf(_0x281f83(...) + "QU") is not a function
at window.. (evaluate at E:\AmecaCore\node_modules@open-wa\wa-automate\dist\controllers\patch_manager.js:127:50, :0:511775)
at #evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\ExecutionContext.js:222:56)
at async ExecutionContext.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\ExecutionContext.js:117:16)
at async IsolatedWorld.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\IsolatedWorld.js:124:16)
at async CdpFrame.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Frame.js:342:20)
at async CdpPage.evaluate (E:\AmecaCore\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Page.js:828:20)
create() code OR full CLI command + CONFIG
const configObject = {
sessionId: '',
authTimeout: 0,
blockCrashLogs: true, // Setting this to true will block any network calls to crash log servers. This should keep anything you do under the radar. Def: true
cacheEnabled: true, // Setting this to false turn off the cache. This may improve memory usage.
cachedPatch: true, // Setting this to true will save a local copy of the patches.json file (as patches.ignore.data.json) which will be used in subsequent instantiations of the session.
callTimeout: 600000, // Amount of time (in ms) to wait for a client method (specifically methods that interact with the WA web session) to resolve.
disableSpins: true, // Setting this to true will simplify logs for use within docker containers by disabling spins (will still print raw messages).
discord: '',
ezqr: true,
headless: true,
linkParser: "https://link.openwa.cloud/api",
logFile: true,
messagePreprocessor: "AUTO_DECRYPT", //"AUTO_DECRYPT","SCRUB"
onError: "LOG_AND_FALSE",
popup: false,
qrTimeout: 0,
useChrome: true,
debug: true,
logging: [{
type: console
}],
logInternalEvents: true, //ONLY TURN THIS ON IF ASKED TO!
logConsoleErrors: true,
};
DEBUG INFO
{
"WA_VERSION": "2.3000.1013569446",
"WA_AUTOMATE_VERSION": "4.71.11",
"BROWSER_VERSION": "Chrome/124.0.6367.208",
"START_TS": 1715900267082,
"RAM_INFO": "Total: 68.62 GB | Free: 52.17 GB",
"PPTR_VERSION": "19.11.1",
"LATEST_VERSION": true,
"CLI": false,
"PATCH_HASH": "CACHED-e6695",
"LAUNCH_TIME_MS": 6951,
"ACC_TYPE": "BUSINESS",
"chats": 9,
"messages": 76,
"contacts": 1527,
"isBiz": true,
"isMd": true,
"INSTANCE_ID": "71ebd4a3-f90d-4411-86be-447474a6b993"
}
Environment
- OS: Windows 10
- Node: 20.11.1
- npm: 10.2.4
Screenshots/Logs
No response
Anything else?
No response
sendMp4AsSticker is broken too:
sendMp4AsSticker TypeError: ((intermediate value)(intermediate value)(intermediate value) || (intermediate value)(intermediate value)(intermediate value)).replace is not a function
were you able to fix it ?
should be fixed with latest version