Readek / Melee-Stream-Tool

A Melee overlay and control panel for tournament streams
MIT License
81 stars 26 forks source link

Game Scoreboard.html doesn't want to update #5

Closed shrianshChari closed 3 years ago

shrianshChari commented 3 years ago

When I attempt to update the stream, it will only update the VS Screen HTML file, but the Game Scoreboard HTML file will freeze in OBS.

VS Screen

Game Scoreboard

Tested:

- Deleting and re-adding Game Scoreboard.html from OBS Studio
- Quitting Melee Stream Tool and restarting it
- Both deleting Game Scoreboard.html and quitting MST, then adding back GS and opening MST (it works at first, but when I switch to VS Screen and then back, it doesn't work)

I use Pop OS 20.04

Readek commented 3 years ago

Hmm it's pretty weird that it works on once place but doesn't in the other html. Just to be clear, it works on startup but it stops working after switching scenes? Is Refresh browser when scene becomes active switched on in the source's settings?

shrianshChari commented 3 years ago

After doing more testing just now, Game Scoreboard.html doesn't work period, even if I switch on Refresh browser when scene becomes active. The colors don't even show up now!

Edit: the colors stopped working as soon as I booted up OBS, not because I enabled the setting in the source's settings

Screenshot from 2021-04-10 14-33-31

Readek commented 3 years ago

That's what happens when the browser source can't read Resources/Texts/ScoreboardInfo.json. It might be a permissions issue, but then again, you said the VS one worked.

It could also be the browser plugin your obs is using. Nowadays most OBS linux builds have official browser support, but not so long ago if you wanted to have a browser source you had to install a plugin. This plugin doesn't work like the official implementation, in this case when working with local files. To see if this is the actual issue, you would need to test it with a live server and use it's url path on the obs source to see if that works well. (you can do this easily, for example, opening the stream tool folder with VSCode and using a live server extension)

shrianshChari commented 3 years ago

I don't think I'm using a browser plugin, since I've recently installed Pop OS on my computer, and consequently OBS Studio should be new enough to have had browser support baked in.

But I went ahead and tried using a live server extension and the Game Scoreboard works just fine.

Screenshot from 2021-04-10 23-00-59

So I think the issue does lie within OBS Studio, somewhere in there.

Edit: After more testing (me realizing that I should try using the live server as the browser source), it produced the same result as above (no colors, characters, text, etc.). For some reason, OBS Studio just doesn't like Game Scoreboard.html, and doesn't appear to be an issue with the HTML file itself.

Readek commented 3 years ago

You can try opening obs with the parameter --remote-debugging-port=9222, then open localhost:9222 in your browser (info from here) and see what error is the scoreboard giving. It's really weird that it doesn't work on obs even with a live server.

shrianshChari commented 3 years ago

I dunno what I'm supposed to be looking for, but the file doesn't appear to be giving any sort of error or output. For contrast, the VS Screen gave out 4 errors, and worked just fine.

Screenshot from 2021-04-11 11-09-26

On top of that, when trying to look at the HTML code through localhost:9222, it doesn't display any HTML whatsoever. On top of THAT, attempting to use the console when viewing Game Scoreboard.html gives nothing (I attempted to run console.log('test'); but my command disappeared without appearing on the console) while doing the same on VS Screen.html yielded "test".

Readek commented 3 years ago

Then I'm out of ideas. They don't give any problems to me on either Windows or Arch, I don't know where the problem is coming from.

Btw, could you test if the RoA Stream Tool version also has this problem? I plan to give the Melee one an update some day, it may be that this problem is fixed already with newer versions like the RoA one.

shrianshChari commented 3 years ago

Umm, testing the RoA Stream Tool, its scoreboard seems to exhibit the same behavior as the Melee version (no characters/text in OBS, but works just fine in a live server), and the VS Screen updates just fine.

Screenshot from 2021-04-12 10-12-11 Screenshot from 2021-04-12 10-11-54

Looking when I use the remote debugging port, the Game Scoreboard for RoA exhibits the same behavior as that for Melee (no HTML, no response in the console). If you're saying that it works fine in Arch and Windows, then maybe it's an Ubuntu/Pop OS thing?

Readek commented 3 years ago

Yeah, I have no idea. The only thing I know its happening here is, the OBS browser cant for some reason read the ScoreboardInfo.json file. Why this is happening on just 1 of the 2, I don't know. Both use the same function to access files.

shrianshChari commented 3 years ago

Ok, so after reinstalling Pop OS (don't ask, it's not important why), I tested using the Stream Tool and this time Game Scoreboard.html actually worked. I don't know what happened with my previous installation of Pop OS that disallowed it from reading ScoreboardInfo.json but whatever it is, it's fixed (even if reinstalling your operating system isn't exactly the most helpful solution to everyone). The only difference in between the two setups is that on this one, I installed the packages necessary for virtual camera output (which shouldn't affect how it reads data from a JSON file). The jury is out on what actually was the reason why it couldn't read ScoreboardInfo.json, though my only suspicion is that I did something that I shouldn't have and accidentally saved over an edit that made reading from that JSON file not work.