Newcomer1989 / TSN-Ranksystem

A PHP Bot that assigns time based server groups on TeamSpeak3.
https://ts-ranksystem.com
GNU General Public License v3.0
144 stars 60 forks source link

TeaSpeak - Infinite loop #630

Closed almir101 closed 5 years ago

almir101 commented 5 years ago

Ranksystem Version: 1.3.0-pre-1.3.1-2 Description: 1) What did you do? It was working like a charm, suddenly it stopped working, I did upgraded to debian 10 2) What did you expect? / 3) What result did you get? Ranksystem just goes to loop and not writing anything to database, even with all privileges granted. Ranksystem Log Add a Ranksystem-Log extract of the last startup. You can also use https://pastebin.com/ for this and share us the link. https://pastebin.com/YanEdygF

Shad86 commented 5 years ago

Hello,

you already tried to fix this 2 errors?

2019-06-21 15:58:00.697608 ERROR TS3 Error: 2051: Error while downloading servergroup icon from group 'Server Admin' with ID 3: file not found (file not exists)

2019-06-21 15:58:00.698054 ERROR TS3 Error: 2051: Error while downloading servergroup icon from group 'Normal' with ID 4: file not found (file not exists)

Sometimes icons are corrupted, so you may remove them and add them again

Newcomer1989 commented 5 years ago

Inside the folder logs you will find an SQL File names temp_sql_dump.sql.

Please share us also this file.

almir101 commented 5 years ago

Hello,

you already tried to fix this 2 errors?

2019-06-21 15:58:00.697608 ERROR TS3 Error: 2051: Error while downloading servergroup icon from group 'Server Admin' with ID 3: file not found (file not exists)

2019-06-21 15:58:00.698054 ERROR TS3 Error: 2051: Error while downloading servergroup icon from group 'Normal' with ID 4: file not found (file not exists)

Sometimes icons are corrupted, so you may remove them and add them again

those are just icons that are not set on teamspeak

almir101 commented 5 years ago

Inside the folder logs you will find an SQL File names temp_sql_dump.sql.

Please share us also this file.

https://life2game.info/dl/secret_files/files/temp_sql_dump.sql

Newcomer1989 commented 5 years ago

https://life2game.info/dl/secret_files/files/temp_sql_dump.sql

Ok, thx for sharing this.

We found one issue inside the SQL. We built a new version 1.3.0-pre-1.3.1-4. Please update and try it again!

We also saw, you are using TeaSpeak, not TeamSpeak. TeaSpeak isn't supported yet. So. they may be more problems with..

almir101 commented 5 years ago

Okay I will update now

almir101 commented 5 years ago

https://life2game.info/dl/secret_files/files/temp_sql_dump.sql

Ok, thx for sharing this.

We found one issue inside the SQL. We built a new version 1.3.0-pre-1.3.1-4. Please update and try it again!

We also saw, you are using TeaSpeak, not TeamSpeak. TeaSpeak isn't supported yet. So. they may be more problems with.. where I can find this version 1.3.0-pre-1.3.1-4

almir101 commented 5 years ago

I have updated it via !update and restarted it but still same problem. Also I would not say it is problem due TeaSpeak because it does not write anything into the tables inside MySql.

Newcomer1989 commented 5 years ago

Also I would not say it is problem due TeaSpeak because it does not write anything into the tables inside MySql.

No, it doesn't.. But it brings the values, which will be stored into the database.

Do you want to share us a new SQL file under the version 1.3.0-pre-1.3.1-4?

almir101 commented 5 years ago

Also I would not say it is problem due TeaSpeak because it does not write anything into the tables inside MySql.

No, it doesn't.. But it brings the values, which will be stored into the database.

Do you want to share us a new SQL file under the version 1.3.0-pre-1.3.1-4? https://life2game.info/dl/secret_files/files/temp_sql_dump.sql Same link, new file

Newcomer1989 commented 5 years ago

Ok, the error I saw is fixed with the new version.

For me all SQL commands are valid. Problem could be the special characters in your server group names, server name and client names. Inside the SQL file not all characters are shown correct. I am not sure, if it is TeaSpeak, since in TeamSpeak special utf8-mb4 characters are working without any problems. And the Ranksystem is supporting this since version 1.2.7.

Newcomer1989 commented 5 years ago

You can try to remove these special characters and have a look, it is still looping after.

almir101 commented 5 years ago

I will do it, but thoose special characters were there for months and this problem is old like 2 weeks

almir101 commented 5 years ago

It is looping but in different step http://life2game.info/dl/secret_files/photos/chrome-21-June-2019_18-24-59-713-80Qasrocy2l9gU0xSEI6.jpg

Newcomer1989 commented 5 years ago

It is looping but in different step

That is cause we changed something to fix the broken SQL command with version 1.3.0-pre-1.3.1-4.

There is still a different problem, it is still looping. The only thing, what I saw are the special characters. Perhaps they are a problem, perhaps not. It is depending on how the TeaSpeak handles the utf8mb4 characters in the ServerQuery interface.

If you want, we can try to debug it together. We could do this via remote hands directly on your system. Please contact us on our public server, when you are interested (TS3: ts-n.net).

almir101 commented 5 years ago

Sure I am open for working with you. I will contact you on your server as soon as possible. Nick will be i-OniK.

WolverinDEV commented 5 years ago

Ok, the error I saw is fixed with the new version.

For me all SQL commands are valid. Problem could be the special characters in your server group names, server name and client names. Inside the SQL file not all characters are shown correct. I am not sure, if it is TeaSpeak, since in > TeamSpeak special utf8-mb4 characters are working without any problems. And the Ranksystem is supporting this since version 1.2.7.

Hey I think you've already nailed the issue more or less. In contrast to TeamSpeak, TeaSpeak uses only UTF-8 and not CESU-8 due to some legacy library shit or what ever. Because TeamSpeak supports UTF-8 without any issues the server converts any CESU-8 to UTF-8 and sends it back as UTF-8.

But I'l still a bit surprised that this seems to result in (My)SQL errors, specially because utf8mb4 is MySQL's UTF-8 implementation. This leads me to my guess that the issue is more related to the default char of php. I'm not a PHP expert, but there might be an option to set the default charset to UTF-8 on runtime.

A quick "fix" would be to change the default PHP charset within the php.ini: https://stackoverflow.com/questions/9351694/setting-php-default-encoding-to-utf-8

Side note: I haven't tested it out and this is only a guess based on the differences between TeaSpeak and TeamSpeak and the conversation above.

Newcomer1989 commented 5 years ago

Problem was here the length of the client nicknames. These exceeded the limit of 30 characters.

We added in the current beta version a way to handle this to prevent further issues.

almir101 commented 5 years ago

After latest update it started to loop again. Before I fixed it manually by changing stuff in database so long names can fit. Now it is looping again

Newcomer1989 commented 5 years ago

Please share us, what you exactly did inside the database. We didn't changed the user table. So your changes should still take effect. What we did is, that the user nickname will cut to a limit of 30 characters.