Log warning if converting state variables to JSON fails.