-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
API error 0 when calling setDiscordRoles with empty role list #2375
Comments
This has already been implemented: NamelessMC/Nameless-Link#207. Weren't you running this version during your tests? You should see the "checking user {} guild {} with {} items left in queue" at most once every two seconds. |
Yes i was using the queue system already but you told me to create a ticket on nameless itself as the issue in the screenshot seems to be a homepage issue rather then a nameless link issue. |
Yes, but since you are using the queue system I don't think this is a "race condition" or in any way related to role changes in quick succession. What happens if you only cause one change role event? |
If i remove a role from a user on discord and assign a new one it works. That made me think it works when executed slowly enough. |
Can you check if the queue works, so if the "checking user" messages are at least 2 seconds apart? |
Cannot reproduce myself, this is what happens when I add one role and remove that role:
|
Did you add roles "by hand" or with a third party accessing discord? |
By hand. While testing a bit more I did find a new issue: #2384. I'm not getting it to produce API error 0 though. |
Can you try it out with a spigot server and the discordsrv plugin? Iam very confident that you will get there the api error 0. |
@samerton is it possible to make the API endpoint provide more useful information other than just API error 0 without meta? |
The setDiscordRoles have been completely rewritten and have tested alot so it looks like it work now As for the log that was a bug too, as added value did not register the group successfully |
It works for me |
I can confirm that this issue is resolved with the revamp of the endpoint. |
Describe the issue
I have a very specific case of an group sync issue within the latest version.
On my ingame server i run discordsrv which syncs my ranks to my discord and from there nameless link fowards the role changes to my v2pr10 nameless homepage.
Thing is role remove and add requests are happening so fast that i think the homepage drops one event and returns the api error 0. For example: mc -> discord: role has been set, dc removes old role and adds new role. discord -> homepage: notices role remove event - executes it and drops the newly assigned role change. Interestingly manual(slow) reassigning a role on discord makes the syncing work properly.
Atleast thats what i observed down below on the logs of nameless link. Furthermore i didn't noticed any logs related to an issue with assigning the role.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
properly synced group
Screenshots
NamelessMC version (from StaffCP -> Overview)
Running NamelessMC version 2.0.0-pr10
PHP 7.4.21
PHP GD 7.4.21
PHP mbstring 7.4.21
PHP PDO 7.4.21
PHP cURL 7.4.21
PHP XML 7.4.21
PHP EXIF 7.4.21
PHP MySQL
core/config.php Writable
Cache Writable
Template Cache Writable
Additional information
Previously i was talking to derkades to embed a queue like system for role changes to improve race condition handling. Maybe this would also help in this particular case.
The text was updated successfully, but these errors were encountered: