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

[Bug] Uncatched Error in ConnectorPolicyManagement #51

Open
jediefe opened this issue Jan 16, 2021 · 3 comments
Open

[Bug] Uncatched Error in ConnectorPolicyManagement #51

jediefe opened this issue Jan 16, 2021 · 3 comments

Comments

@jediefe
Copy link

jediefe commented Jan 16, 2021

Running ApplyPolicies runs into an error when executing for Teamspeak:

Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Warlof\Seat\Connector\Drivers\Teamspeak\Driver\TeamspeakSpeaker::removeSet() must implement interface Warlof\Seat\Connector\Drivers\ISet, null given, called in /var/www/seat4/vendor/warlof/seat-connector/src/Traits/ConnectorPolicyManagement.php on line 136 in /var/www/seat4/vendor/warlof/seat-teamspeak/src/Driver/TeamspeakSpeaker.php:141

Investigation shows, that $this->client->getSet($set_id) returns null in certain cases.
Referring to this line:

$set = $this->client->getSet($set_id);

Due to this, the policy job for Teamspeak is not executed properly.

@warlof
Copy link
Owner

warlof commented Jan 16, 2021

Can you give a bit more information about the cases you found ?

The only one I see could be if you drop Server Group from Teamspeak and do not refresh SeAT regarding this action.

@jediefe
Copy link
Author

jediefe commented Jan 16, 2021

I’d like to take a deeper look, but I wonder how to debug this one effectively by getting variable values and stuff.
Since I pull sets on a scheduled basis, I assume there might be something in between our TS server configuration, the HTML API, and the database. Maybe it's about the server admin group that the API might not be able to access but is visible on the Teamspeak client? 🤔

@jediefe
Copy link
Author

jediefe commented Mar 5, 2021

Can you give a bit more information about the cases you found ?

The only one I see could be if you drop Server Group from Teamspeak and do not refresh SeAT regarding this action.

I got some time to look into it. Your reply points into the right direction, but it's a little bit more complicated. A few users have got a serveradmin group which is set up as Server Query group for security reasons and thus cannot be seen by the API and SeAT. However, SeAT sees the users having the group though and tries to remove it, which is of course not possible.

Edit: One possible solution would be to introduce a ts group whitelist/blacklist like suggested in #16 to skip the respective group.

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

No branches or pull requests

2 participants