vocatwk / CodeU-Nemo

Chat web app for CodeU
Apache License 2.0
1 stars 3 forks source link

500 Server Error on Live Site #95

Closed lealgamb closed 6 years ago

lealgamb commented 6 years ago

Seems like it's being caused by a NPE. The relative files are UserStore and SessionFilter. I haven't ran into this problem locally, so I'll be working on trying to replicate the NPE to see where this is going wrong. image

yebrahim commented 6 years ago

One possibility is somehow we managed to add a null user into the user store. That would cause the failure in if (user.getName().equals(username)) {, which seems to be where things failed.

vocatwk commented 6 years ago

Should we add a test to make sure a registered user isn't null, then clear out the list of users registered and try again? I think I saw a list somewhere on appengine?

lealgamb commented 6 years ago

The null value came from the username field of NemoBot. I believe that the way I set up the Bot code in PR #93 should handle this. Although the code in master does assign a name.

Also, a user can't submit a null input field, but can submit an empty one. So I think we should set up a length restriction here as well.

image

yebrahim commented 6 years ago

Ah, I totally missed that PR! Will take a look now.