crowbartools / Firebot

A powerful all-in-one bot for Twitch streamers
https://firebot.app
GNU General Public License v3.0
355 stars 101 forks source link

[Bug] Disable Commands Effect not working #2787

Open MattyCanny opened 2 months ago

MattyCanny commented 2 months ago

Is there an existing issue for this?

Current Behavior

One of my preset effects list was getting stuck on a "Disable Commands Effect" because the effect was unable to disable the commands with a given tag.

Expected Behavior

The effect should disable the commands with the tag

Steps To Reproduce

I do not know.

Version

5.63.2

What operating system are you using Firebot on?

Windows 11

Relevant log output

[2024-09-07 06:24:44.0631] - info: [v5.63.2] Websocket Overlay Connection from ::1
[2024-09-07 06:25:42.0712] - error: [v5.63.2] Unhandled promise rejection 
{
  message: "Cannot read properties of undefined (reading 'includes')",
  stack: "TypeError: Cannot read properties of undefined (reading 'includes')\n" +
    '    at C:\\Users\\Rando\\AppData\\Local\\firebot\\app-5.63.2\\resources\\app.asar\\build\\backend\\effects\\builtin\\toggle-command.js:111:56\n' +
    '    at Array.filter (<anonymous>)\n' +
    '    at Object.onTriggerEvent (C:\\Users\\Rando\\AppData\\Local\\firebot\\app-5.63.2\\resources\\app.asar\\build\\backend\\effects\\builtin\\toggle-command.js:111:33)\n' +
    '    at C:\\Users\\Rando\\AppData\\Local\\firebot\\app-5.63.2\\resources\\app.asar\\build\\backend\\common\\effect-runner.js:89:40\n' +
    '    at new Promise (<anonymous>)\n' +
    '    at triggerEffect (C:\\Users\\Rando\\AppData\\Local\\firebot\\app-5.63.2\\resources\\app.asar\\build\\backend\\common\\effect-runner.js:68:12)\n' +
    '    at C:\\Users\\Rando\\AppData\\Local\\firebot\\app-5.63.2\\resources\\app.asar\\build\\backend\\common\\effect-runner.js:147:40\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}

Contact Details (Optional)

No response

phroggster commented 2 months ago

We traced this specific instance back to the sortTag. Fixed it by creating a new sortTag, adding all of the specific commands to it, then deleting the old sortTag. No clue how/where the sortTag got corrupted, no visual indication of a missing command guid nor corruption in the tags, but it did clear up after swapping it out for a new tag.

Even weirder, the disable commands by tag effect was in a preset effect list, and running that effect list asynchronously would work fine, while running it synchronously would cause this error.

MattyCanny commented 1 month ago

This issue has occurred again