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

Frequent disconnects from realms and dungeons #49

Open
iremnant opened this issue May 2, 2020 · 4 comments
Open

Frequent disconnects from realms and dungeons #49

iremnant opened this issue May 2, 2020 · 4 comments
Labels
api: client This issue is related to the client. type: bug Something isn't working properly

Comments

@iremnant
Copy link
Contributor

iremnant commented May 2, 2020

Version info

  • nrelay version: 8.8.6
  • RotMG version: X31.0.1

Plugins

  • Follow (unreleased)
    • Uses features
      • ResourceManager.objects
      • PlayerTracker
    • Uses packets
      • MapInfoPacket
      • UpdatePacket
      • NewTickPacket
      • TextPacket
      • UsePortalPacket
      • TeleportPacket

Steps to reproduce

  1. Start nrelay
  2. Enter realm or dungeon
  3. Walk around for a couple of seconds, shoot enemies etc
  4. Suddenly get kicked out

Result

The bot is disconnected with no error except:

[XX:XX:XX | Main Client]        Received failure 0: "Lost connection to server"
[XX:XX:XX | Main Client]        Received socket error: read ECONNRESET`

Seems like an object getting hit multiple times in a small period of time triggers it? Almost certainly related to hits in some way. I can walk around as much as I like but when enemies are near they tend to disconnect after a while. Happens in all dungeons. I'll keep you posted as I look into this.

Debug logs look like:


[XX:XX:23 | Main Client]      Connecting to Snake Pit
[XX:XX:24 | Main Client]      Connected!
[XX:XX:33 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:33 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Sent OtherHit for object.
[XX:XX:34 | Main Client]      Took 2 damage. At 747 health.
[XX:XX:34 | Main Client]      Sent PlayerHit.
[XX:XX:34 | Main Client]      Took 12 damage. At 735 health.
[XX:XX:34 | Main Client]      Sent PlayerHit.
[XX:XX:34 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Took 2 damage. At 734 health.
[XX:XX:34 | Main Client]      Sent PlayerHit.
[XX:XX:34 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:34 | Main Client]      Took 12 damage. At 723 health.
[XX:XX:34 | Main Client]      Sent PlayerHit.
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Took 12 damage. At 712 health.
[XX:XX:35 | Main Client]      Sent PlayerHit.
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Took 12 damage. At 701 health.
[XX:XX:35 | Main Client]      Sent PlayerHit.
[XX:XX:35 | Main Client]      Took 12 damage. At 689 health.
[XX:XX:35 | Main Client]      Sent PlayerHit.
[XX:XX:35 | Main Client]      Took 12 damage. At 678 health.
[XX:XX:35 | Main Client]      Sent PlayerHit.
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Took 12 damage. At 666 health.
[XX:XX:35 | Main Client]      Sent PlayerHit.
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:35 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Took 12 damage. At 710 health.
[XX:XX:36 | Main Client]      Sent PlayerHit.
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Took 12 damage. At 698 health.
[XX:XX:36 | Main Client]      Sent PlayerHit.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Sent OtherHit for object.
[XX:XX:36 | Main Client]      Took 12 damage. At 688 health.
[XX:XX:36 | Main Client]      Sent PlayerHit.
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:36 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_2
[XX:XX:37 | Main Client]      Took 12 damage. At 677 health.
[XX:XX:37 | Main Client]      Sent PlayerHit.
[XX:XX:37 | Main Client]      Took 12 damage. At 665 health.
[XX:XX:37 | Main Client]      Sent PlayerHit.
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for object.
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for player: USERNAME_1
[XX:XX:37 | Main Client]      Sent OtherHit for object.
[XX:XX:37 | Main Client]      Sent OtherHit for object.
[XX:XX:37 | Main Client]      Sent OtherHit for object.
[XX:XX:37 | Main Client]      Sent OtherHit for object.
[XX:XX:37 | Main Client]      Received failure 0: "Lost connection to server"
[XX:XX:37 | Main Client]      Sent OtherHit for object.
[XX:XX:37 | Main Client]      Received socket error: read ECONNRESET
[XX:XX:37 | Main Client]      Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:XX5:27)
[XX:XX:37 | Main Client]      The connection to SERVER_NAME was closed.
@iremnant
Copy link
Contributor Author

iremnant commented May 2, 2020

Perhaps related: The client and specifically autonexus seems not to take external healing into account.
After taking a bunch of 20dmg hits and repeatedly being healed by a maxed out priest, the client thinks its at hp levels way lower than they really are (client thinks 120, but really its at 840). This isn't corrected in any way and might be the cause of these disconnects (desync?)

@thomas-crane
Copy link
Owner

Dealing with projectiles has been a long running effort in the development of nrelay. As you can see, it's still not quite perfect. This is probably something that will require a lot of time and effort in order to debug and fix properly, and unfortunately I don't have the time right now. I'll leave this issue open as it is something I would really love to fix eventually. Thanks for the insight into the priest healing, I'll keep that in mind when I have some time to work on this!

@thomas-crane thomas-crane added api: client This issue is related to the client. type: bug Something isn't working properly labels May 6, 2020
@iremnant
Copy link
Contributor Author

iremnant commented May 6, 2020

Fantastic. I'll keep you posted in case I look into it myself.

@steele123
Copy link

Just to add to this issue it is directly related to whether or not autoaim is enabled or disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: client This issue is related to the client. type: bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

3 participants