microg/GmsCore · error · IllegalArgumentException
url cannot be null
Error message
url cannot be null
What it means
Constructor validation in WebImage: the provided Uri is null (or empty in the full constructor), so no image reference can be constructed. The URL argument is the input at fault, matching the documented @throws IllegalArgumentException.
Source
Thrown at play-services-base/src/main/java/com/google/android/gms/common/images/WebImage.java:63
* Constructs a new {@link WebImage} with the given URL.
*
* @param url The URL of the image.
* @throws IllegalArgumentException If the URL is null or empty.
*/
public WebImage(Uri url) {
this(url, 0, 0);
}
/**
* Constructs a new {@link WebImage} with the given URL and dimensions.
*
* @param url The URL of the image.
* @param width The width of the image, in pixels.
* @param height The height of the image, in pixels.
* @throws IllegalArgumentException If the URL is null or empty, or the dimensions are invalid.
*/
public WebImage(Uri url, int width, int height) {
if (url == null) throw new IllegalArgumentException("url cannot be null");
if (width < 0 || height < 0) throw new IllegalArgumentException("width and height must not be negative");
this.url = url;
this.width = width;
this.height = height;
}
/**
* Gets the image height, in pixels.
*/
public int getHeight() {
return height;
}
/**
* Gets the image URL.
*/
public Uri getUrl() {
return url;View on GitHub (pinned to 157c9d86ac)
Solutions
- Check the Uri for null/emptiness before constructing a WebImage
- Skip or reject profile data entries that carry no image URL
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at play-services-base/src/main/java/com/google/android/gms/common/images/WebImage.java:63 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/637ca3fc93b9ccce.
Report an issue: GitHub.