microg/GmsCore · error · IllegalArgumentException
No frame supplied.
Error message
No frame supplied.
What it means
BarcodeDetector.detect(Frame) requires a frame to analyze: a null Frame argument fails the Preconditions.checkNotNull check and throws IllegalArgumentException with this message before barcode recognition runs.
Source
Thrown at play-services-vision/src/main/java/com/google/android/gms/vision/barcode/BarcodeDetector.java:46
* <p>
* Recognition results are returned by {@link #detect(Frame)} as Barcode instances.
*/
@PublicApi
public class BarcodeDetector extends Detector<Barcode> {
private INativeBarcodeDetector remote;
private BarcodeDetector(INativeBarcodeDetector remote) {
this.remote = remote;
}
/**
* Recognizes barcodes in the supplied {@link Frame}.
*
* @return mapping of int to {@link Barcode}, where the int domain represents an opaque ID for the barcode. Identical barcodes (as determined by their raw value) will have the same ID across frames.
*/
@Override
public SparseArray<Barcode> detect(Frame frame) {
if (frame == null) throw new IllegalArgumentException("No frame supplied.");
SparseArray<Barcode> result = new SparseArray<>();
if (remote != null) {
FrameMetadataParcel metadataParcel = frame.getMetadata().createParcel();
Barcode[] barcodes = null;
if (frame.getBitmap() != null) {
try {
barcodes = remote.detectBitmap(ObjectWrapper.wrap(frame.getBitmap()), metadataParcel);
} catch (RemoteException e) {
// Ignore
}
} else {
try {
barcodes = remote.detectBytes(ObjectWrapper.wrap(frame.getGrayscaleImageData()), metadataParcel);
} catch (RemoteException e) {
// Ignore
}
}
if (barcodes != null) {View on GitHub (pinned to 157c9d86ac)
Solutions
- Null-check the Frame before calling detect()
- Skip detection when the camera/callback produced no frame
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at play-services-vision/src/main/java/com/google/android/gms/vision/barcode/BarcodeDetector.java:46 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/822957fae2e4be76.
Report an issue: GitHub.