Playabl-io / playabl

https://app.playabl.io
GNU Affero General Public License v3.0
7 stars 3 forks source link

"Unable to leave session" error #254

Closed Kickero closed 7 months ago

Kickero commented 8 months ago

Describe the bug Attempting to leave a session returns an error.

To Reproduce Steps to reproduce the behavior:

  1. Go to a joined session.
  2. Click "leave session."
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This error was encountered in this game: https://app.playabl.io/games/439/overview. Not replicated in other games so far.

jongrim commented 8 months ago

Thanks for reporting! Is the issue ongoing? Can you tell me which user is getting the error? Do you see any errors in the browser console?

Kickero commented 8 months ago

Yes, here is the error that's returned in the browser console:

index-7c7fe5c3.js:245 DELETE https://app.playabl.io/.netlify/functions/processRsvp?sessionId=1397&userId=614047b3-7b7f-4657-a137-450dfda07c78 502 (Bad Gateway)

jongrim commented 8 months ago

Okay, I have a rough idea of the issue, but don't have a permanent fix yet. I believe the issue is the use of double quotes in the game title. I see errors in the function logs where the string "Sal" is somehow getting grabbed and used as JSON. It must be that the double quote is terminating a string or something. I think if you change the game title to single quotes it will allow the player to remove themself. Aside from that, I'll work on making the system more robust so that the title can't break the function, because you really shouldn't have to worry about this.

jongrim commented 8 months ago

Well, I was sort of right. But thanks to the help of ChatGPT, I finally tracked down the real issue and #262 should fix it! I'll leave this open until the fix is confirmed (or enough time passes and I don't hear anything, which is okay too)

jongrim commented 7 months ago

Closing since some time has passed. Feel free to reopen if the issue is observed again.