appsmithorg/appsmith · error · AppsmithPluginException
PE-ARG-5000
PE-ARG-5000
Error message
Appsmith server has found null query object when applying where conditional on Firestore query. Please contact Appsmith's customer support to resolve this.
What it means
WhereConditionUtils.applyWhereConditional (WhereConditionUtils.java:30-33) throws this when the Query parameter passed to the method is null. The method is a static utility that applies a Firestore where-clause to an existing Query object — a null Query means no valid query context exists to attach the conditional to. This is categorized as PLUGIN_EXECUTE_ARGUMENT_ERROR (PE-ARG-5000). The message directs users to contact support, suggesting this is an internal error path rather than a normal user-input failure.
Source
Thrown at app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/utils/WhereConditionUtils.java:31
import org.apache.commons.lang3.StringUtils;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
public class WhereConditionUtils {
protected static final ObjectMapper objectMapper = SerializationUtils.getObjectMapperWithSourceInLocationEnabled();
public static Query applyWhereConditional(Query query, String strPath, String operatorString, String strValue)
throws AppsmithPluginException {
String path = strPath.trim();
if (query == null) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
FirestoreErrorMessages.WHERE_CONDITIONAL_NULL_QUERY_ERROR_MSG);
}
ConditionalOperator operator;
try {
operator = StringUtils.isEmpty(operatorString) ? null : ConditionalOperator.valueOf(operatorString);
} catch (IllegalArgumentException e) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
FirestoreErrorMessages.WHERE_CONDITION_INVALID_OPERATOR_ERROR_MSG,
e.getMessage());
}
DataType dataType = DataTypeStringUtils.stringToKnownDataTypeConverter(strValue);
Object value = strValue.trim();
switch (dataType) {View on GitHub (pinned to 8cd9021c24)
Solutions
- Ensure the Firestore collection or document path is correctly configured so a valid Query object is created upstream.
- Verify the query method selected (GET_COLLECTION vs GET_DOCUMENT vs others) supports where conditions — only collection-level queries should apply where clauses.
- If the path and method look correct, this is likely an internal plugin issue — report it to Appsmith support with the full query configuration.
- Check for empty or whitespace-only collection paths which may cause upstream Query creation to return null.
Defensive patterns
Strategy: validation
Validate before calling
// Ensure collection path is non-empty before running a query with a where clause
if (!form.collectionPath || form.collectionPath.trim() === '') {
showAlert('Collection path is required for where conditions', 'error');
} else {
await firestoreQuery.run();
} Prevention
- Always provide a valid collection path so the upstream Query object is non-null.
- Use collection-level methods (GET_COLLECTION) for where conditions, not document-level methods.
- If this error appears with a valid path, report it as an internal plugin bug.
When it happens
Trigger: applyWhereConditional is called with a null Query reference. This typically happens internally when the Firestore plugin's query-building pipeline has not yet instantiated a Query object before attempting to apply a where condition — e.g., a collection path was not resolved, or the upstream query construction returned null.
Common situations: 1) Collection/document path missing or invalid, causing upstream Query instantiation to fail silently and pass null downstream. 2) A plugin code path that builds a query conditionally but skips Query creation for certain methods (e.g., a method that does not support where clauses). 3) Internal plugin bug where the Query is not properly initialized before where-condition application.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/c77043cd26451d51.
Report an issue: GitHub.