TypeError: Cannot read properties of undefined (reading 'normalize')
Optimuspime123 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?
Personal account (normal)
Mode
EASY API/CLI
Current Behavior
I am trying to use client.sendImage(chatId, imageUrl) or sendFileFromUrl and getting this error
F:\whatsbot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:491
.normalize('NFD')
^
TypeError: Cannot read properties of undefined (reading 'normalize')
at sanitizeAccentedChars (F:\whatsbot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:491:10)
at F:\whatsbot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:378:53
at Generator.next (<anonymous>)
at F:\whatsbot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:31:71
at new Promise (<anonymous>)
at __awaiter (F:\whatsbot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:27:12)
at assertFile (F:\whatsbot\node_modules\@open-wa\wa-automate\dist\utils\tools.js:376:77)
at Client.<anonymous> (F:\whatsbot\node_modules\@open-wa\wa-automate\dist\api\Client.js:1819:40)
at Generator.next (<anonymous>)
at F:\whatsbot\node_modules\@open-wa\wa-automate\dist\api\Client.js:31:71
Expected Behavior
The image is sent normally from the URL
Steps To Reproduce
Try to send an image from an url (I am using Prodia)
I get this error
create() code OR full CLI command + CONFIG
No response
DEBUG INFO
{
"WA_VERSION": "2.2412.50",
"WA_AUTOMATE_VERSION": "4.68.0",
"BROWSER_VERSION": "HeadlessChrome/112.0.5614.0",
"START_TS": 1711134319604,
"RAM_INFO": "Total: 8.39 GB | Free: 1.32 GB",
"PPTR_VERSION": "19.11.1",
"LATEST_VERSION": true,
"CLI": false,
"PATCH_HASH": "67662",
"LAUNCH_TIME_MS": 31262,
"ACC_TYPE": "PERSONAL",
"chats": 13,
"messages": 47,
"contacts": 3098,
"isMd": true,
"INSTANCE_ID": "d41e884b-bd2b-4d1b-bea2-90ec7732bf4e"
}
Environment
- OS: Windows 10
- Node: 20.8.0
- npm: 10.1.0
Screenshots/Logs
No response
Anything else?
No response
AH. I was not passing any filename , which seemed to have caused the error.