RanvierMUD / ranviermud

A node.js based MUD game engine
https://ranviermud.com
MIT License
796 stars 247 forks source link

Menu hangs after failing to log into a character. #353

Open seanohue opened 6 years ago

seanohue commented 6 years ago

Description

If there is an unrecoverable error while trying to load a character, the message

Failed to log in to your character. Please contact an administrator.

is displayed. This can be reproduced by creating a new character then deleting the .json file for the player character but keeping all account data.

Expected outcome

I would expect to either have the link disconnected after this message, or (preferably) be returned to the account menu.

Actual outcome

Instead, it is impossible to cmd+C to close the session, I am not returned to the menu, and my session/terminal instance has to be force-quit.

Steps to reproduce

This can be reproduced by creating a new character then deleting the .json file for the player character but keeping all account data.

Then, try to log into that character.

Your Ranvier server should display an error message such as

2018-05-02T05:07:39.278Z - warn:  Error: File [/Users/seanohue/myProjects/ranviermud/src/../data/player/Hamhamham.json] does not exist!
    at Function.parseFile (/Users/seanohue/myProjects/ranviermud/src/Data.js:20:13)
    at Function.load (/Users/seanohue/myProjects/ranviermud/src/Data.js:78:17)
    at PlayerManager.loadPlayer (/Users/seanohue/myProjects/ranviermud/src/PlayerManager.js:89:23)
    at handleMultiplaying.then (/Users/seanohue/myProjects/ranviermud/bundles/myelin-input-events/input-events/choose-character.js:65:54)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Version of Ranvier

2.0.0

shawncplus commented 6 years ago

This can be reproduced by creating a new character then deleting the .json file for the player character but keeping all account data.

Can this ever happen by normal in-game means, i.e., by a player deleting their character? Or does it only happen when a server admin manually deletes a file and then forgets to update the account's player's array?

Also you don't need to force quit your terminal, just hit the Telnet escape key (usually Ctrl+[, it prompts you when you start telnet) and run quit

seanohue commented 6 years ago

I'll try to replicate it without doing anything on the server-side, but it can happen anytime that there is a server-side error when trying to load a character (I ran into it quite a few times when changing character gen stuff). This just seemed the easiest method to reproduce the error.