eclair4151 / MC-Status-Widget-for-Minecraft

A powerful tool for checking the status of your Minecraft Server. Available on iOS, WatchOS, and macOS
https://itunes.apple.com/us/app/server-widget-for-minecraft/id1408215245
47 stars 4 forks source link

Cannot display online players in app but can view it in the widget #8

Closed FeikoJoosten closed 6 years ago

FeikoJoosten commented 6 years ago

When viewing the server status in app, the app informs me that I need to set enable-query to true to view the online players. However, viewing the server status using the widget, does allow me to view the online players. I’ve checked with the server owner and he confirmed me that the enable-query setting is set to true.

Example images: http://imgur.com/a/buCwDl1

Running version 1.0.1 on an iPhone X running iOS 11.4.

Edit: updated the post to more accuratly describe the issue.

eclair4151 commented 6 years ago

Hmm interesting. Taking a look now.

FeikoJoosten commented 6 years ago

As far as I’m aware, the enable-query is disabled on the server. But I can double check with the server owner.

FeikoJoosten commented 6 years ago

Ah, my bad. The enable query is set to true. Just confirmed with the server owner.

Edit: I’ve updated the post to more accuratly describe the issue.

FeikoJoosten commented 6 years ago

I’ve updated the imgur link to include a screenshot with a player online.

eclair4151 commented 6 years ago

So it looks like a bug in the API i am using: https://api.mcsrvstat.us/1/waifu-technologies.moe for some reason it is returning that enable-query is turned off on the server, but returning the list of names anyway. I have contacted the API owner to see if i can get some more info on whats going on.

FeikoJoosten commented 6 years ago

Sounds great, let's hope we can get it resolved :) It's a small issue anyway, but still something that needs a fix.

eclair4151 commented 6 years ago

Can you by any chance ask the server owner if in his server.properties list he has query.port=25565

if not can he add it and if it is set to a different port set it to 25565 and restart the server? Thanks!

DragoonX6 commented 6 years ago

Server owner here, is that TCP or UDP?

eclair4151 commented 6 years ago

actually both. The server status is pulled over the TCP ping protocol http://wiki.vg/Protocol

and the user list is pulled over UDP using the query protocol http://wiki.vg/Query

DragoonX6 commented 6 years ago

Oh, in that case just opening up the UDP side of it in my firewall should do the trick.

FeikoJoosten commented 6 years ago

That seems to have fixed the issue. An error regarding that would be nice though ;)

DragoonX6 commented 6 years ago

It's pretty hard to accurately determine if something isn't listening on the port, if it's null routed, or just not open in the firewall. For example my firewall is configured to just drop the packet, instead of rejecting it.

The easiest way is to just list multiple possible reasons and let users go over them before having to open a bug report.

FeikoJoosten commented 6 years ago

That is indeed an option. But as he was able to still retrieve the player names, while still giving out an error that enable-query needed to be true, it should be needed to showcase the error regarding setting enable-query to true anyway. Simply only look at the array of player names, that should already be sufficient afaik.

eclair4151 commented 6 years ago

Yea this is a bit complicated. Feiko is right. it appears UDP is not actually required to get the list of players. The first thing i am going to do is check the list of players and show them in the app even if query is set to false.
The problem is for servers that have UDP turned off but have no players on the server. In that state there is no way to know if enable-query is on and UDP is off(Which is fine), or if enable-query is just turned off.
I think i will update it so that in that case there is no message/error shown unless there are people on the server but we are still unable to get the list of players.

eclair4151 commented 6 years ago

fixed in commit de0332bfc1b3b2bd3ad7a8d3ecb3bdee15c4583c