muse: 🚫 ope: filterWrapper is not iterable

What’s happening? Concisely describe what’s going wrong.

Logs

logs seems to be not found on console

Additional context This error occurs randomly while using /play Confirmed that this is not a user error seems to be the server side.

Runtime I’m running Muse:

  • Directly from the cloned repository
  • Inside a Docker container
  • Something else (please elaborate)

Versions

  • Muse: 2.3.0
  • Docker (if applicable):
  • OS: Ubuntu v20.04
  • Node.js: v16.20.0
  • ffmpeg: 4.2.7-0ubuntu0.1

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 25 (5 by maintainers)

Most upvoted comments

this issue used to be sporadic, but after a while of running the bot, it occurs on literally every play command (no matter if the input is a search query, spotify or youtube url), rendering the bot entirely unusuable. I would suggest that node-ytsr is forked. in the meantime, I applied the ytsr fix in my docker-compose setup like so in order to avoid building my own image:


  muse:
    image: codetheweb/muse:2.4.1
    restart: always
    volumes:
      - ./muse:/data
    entrypoint: bash
    # hotfix for https://github.com/codetheweb/muse/issues/948
    command: -c "sed -i 's/of filterWrapper[)]/of filterWrapper|| [])/g' /usr/app/node_modules/ytsr/lib/utils.js && tini -- yarn start"

As per this this github issue, to fix all you have to do is edit node_modules\ytsr\lib\utils.js. Change line 21 as follows

before const filterWrapper = (wrapper.subMenu || wrapper.submenu).searchSubMenuRenderer.groups;

after const filterWrapper = (wrapper.subMenu || wrapper.submenu).searchSubMenuRenderer.groups || [];

how do you do that but with node?

  1. Stop the bot
  2. Go into your bot’s folder and then run that command:

sed -i ‘s/of filterWrapper[)]/of filterWrapper|| [])/g’ /node_modules/ytsr/lib/utils.js

  1. Restart the bot, npm run start.