frondeus / fvtt-syrin-control

Syrinscape Online Control plugin for FoundryVTT
MIT License
13 stars 4 forks source link

DM was the only one who could hear music #74

Closed arcanjl closed 1 year ago

arcanjl commented 1 year ago

So last night I hosted my first game with this, and nobody but me could hear the music. Did I have something switched off? Any thoughts?

action-jay commented 1 year ago

I'm troubleshooting this one too. The headless player seems to work well enough if I log in as a player on my local machine, but my group said they couldn't hear anything until they loaded Syrinscape in a separate tab. Will do some digging around but not sure exactly what to look for in the console

arcanjl commented 1 year ago

I never thought of that. Do they have to have an account?

Sent from my iPhone

On Feb 18, 2023, at 8:30 AM, action-jay @.***> wrote:



I'm troubleshooting this one too. The headless player seems to work well enough if I log in as a player on my local machine, but my group said they couldn't hear anything until they loaded Syrinscape in a separate tab. Will do some digging around but not sure exactly what to look for in the console

— Reply to this email directly, view it on GitHubhttps://github.com/frondeus/fvtt-syrin-control/issues/74#issuecomment-1435700568, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHB5T6YB524GZ5GUTXNWFP3WYDTK7ANCNFSM6AAAAAAU6VDLOU. You are receiving this because you authored the thread.Message ID: @.***>

frondeus commented 1 year ago

Ugh, that doesn't sound good. The music should just play. Perhaps there is a bug with session management on my side? (Players do not connect properly to the session created by GM).

Few questions:

frondeus commented 1 year ago

Also, what version of Foundry and what version of my module are you using?

action-jay commented 1 year ago

Hi @frondeus! Love this addon. Thanks for looking at this.

Some more clues:

Hope this helps! 🐾

arcanjl commented 1 year ago

I have used fire fox and chrome

Sent from my iPhone

On Feb 19, 2023, at 7:08 AM, Wojciech Polak @.***> wrote:



Ugh, that doesn't sound good. The music should just play. Perhaps there is a bug with session management on my side? (Players do not connect properly to the session created by GM).

Few questions:

— Reply to this email directly, view it on GitHubhttps://github.com/frondeus/fvtt-syrin-control/issues/74#issuecomment-1435999341, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHB5T666YOJAXDHM2CNJTKTWYISOJANCNFSM6AAAAAAU6VDLOU. You are receiving this because you authored the thread.Message ID: @.***>

Llewinidas commented 1 year ago

Just as an FYI, I was having issues with players not being able to hear audio as well just using the regular syrinscape online player and web app this past week. I needed all of my players to rejoin the syrinscape campaign to get it to work properly again so this may not be an issue directly with your mod.

(also, I haven't followed the updates on this mod closely but do I understand correctly that it should work now without the players needing to have a separate app or tab open to syrinscape's players??)

frondeus commented 1 year ago

@Llewinidas

(yes, the beta version of 0.4.0 has integrated the Syrinscape headless player directly into the foundry. Players do not need separate tab or app anymore)

Ooor they should not need it but then we have this bug :)

I think I have an idea what went wrong but for the next couple of weeks, I'm bit busy. I hope i can find few hours during the weekend to debug it properly.

arcanjl commented 1 year ago

Any updates?

frondeus commented 1 year ago

Sorry, not yet. My personal life was quite demanding in the few past weeks. Everything should go back to normal soon so I can properly debug it :)

arcanjl commented 1 year ago

No rush RL first!

Sent from my iPhone

On Mar 12, 2023, at 12:38 AM, Wojciech Polak @.***> wrote:



Sorry, not yet. My personal life was quite demanding in the few past weeks. Everything should go back to normal soon so I can properly debug it :)

— Reply to this email directly, view it on GitHubhttps://github.com/frondeus/fvtt-syrin-control/issues/74#issuecomment-1465113152, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHB5T64LXYZWP4YFD5Z5RCDW3V4ORANCNFSM6AAAAAAU6VDLOU. You are receiving this because you authored the thread.Message ID: @.***>

Tackian commented 1 year ago

Same problem here. I got sound but my players dont.

LukeAbby commented 1 year ago

I troubleshooted this for a while and it looks like players are sending the wrong auth token for whatever reason, despite having the right auth token available programmatically

The thing that finally worked for me was having everyone who couldn't hear sound follow these steps in a test world:

  1. Login as a gamemaster account.
  2. Set the Syrinscape api key to the correct and current token.
  3. Save changes.
  4. Refresh the page.
  5. Click on something on the page, anything works, and Syrinscape sound should work now. The click is required in general across any webpage, see #76, it's a browser behaviour. It's not strictly related to this issue at all but your players may be confused thinking sound is "lagging" on refresh.

I personally set the auth token to be junk data before these steps for each player but I'm not even sure if that's required. After that sound worked for all of them, even when they switched back to a player and even in another world. My best guess is that #61 or something was attempted to be implemented and the secret api key is only persisted and used correctly as a GM. This is probably hard to debug for the maintainer because, well, they always have logged in as a GM to set the auth token.

Tackian commented 1 year ago

Luke when you say Login as a gamemaster account it means you need to give the the gamemaster permission to the players ?

LukeAbby commented 1 year ago

@Tackian

Luke when you say Login as a gamemaster account it means you need to give the the gamemaster permission to the players ?

You could do it that way, but that's not required, and it's not a permanent thing fortunately. The only reason why your players can't use their regular login privileges is because they need to set the auth token, once, ever and then it should work thereon out even when they switch back to their regular account and priveleges.

The reason why I say it's not required to do it that way is because personally I didn't want to give players gamemaster permission on an important world. For this reason I created a new world and enabled only the fvtt-syrin-control module there. Then I had my players follow these steps, they all could login to the default "Gamemaster" account with no password. These were the steps I was trying to explain.

Maybe you use the Forge where user management is a bit different? I'm not super familiar with the Forge but in that case, yes you might have to give all your players GM permissions temporarily. I'd expect that it can still be on a new test world though.

frondeus commented 1 year ago

@arcanjl , @Tackian , @action-jay are there by any chance logs on GM browser saying:

SyrinControl | SocketLib registered | Player

?

action-jay commented 1 year ago

Morning @frondeus ! I hopped on to check for the SocketLib entry in the console, and looks like you've fixed this with beta 6. Good work! My players are going to be stoked 🐾

karpana commented 1 year ago

@Tackian

Luke when you say Login as a gamemaster account it means you need to give the the gamemaster permission to the players ?

You could do it that way, but that's not required, and it's not a permanent thing fortunately. The only reason why your players can't use their regular login privileges is because they need to set the auth token, once, ever and then it should work thereon out even when they switch back to their regular account and priveleges.

The reason why I say it's not required to do it that way is because personally I didn't want to give players gamemaster permission on an important world. For this reason I created a new world and enabled only the fvtt-syrin-control module there. Then I had my players follow these steps, they all could login to the default "Gamemaster" account with no password. These were the steps I was trying to explain.

Maybe you use the Forge where user management is a bit different? I'm not super familiar with the Forge but in that case, yes you might have to give all your players GM permissions temporarily. I'd expect that it can still be on a new test world though.

Based on the description you've provided this seems to be either a variable scoping problem (variables are either stored in world or in client, with client being stored in cookies).

Or, what is more likely, that something in this module is "expecting" to find a client-scope variable (even if empty or garbage) before being able to use the "correct" auth key, which is likely in the world scope.

I've run into this variable scoping problem with the LockView module, and the Devs for that module opened up this issue with Foundry proper

https://github.com/foundryvtt/foundryvtt/issues/8828

This issue was closed as duplicate, referencing these issues https://github.com/foundryvtt/foundryvtt/issues/8227 https://github.com/foundryvtt/foundryvtt/issues/4804

Not sure if this helpful or not, but the fact that "setting an Auth key" in a garbage/throwaway foundry world got me thinking about this.

Cheers, Karpana

arcanjl commented 1 year ago

Do they put in their own key in or the one who has an account?

Sent from my iPhone

On Apr 3, 2023, at 8:28 AM, karpana @.***> wrote:



@Tackianhttps://github.com/Tackian

Luke when you say Login as a gamemaster account it means you need to give the the gamemaster permission to the players ?

You could do it that way, but that's not required, and it's not a permanent thing fortunately. The only reason why your players can't use their regular login privileges is because they need to set the auth token, once, ever and then it should work thereon out even when they switch back to their regular account and priveleges.

The reason why I say it's not required to do it that way is because personally I didn't want to give players gamemaster permission on an important world. For this reason I created a new world and enabled only the fvtt-syrin-control module there. Then I had my players follow these steps, they all could login to the default "Gamemaster" account with no password. These were the steps I was trying to explain.

Maybe you use the Forge where user management is a bit different? I'm not super familiar with the Forge but in that case, yes you might have to give all your players GM permissions temporarily. I'd expect that it can still be on a new test world though.

Based on the description you've provided this seems to be either a variable scoping problem (variables are either stored in world or in client, with client being stored in cookies).

Or, what is more likely, that something in this module is "expecting" to find a client-scope variable (even if empty or garbage) before being able to use the "correct" auth key, which is likely in the world scope.

I've run into this variable scoping problem with the LockView module, and the Devs for that module opened up this issue with Foundry proper

foundryvtt/foundryvtt#8828https://github.com/foundryvtt/foundryvtt/issues/8828

This issue was closed as duplicate, referencing these issues foundryvtt/foundryvtt#8227https://github.com/foundryvtt/foundryvtt/issues/8227 foundryvtt/foundryvtt#4804https://github.com/foundryvtt/foundryvtt/issues/4804

Not sure if this helpful or not, but the fact that "setting an Auth key" in a garbage/throwaway foundry world got me thinking about this.

Cheers, Karpana

— Reply to this email directly, view it on GitHubhttps://github.com/frondeus/fvtt-syrin-control/issues/74#issuecomment-1494431939, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHB5T66LIB52NL4TCKKU4DLW7LNATANCNFSM6AAAAAAU6VDLOU. You are receiving this because you were mentioned.Message ID: @.***>

karpana commented 1 year ago

To be honest .. not sure...

I see this item was closed last week (just noticed) ... so I'm assuming that @frondeus has this all figured out.

frondeus commented 1 year ago

Yep :) And your investigation is true, the true user scope would prevent this bug from happening (or at least would make it much easier to debug).

To anyone else - please update your module to 0.4.0 stable version which fixes the issue.