ably-java: "java.io.IOException: readBufferBytes failed" exception when making REST requests

W/System.err: io.ably.lib.types.AblyException: java.io.IOException: readBufferBytes failed
...
com.newrelic.agent.android.instrumentation.io.CountingInputStream.read(CountingInputStream.java:160)
 

This is due to an odd interaction between the NewRelic client and the Ably client, see https://github.com/ably/ably-java/issues/258

 

For now, the only known workaround is to disable NewRelic.