title: Testcafe not saving cookies, resulting in malformed JWT
body: <p>I have been using testcafe for automated UI tests for an internal CRM. These tests worked well for the last 6 months, and then mysteriously started failing a week ago. The tests are able to log into our stage environment, but then once they attempt to hit our backend, the following error occurs:</p>
  
  <pre><code>UnauthorizedError: jwt malformed
     at /opt/app/node_modules/express-jwt/lib/index.js:100:22
     at /opt/app/node_modules/express-jwt/node_modules/jsonwebtoken/index.js:155:18
     at /opt/app/node_modules/async-listener/glue.js:188:31
     at _combinedTickCallback (internal/process/next_tick.js:73:7)
     at process._tickDomainCallback (internal/process/next_tick.js:128:9)
     at process.fallback (/opt/app/node_modules/async-listener/index.js:563:15)
  </code></pre>
  
  <p>It looks like the cookies are not being saved:</p>
  
  <p><a href="https://i.stack.imgur.com/EJxeq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EJxeq.png" alt="Network Cookies Tab"></a></p>
  
  <p>I am currently using Testcafe 0.19.0, but have also attempted to upgrade to v0.22.0, but that did not solve the problem.</p>
  
  <p>To my knowledge, there were no infrastructure changes that would cause this. </p>