Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Sometimes all commands are unknown #1378

Closed
ghost opened this issue Jan 16, 2017 · 17 comments
Closed

Sometimes all commands are unknown #1378

ghost opened this issue Jan 16, 2017 · 17 comments

Comments

@ghost
Copy link

ghost commented Jan 16, 2017

Issue description

Write a short description about the issue
-Sometimes all commands are unknown

Steps to reproduce the issue

-There is no step,just when server is running,and some of the players enter the command is unknown command.
-Sometimes getting out of the server can not only solve the problem,but sometimes not.
-Restart the server can solve this problem.
!!!This problem is only for some players,other players are normal.

OS and versions

  • Nukkit Version: Nukkit:1.0dev API:1.0.0 protocol:100
  • Java Version: 1.8.0_111
  • Host OS: Linux
  • Host Configuration: 4GB RAM, 35GB SSD drive, 4 core CPU from Intel, 5 Mb internet upload
  • Client Edition: Windows 10 , Android
  • Client Version: 1.0.0

Crashdump, backtrace or other files

  • Nothing
<!--- Copy and paste your backtrace here... -->
```Nothing
* ...
@File14
Copy link
Contributor

File14 commented Jan 16, 2017

Only for IOS users.

@DaMatrix
Copy link

Can confirm on android

@ghost
Copy link
Author

ghost commented Jan 16, 2017

Windows10 is the same.
=-=

@ghost
Copy link
Author

ghost commented Jan 16, 2017

How to solve this problem?

@boybook
Copy link
Contributor

boybook commented Jan 16, 2017

It is because of the loss of AvailableCommandsPacket. It is really a big packet.
You can send it again to solve this problem.

@ghost
Copy link
Author

ghost commented Jan 17, 2017

But...it's no use sending it back again
Enter a / no tips

@ghost
Copy link
Author

ghost commented Jan 18, 2017

Now . The only way to do this is to cancel OP, and then give it back to OP to use the command!!!

@DaMatrix
Copy link

That's obvious. When permissions are changed, allowed commands are recalculated and sent to the client.

@Snake1999
Copy link
Member

Snake1999 commented Jan 26, 2017

This is a serious problem. Probably it's caused by packet loss #blameUDP
I don't know how to fix because I can't get if this client received this packet successfully. Maybe think of another way?
I can reprouce in my iPhone, but I cannot reproduce in my android simulator running on windows 7.
... Still exploring

@DaMatrix
Copy link

DaMatrix commented Jan 26, 2017 via email

@MrPowerGamerBR
Copy link
Contributor

MrPowerGamerBR commented Jan 26, 2017

@Snake1999 are you sending the avaliable commands packet as a reliable packet? It shouldn't have any packet loss if you are using RakNet + send as reliable.

(Well, if Nukkit's RakNet is properly implemented of course, reliable will try to send the packet and make sure that the packet reached it's destination)

@MrPowerGamerBR
Copy link
Contributor

http://www.jenkinssoftware.com/raknet/manual/reliabilitytypes.html

Couldn't it be sent with RELIABLE_WITH_ACK_RECEIPT? MCPE should reply with a ACK receipt so you can figure out if the client did receive the packet or not.

@MrPowerGamerBR
Copy link
Contributor

Well, it doesn't help that the Nukkit's Notify ACK implementation is missing, really:

    @Override
    public void notifyACK(String identifier, int identifierACK) {
    		
    }

Uhhh... where is the rest of the code?

Anyway, the client does send a ACK response if you ask it to, I will try to fix this issue by checking if the client sent a ACK response, if it doesn't resend the packet until the client receives it.

@Creeperface01
Copy link
Contributor

but why this doesn't happen to chunks? Why chunk packets don't lose?

@MrPowerGamerBR
Copy link
Contributor

MrPowerGamerBR commented Jan 27, 2017

@Creeperface01 I think it's because the chunks are compressed more nicely when sent and the available commands packet may get even bigger than a chunk packet if you have a lot of commands.

@Snake1999
Copy link
Member

Snake1999 commented Jan 28, 2017

I think it might be Rak Network layer, for there is no code written for 'TCP packet resend'. Rak simulates TCP connection by UDP diagram packets, that means 'resend' should be written.
Thus, this big packet for command (for big servers even tens of kilobytes), once lost, the server does not find out this problem, and just continued its work as client confused by no command information sent.
TODO

@Snake1999
Copy link
Member

#1406

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants