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

credentials out of date error with heroku deployment #248

Open
wlvchandler opened this issue Oct 14, 2021 · 2 comments
Open

credentials out of date error with heroku deployment #248

wlvchandler opened this issue Oct 14, 2021 · 2 comments

Comments

@wlvchandler
Copy link

I deployed a slightly edited version (changed some strings and added a default deck - no code changes) to heroku, and periodically our game will end suddenly with the IncorrectIssuer error: "Your credentials to join this game are out of date, the game no longer exists.". We can create a new one immediately, but the current game ends.

It doesn't appear due to a timeout. I've tested with multiple users connected and allowed the app to sit for ~ an hour in different states. This error occurs randomly during active games.

This may be a Heroku-side problem, but I can't figure out why the credentials would be out of date, or how to troubleshoot this. The code in token.ts seems like where the issue is rooted because it's the only place I can find a reference to that error string. I assume it has something to do with that the users are disconnecting and reconnecting once per minute according to the heroku logs.

Any help is appreciated

@wlvchandler
Copy link
Author

opened #249 as a potential "fix"

@Lattyware
Copy link
Owner

Incorrect issuer means that the server has restarted completely, so while I haven't seen the behaviour myself, I suspect this is Heroku doing something where it's killed the server and then restarted it in a new instance. It might be some kind of load-balancing thing where when the server gets active it gets shuffled to a new instance.

Most services like Heroku don't offer guarantees that you'll get a stable VM, so running MD on a service like that with the in-memory store just may not be viable. You can either try running it with a postgres store, or host on a service with better stability guarantees.

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

2 participants