microg/GmsCore · error · IllegalStateException
DataBuffer reference of type
Error message
DataBuffer reference of type
What it means
Thrown in SingleRefDataBufferIterator.next when the element returned by dataBuffer.get(0) is not a DataBufferRef. This iterator caches a single reusable ref object, so it requires buffers whose elements are DataBufferRef instances; the actual type is appended to the message.
Source
Thrown at play-services-base/src/main/java/com/google/android/gms/common/data/SingleRefDataBufferIterator.java:30
@Hide
public class SingleRefDataBufferIterator<T> extends DataBufferIterator<T> {
private T element;
public SingleRefDataBufferIterator(@NonNull DataBuffer<T> dataBuffer) {
super(dataBuffer);
}
@Override
public T next() {
if (!hasNext()) {
throw new NoSuchElementException("Cannot advance the iterator beyond " + position);
}
++position;
if (position == 0) {
element = dataBuffer.get(position);
if (!(element instanceof DataBufferRef)) {
throw new IllegalStateException("DataBuffer reference of type " + element.getClass() + " is not movable");
}
} else {
((DataBufferRef) element).setDataRow(position);
}
return element;
}
}
View on GitHub (pinned to 157c9d86ac)
Solutions
- Use a DataBuffer implementation whose get() returns DataBufferRef instances
- Use DataBufferIterator or a plain iterator for buffers returning other element types
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at play-services-base/src/main/java/com/google/android/gms/common/data/SingleRefDataBufferIterator.java:30 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/c4dd6d0f231cc310.
Report an issue: GitHub.