title: IOException while requesting key: Invalid device key response
body: <p>I'm using a Pi 3 with google IOT to operate some relays that control valves on an irrigation system. The system uses the internet to get a weather forecast to work how much water to use, and uses NanoHTTPD to provide a UI.</p>
  
  <p>It's running nicely, but occasionally I get an error which stops the whole thing. From the log files:</p>
  
  <pre><code>05-04 05:26:14.677 737-1077/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout:
  05-04 05:26:14.678 737-1077/com.google.android.gms.persistent W/Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
         com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
  05-04 05:26:14.798 737-1077/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout:
  05-04 05:26:14.799 737-1077/com.google.android.gms.persistent W/Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
         com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11973330:13)
  05-04 05:26:14.914 737-1077/com.google.android.gms.persistent W/GLSUser: [AppCertManager] IOException while requesting key: 
      java.io.IOException: Invalid device key response.
          at fmk.a(:com.google.android.gms@11973330:12)
          at fmk.a(:com.google.android.gms@11973330:64)
          at fmi.a(:com.google.android.gms@11973330:8)
          at fme.a(:com.google.android.gms@11973330:1)
          at fmd.a(:com.google.android.gms@11973330:10)
          at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms@11973330:7)
          at ers.call(:com.google.android.gms@11973330:3)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at kfr.run(:com.google.android.gms@11973330:26)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
          at kku.run(Unknown Source:7)
          at java.lang.Thread.run(Thread.java:764)
  </code></pre>
  
  <p>I'd appreciate some hint on how to stop this from happening.</p>
  
  <p>Thanks.</p>