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

session doesnt work. #1360

Closed
Leymooo opened this issue Oct 15, 2017 · 21 comments
Closed

session doesnt work. #1360

Leymooo opened this issue Oct 15, 2017 · 21 comments
Assignees
Milestone

Comments

@Leymooo
Copy link
Contributor

Leymooo commented Oct 15, 2017

https://youtu.be/NoCopwF8whU
Build number, steps to reproduce and config in video.

plugins [00:25:02 INFO]: Plugins (6): AutoSaveWorld, ProtocolSupport, ProtocolLib, AuthMe, AuthServer, HolographicDisplays

@sgdc3
Copy link
Member

sgdc3 commented Oct 16, 2017

Can't watch the video atm, i'll do it asap

@sgdc3
Copy link
Member

sgdc3 commented Oct 16, 2017

If you use bungeecord with multiple auth servers you must disable caching in the config file

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 16, 2017

Only one server with authme

@sgdc3
Copy link
Member

sgdc3 commented Oct 16, 2017

Could you paste your config please? What's authserver?

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 16, 2017

151.80.108.152/config.yml
151.80.108.152/AuthServer.jar sources in jar.

@sgdc3
Copy link
Member

sgdc3 commented Oct 16, 2017

@ljacqu strange, maybe some issue with the hasSession logic? :/

@sgdc3 sgdc3 added this to the 5.4 milestone Oct 17, 2017
@ljacqu
Copy link
Member

ljacqu commented Oct 17, 2017

I can check this evening. I don't see anything wrong just looking at the code

@sgdc3
Copy link
Member

sgdc3 commented Oct 17, 2017

@ljacqu That would be great, thank you

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 17, 2017

In 1789 and lower works, 1790+ not work

Leymooo referenced this issue Oct 17, 2017
* Old session system

* Actually check if sessions are enabled

* Cleanup

* Don't use cached isLogged value
@sgdc3
Copy link
Member

sgdc3 commented Oct 17, 2017

Not possible, it is working just fine on my network, maybe it is broken with sqlite :/ could you try it with mysql?

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 17, 2017

I tested it 3 times. After 1790 build sessions doesn't works. I cant test with mysql because i have 180k+ accounts and it will take long time to convert and import accounts to mysql. Also autobackup mysql database is harder then sqlite.

@sgdc3
Copy link
Member

sgdc3 commented Oct 17, 2017

@Dimatert9 180k records in sqllite ? O_O consider moving to mysql asap, backup is easy to do, you need just to run the mysqldump utility.

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 17, 2017

I dont want merge sqlite to mysql. I have only one server with AuthMe and max online on this server is ~5-10 players.
There is video than shows that session works on 1789 and dont work on 1790. In 1790 when i join AuthMe send message that session was expired.
https://youtu.be/3S_vi301-pg

@ljacqu
Copy link
Member

ljacqu commented Oct 17, 2017

Hi @Dimatert9, for a while (build 1790 to 1821) we used a different way of handling sessions that has since been changed yet again, in build n. 1822 and above. Could we ask you to test with build n. 1822?
http://ci.xephi.fr/job/AuthMeReloaded/

@ljacqu ljacqu added the Status: awaiting answer Marks issues blocked by an open question to the reporter. label Oct 17, 2017
@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 18, 2017

In video above and in video on main post i also tested 1822. On main post all video with 1822, in video above at the end.

@ljacqu ljacqu removed the Status: awaiting answer Marks issues blocked by an open question to the reporter. label Oct 18, 2017
@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 19, 2017

[22:43:07 INFO]: Leymooo[/93.185.249.227:35133] logged in with entity id 170 at ([world]182.0, 51.0, 25.5)
[22:43:07 INFO]: ProcessJoin, try debug session
[22:43:07 INFO]: isAuthAvailable: true
[22:43:07 INFO]: ProcessJoin, trying session
[22:43:07 INFO]: canResumeSession start.
[22:43:07 INFO]: isEnabled: true
[22:43:07 INFO]: hasSession start
[22:43:07 INFO]: sql: SELECT hasSession FROM authme WHERE LOWER(username)=?;
[22:43:07 INFO]: Sql was executed. Trying rs.next()
[22:43:07 INFO]: return false
[22:43:07 INFO]: hasSessionfalse
[22:43:07 INFO]: hasSession start
[22:43:07 INFO]: sql: SELECT hasSession FROM authme WHERE LOWER(username)=?;
[22:43:07 INFO]: Sql was executed. Trying rs.next()
[22:43:07 INFO]: return false
[22:43:07 INFO]: ProcessJoin debug end
[22:43:14 INFO]: [AuthMe] Leymooo logged in!
[22:43:15 INFO]: Leymooo lost connection: Disconnected
[22:43:18 INFO]: UUID of player Leymooo is 2ea91fe8-604f-3776-96e3-f54c18162dda
[22:43:18 INFO]: Leymooo[/93.185.249.227:32957] logged in with entity id 259 at ([world]182.0, 51.0, 25.5)
[22:43:18 INFO]: ProcessJoin, try debug session
[22:43:18 INFO]: isAuthAvailable: true
[22:43:18 INFO]: ProcessJoin, trying session
[22:43:18 INFO]: canResumeSession start.
[22:43:18 INFO]: isEnabled: true
[22:43:18 INFO]: hasSession start
[22:43:18 INFO]: sql: SELECT hasSession FROM authme WHERE LOWER(username)=?;
[22:43:18 INFO]: Sql was executed. Trying rs.next()
[22:43:18 INFO]: return false
[22:43:18 INFO]: hasSession: false
[22:43:18 INFO]: hasSession start
[22:43:18 INFO]: sql: SELECT hasSession FROM authme WHERE LOWER(username)=?;
[22:43:18 INFO]: Sql was executed. Trying rs.next()
[22:43:18 INFO]: return false
[22:43:18 INFO]: ProcessJoin debug end
[22:43:21 INFO]: Leymooo lost connection: Disconnected

image
this code was ignored in sqlite datasource

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 19, 2017

i found problem.
pst.setString(1, user);
user is not lowercased

i changed this lines to user.toLowerCase() and now session work.
https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/java/fr/xephi/authme/datasource/SQLite.java lines 477, 494, 506

@sgdc3
Copy link
Member

sgdc3 commented Oct 19, 2017

@Dimatert9 Wow, haven't noticed that! ;D it was working with me because my nick is already lowercase! xD

@sgdc3 sgdc3 closed this as completed in 251eca9 Oct 19, 2017
@sgdc3
Copy link
Member

sgdc3 commented Oct 19, 2017

Thank you very much :D

@sgdc3
Copy link
Member

sgdc3 commented Oct 19, 2017

@Dimatert9 Please let us know if you have any issue with the latest dev build ;)

@Leymooo
Copy link
Contributor Author

Leymooo commented Oct 19, 2017

With latest build all good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants