Workaround for crashing game: Ticket to Ride

The Steam Linux version of Ticket to Ride often crashes when starting or ending a single player game.

I decided to investigate the cause, looked for logfiles and found:

~/.steam/steam/steamapps/common/Ticket to Ride/info.log

 

The last part of the log (after a crash) was:

{,info} ---- DOWNLOADING 479 bytes FOR https://api.playreal.live/main/v2/oauth/token
{,info} ---- DOWNLOADING 5 bytes FOR https://api.playreal.live/main/v2/oauth/token
{,warning} ---- WARNING short read FOR https://api.playreal.live/main/v2/oauth/token
{WebService,error} ---- Exception when parsing JSON - <unspecified file>(1): garbage after data
{StatsTracker,info} ---- StatsTracker - Set user id:
{Endpoint,warning} ---- Endpoint::execute - Did not retrieve oauth token for main/v1/users (scope:public)
{StatsTracker,info} ---- StatsTracker - Set user id:
{AuthManager,warning} ---- Failed to retrieve OAuthToken
{Play_PlayScreen,info} ---- Did Retrieve Games Info (Notification)
{,info} ---- flushLog

 

It seems that attempts to get an OAuthToken from api.playreal.live often fail and that the game doesn’t handle it very well.

I don’t play this game online, so I attempted a workaround by modifying /etc/hosts with:

sudo nano /etc/hosts

Then added the line:

127.0.0.1   api.playreal.live

 

This redirects all requests to api.playreal.live to the local computer, which won’t deliver the same response (if any at all).

This seems to be a viable workaround, the game no longer crashes.

(Of course this won’t work if you play the game online)