Network error (connection): Cannot read property 'headers' of undefined