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

Keep getting "error: The game has expired OR you didn't put the game_id as the parameter!" #2

Open
apapadakuni opened this issue Apr 3, 2019 · 6 comments

Comments

@apapadakuni
Copy link

Hi,

I keep getting "error: The game has expired OR you didn't put the game_id as the parameter!" even though I have created the game and pass the game_id as the parameter. This happens with any of the POSTs, such as Move Figure Player. I have tried both in Postman and in code.

@anzemur
Copy link
Owner

anzemur commented Apr 4, 2019

Hello,

the api, even without my maintenance should still work fine. Are you sure your requests have Content-Type header set to application/x-www-form-urlencoded and you are sending them in a correct way?

You can see the working example of the api here.

@anzemur anzemur closed this as completed Apr 8, 2019
@anzemur anzemur reopened this Apr 8, 2019
@conema
Copy link

conema commented Jun 25, 2019

The same happened to me, I have no problem if I host myself the APIs. It feels like the db is being deleted with a very little interval

@anzemur
Copy link
Owner

anzemur commented Jun 25, 2019

Chessboard expires after 2 hours, so it gets deleted from the database.

@conema
Copy link

conema commented Jun 26, 2019

I'm talking about very few minutes or instantly. I've not used this API for a few months, but in the past I had the same problem as @apapadakuni. Maybe there is some sort of daily data limit in mongodb?

I'm thinking about a limit because, as I said in my last comment, I had no problems if I host it myself (with the same architecture - heroku + mondodb atlas), maybe your api endpoint is receiving too much requests.

@Dummiez
Copy link

Dummiez commented Aug 9, 2019

Hi, after some more thorough investigation I've noticed in the chessboardModel.js that the chess schema actually expires 2 hours from the initial startup rather than the time the schema was created so after a while when you try to start a new game id and schema past the 2 hour startup it's already expired. Also explains why sometimes in the heroku api game ids expire randomly after 1-2 minutes.

@xastrobyte
Copy link

Yeah i have this issue too. I built chess using this API into a discord bot and i constantly get the same error even though i just started the game

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants