fb-messenger-cli
fb-messenger-cli copied to clipboard
Cannot read property 'toLowerCase' of undefined while searching
As I used search function this error occurred:
> /search PRDev
/usr/local/lib/node_modules/fb-messenger-cli/lib/search.js:49
return friend.name.toLowerCase().indexOf(searchString.toLowerCase()) !== -1;
^
TypeError: Cannot read property 'toLowerCase' of undefined
at filtered.friends.filter (/usr/local/lib/node_modules/fb-messenger-cli/lib/search.js:49:32)
at Array.filter (<anonymous>)
at Search.filterFriends (/usr/local/lib/node_modules/fb-messenger-cli/lib/search.js:48:38)
at messenger.getFriends (/usr/local/lib/node_modules/fb-messenger-cli/lib/search.js:42:18)
at Request.request.post [as _callback] (/usr/local/lib/node_modules/fb-messenger-cli/lib/messenger.js:528:24)
at Request.self.callback (/usr/local/lib/node_modules/fb-messenger-cli/node_modules/request/request.js:185:22)
at Request.emit (events.js:188:13)
at Request.<anonymous> (/usr/local/lib/node_modules/fb-messenger-cli/node_modules/request/request.js:1161:10)
at Request.emit (events.js:188:13)
at Gunzip.<anonymous> (/usr/local/lib/node_modules/fb-messenger-cli/node_modules/request/request.js:1083:12)
I have the same issue.
No conversations appear on the first screen, selecting any number gives the error;
Warning: Input is out of bounds
Same here. Using Arch Linux.
Same. Using OS X
Same. Ubuntu 16.04
Same. MacOS 10.14.1
this solution fixed for me.
Same issue for me. Ubuntu 19.04.
Actually I solved this issue for me(Arch Linux). You need correct version of node.js. Error occured when I used 10 but when I downgraded to 7 it worked.
Same on Windows 10 with Powershell, downgrading npm to 7 change nothing for me. Does it even work on Windows 10 ?
It should work we developed on Win10, perhaps you would have better luck with cmd
. At some point I should have some free time to address the root cause.
The same problem with windows 10 and cmd
Okay I removed .kryptonite in AppData\Roaming\npm\node_modules\fb-messenger-cli and now it works.