Plan icon indicating copy to clipboard operation
Plan copied to clipboard

FastLogin integration plugin didn't report the correct client status in Plan

Open Athar42 opened this issue 2 years ago • 2 comments

Describe the issue

The FastLogin integration plugin didn't report the correct client status in Plan. All the clients are reported "Unknown".

Exceptions & Other Logs

Plan output on one of my test servers : image

Plugin versions

Plan : 5.6 DEV 2731 (for both Velocity and PaperMC servers) FastLogin : 1.12-SNAPSHOT-a65a5f3 (build 1298) Authme : 5.6.0 2614 AuthmeVelocity : 4.1.1

Quick setup summary is as follow : Proxy : Velocity --> Connect to a lobby server (PaperMC) ----> Then connect to any game server from an In Game menu (loaded with FastLogin in "Proxy mode"). Not all server have PlaceholderAPI installed (but lobby has and it report the correct state, as noted below).

Additional information

Using the following command : /papi parse NICKNAME %fastlogin_status% get the correct output (here : Premium)

My 2cents : It seems that the FastLogin integration request the status right away at the player connection. As stated on the GitHub page, this issue could be due to the fact that the request of account status is delayed in a proxied environment : image

Athar42 avatar Feb 23 '24 17:02 Athar42

Thanks for the insight in how it might need to wait after login, I didn't know that ws the case so it should make it easier to fix it

AuroraLS3 avatar Feb 23 '24 18:02 AuroraLS3

It's a simple guess, unsure if that's the cause of the behavior I witness here, but that's the best I came accross :D

If any tests needed (testing a new build, or anything to track this bug), feel free to ask me :)

Athar42 avatar Feb 23 '24 20:02 Athar42

Please test this build https://github.com/plan-player-analytics/Plan/actions/runs/8213295818

It adds a 1 second wait before asking for the premium status.

AuroraLS3 avatar Mar 09 '24 08:03 AuroraLS3

Little update, seems to look better, just a little one still fail so far.

So, most of my servers get correctly from : image

to

image

But I still have a couple that didn't update correctly on the first login attempt like the lobby server. Going back and forth from one server to another get the correct status.

So, seems fixed, but a greater delay might be needed :) (like 2, 3 or 5secs).

From the server page (other players didn't reconnect yet), so at least now, it can get the correct value, but I think the delay isn't enough right now :) image

Edit: I think there is a typo on the comment :P "the API doesn't provide a Future." (not "Feature" ? )

Athar42 avatar Mar 09 '24 14:03 Athar42

A Future is a concept in Java where another thread than calling thread is performing a task - in this case FastAPI is getting the premium status.

If the FastAPI api returned a future I would be able to "wait until this is done" rather than add an arbitrary amount of seconds to wait

AuroraLS3 avatar Mar 09 '24 14:03 AuroraLS3

I'll reopen this in case it's FastAPI clearing the premium status on player leave and Plan recording that afterwards

AuroraLS3 avatar Mar 09 '24 14:03 AuroraLS3

A Future is a concept in Java where another thread than calling thread is performing a task - in this case FastAPI is getting the premium status.

If the FastAPI api returned a future I would be able to "wait until this is done" rather than add an arbitrary amount of seconds to wait

Thanks for this info, I didn't knew it :)

I'll keep an eye here for any needed tests :)

Athar42 avatar Mar 09 '24 15:03 Athar42

From the tests I made so far, it might be cleared on reconnection.

I think of that because when I join a server where I was previously set as "Premium", I get back to "Unknown" randomly. But when I got set to "Premium" then go to another server, I still keep the "Premium" statut in PLAN.

If more tests needed, feel free to ask :)

Athar42 avatar Mar 09 '24 17:03 Athar42

Just a little reply after the latest update : This new change seems to do the trick, I didn't revert, on my short testing, to "Unknown" status.

As usual, great job, thanks for that nice plugin !

Athar42 avatar Mar 10 '24 10:03 Athar42