Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Variable doesn't update with POST #3597

Closed
SCVODArchives opened this issue Apr 27, 2020 · 2 comments · Fixed by #3598
Closed

Custom Variable doesn't update with POST #3597

SCVODArchives opened this issue Apr 27, 2020 · 2 comments · Fixed by #3598

Comments

@SCVODArchives
Copy link

SCVODArchives commented Apr 27, 2020

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
Copy link
Author

2020-04-27 12_57_55- 10 15 0

@SCVODArchives
Copy link
Author

SCVODArchives commented Apr 28, 2020

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

sogehige added a commit that referenced this issue Apr 28, 2020
* fix(customvariable): POST should correctly update variable

Fixes #3597

* fix incorrect entity

* fix incorrect sender

* fix entity
sogehige added a commit that referenced this issue Apr 29, 2020
* fix(customvariable): POST should correctly update variable

Fixes #3597

* fix incorrect entity

* fix incorrect sender

* fix entity
sogehige added a commit that referenced this issue May 3, 2020
* fix(customvariable): POST should correctly update variable

Fixes #3597

* fix incorrect entity

* fix incorrect sender

* fix entity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant