I ran into the same issue just now. For me, it was a bad avro schema that looked something like:
{ "name": "first", "type": ["null", "boolean"] , "default": false}
According to this avro documentation, default values for unions depend on the first field in the union. So my default value of false didn't match null type, causing this issue.
If you still need help with this, could you post your avro schema?