ymichael / everdell

🐿️ Play Everdell Online!
https://everdell.vercel.app/
MIT License
32 stars 10 forks source link

FUNCTION_INVOCATION_FAILED when using university to discard cemetery with worker placed on it #57

Closed mwojterski closed 2 years ago

mwojterski commented 2 years ago

Describe the bug

500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED
ID: arn1::sx7k2-1642724384513-9ccdbdbec73c

game: 6BTEXBD8Kwh2rkAtmUbb6d

To Reproduce Use a university to discard a cemetery which had a worker placed on it.

elynnlee commented 2 years ago

Thanks for reporting this! This looks like a vercel side issue, so we'll take a look.

Just curious -- when you refresh the page, did the error persist? Wondering if it's spurious

mwojterski commented 2 years ago

@elynnlee thanks! Yes, it is repeatable/persistent for us, try visiting the link at https://everdell.vercel.app/game/6BTEXBD8Kwh2rkAtmUbb6d. For us, it shows consistently as below (ID changes, so it looks like the crash is repeatable):

image

I didn't have a chance yet, but I'll try and run my own server, to check the logs and see if this is something I can fix. I'll let you know if I find anything. Cheers!

elynnlee commented 2 years ago

@mwojterski we figured it out! It looks like we're throwing an error for the event you claimed ("Remembering the Fallen") when we can't find the Cemetery card in your city. However, this is incorrect --> after you claim an event, you don't need to keep the card in your city (or continue to maintain the criteria for the event). Instead, you would just get 0 points for this event since you don't have a Cemetery in your city.

I'm working on a fix for this + some additional test cases for this. Thanks for reporting this!!

elynnlee commented 2 years ago

@mwojterski fix is deployed and your link works (in case you wanted to keep playing). Thanks for flagging this -- there was a bug in a couple of other events that I fixed as well :) Hope you're enjoying the game!!

mwojterski commented 2 years ago

@elynnlee that's amazing, thank you! We're enjoying the game very much 😃 Cheers!