mlg404 / whatsapp-music-bot

A whatsapp bot to send and search musics to your friends!
MIT License
124 stars 77 forks source link

Cannot read properties of undefined (reading 'features') #37

Closed RE-ProBot closed 2 years ago

RE-ProBot commented 2 years ago

Hello, i have the following error every time i try to download something -

[ '.your_mp3_files_will_be_saved_here' ]
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'features')
    at Object.window.WWebJS.sendMessage (__puppeteer_evaluation_script__:92:39)
    at __puppeteer_evaluation_script__:10:45
    at ExecutionContext._evaluateInternal (C:\Users\u\whatsapp-music-bot\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ExecutionContext.evaluate (C:\Users\u\whatsapp-music-bot\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12)
    at Client.sendMessage (C:\Users\u\whatsapp-music-bot\node_modules\whatsapp-web.js\src\Client.js:594:28)
[ERROR] 14:13:00 Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'features')
    at Object.window.WWebJS.sendMessage (__puppeteer_evaluation_script__:92:39)
    at __puppeteer_evaluation_script__:10:45
DevAmiyo commented 2 years ago

Hello, i have the following error every time i try to download something

@RE-ProBot make the changes in #38 and it should fix your issue.

RE-ProBot commented 2 years ago

Hello, i have the following error every time i try to download something

@RE-ProBot make the changes in #38 and it should fix your issue.

What do you mean with make the changes in #38? Sorry for asking again but I normally don't work with .ts

DevAmiyo commented 2 years ago

What do you mean with make the changes in #38? Sorry for asking again but I normally don't work with .ts

I meant the pull request #38 Click here to view the pull request and make the changes in package.json

{
  "name": "whatsapp_music_bot",
  "description": "Turn your number into a DJ!",
  "version": "3.1.0",
  "main": "main.ts",
  "license": "MIT",
  "author": {
    "email": "eyervictor@gmail.com",
    "name": "Victor Eyer",
    "url": "https://github.com/mlg404"
  },
  "scripts": {
    "start": "ts-node-dev --transpile-only --ignore-watch node_modules src/main.ts"
  },
  "devDependencies": {
    "@types/ffmpeg": "^1.0.4",
    "@types/yt-search": "^2.3.0",
    "@typescript-eslint/eslint-plugin": "^5.28.0",
    "@typescript-eslint/parser": "^5.28.0",
    "eslint": "^8.17.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-prettier": "^4.0.0",
    "prettier": "^2.7.0",
    "ts-node-dev": "^2.0.0",
    "typescript": "^4.7.3"
  },
  "dependencies": {
    "ffmpeg": "^0.0.4",
    "qrcode-terminal": "^0.12.0",
    "whatsapp-web.js": "^1.16.7",
    "yt-search": "^2.10.3",
    "ytdl-core": "^4.11.0"
  }
}

Edit: This is the new file. Just replace it with the contents of your package.json.