sogebot / sogeBot

sogeBot - Free Twitch Bot built on Node.js
https://sogebot.xyz/
GNU General Public License v3.0
289 stars 65 forks source link

Custom Variable doesn't update with POST #3597

Closed SCVODArchives closed 4 years ago

SCVODArchives commented 4 years ago

2020-04-27T12:56:30.765 DEBUG: * ======= COPY DEBUG MESSAGE FROM HERE ======= 2020-04-27T12:56:30.766 DEBUG: * GENERAL | OS: npm/6.14.4 node/v12.16.2 win32 x64 2020-04-27T12:56:30.851 DEBUG: * | Bot version: 10.15.0 2020-04-27T12:56:30.851 DEBUG: * | DB: sqlite 2020-04-27T12:56:30.881 DEBUG: * | HEAP: 82.48 MB 2020-04-27T12:56:30.882 DEBUG: * | Uptime: 01:05:34 2020-04-27T12:56:30.882 DEBUG: * | Language: en 2020-04-27T12:56:30.882 DEBUG: * | Mute: false 2020-04-27T12:56:30.883 DEBUG: * SYSTEMS | -Songs, -Highlights, -Points, Alias, -Bets, -Checklist, -Commercial, -Ranks, CustomCommands, -Cooldown, HowLongToBeat, -Keywords, Moderation, -Polls, -Price, -Queue, -Quotes, Raffles, -Scrim, Timers, Top, UserInfo 2020-04-27T12:56:30.884 DEBUG: * GAMES | -Duel, -FightMe, -Gamble, -Heist, -Roulette, -Seppuku 2020-04-27T12:56:30.884 DEBUG: * INTEGRATIONS | -Spotify, -Donationalerts, -PhillipsHue, -Qiwi, -ResponsiveVoice, -StreamElements, -Streamlabs, -TipeeeStream, -Twitter 2020-04-27T12:56:30.884 DEBUG: * WIDGETS | chat, eventlist 2020-04-27T12:56:30.885 DEBUG: * OAUTH | BOT true | BROADCASTER true 2020-04-27T12:56:30.885 DEBUG: * ======= END OF DEBUG MESSAGE =======

Have custom text variable that can be updated with POST that doesn't get updated. Using the example on the custom variable page:

curl -X POST http://[IP]:20000/customvariables/e467b0fa-8d90-4fb8-8f00-10a719b901c7 -H "Content-Type: application/json" -d '{ "value": "yourNewValue" }'

returns

{"oldValue":"old","value":""}

i'm using that exact command with "yourNewValue" and also "test". no errors in sogebot console or chrome.

possibly related, after POST'ing data the bot can become unresponsive. chrome sockets attempt to reconnect, sometimes it fails with 400 error, sometimes it reconnects. when unresponsive sogebot console shows streamlabs disconnected/reconnected. haven't encountered this unresponsiveness since upgrading to 10.15.0 except with POST'ing to custom variable URL.

2020-04-27T11:58:30.050 | STREAMLABS: Socket disconnected from service 2020-04-27T11:58:31.284 | STREAMLABS: Successfully connected socket to service

SCVODArchives commented 4 years ago

2020-04-27 12_57_55- 10 15 0

SCVODArchives commented 4 years ago

had time to sit and test more. after that initial test while you were online and it POST'ed correctly i left. when i came back i noticed that my node script to update that variable via POST hadn't updated the variable. in the UI i went to the variable page and the URL that was previously generated was gone. i generated a new URL, saved it, and after refreshing the URL is gone. if i generate a new URL, save it, and immediately test it through curl POST:

{"error":"Variable not found","code":404}

I can manually change the variable in the UI, it saves, looks fine.

i've restarted the bot. not sure what happened between when i initially tested it with your new file and now. none of the new or previous generated ids work. all 404. again no errors in sogebot or chrome console.

2020-04-27 17_20_42-SCVODARCHIVESBOT 10 15 0

2020-04-27 17-32-44