theonedev/onedev · error · ExplicitException

Unable to find group '${groupName}'

Error message

Unable to find group '${groupName}'

What it means

Thrown by NotificationReceiver.parse when a group criterion in the notification receiver expression names a group that does not exist. GroupService.find(groupName) returns null and OneDev raises an ExplicitException with the group name.

Source

Thrown at server-core/src/main/java/io/onedev/server/buildspec/job/action/notificationreceiver/NotificationReceiver.java:78

		for (CriteriaContext criteria: parser.receiver().criteria()) {
			if (criteria.userCriteria() != null) {
				String userName = getValue(criteria.userCriteria().Value());
				User user = OneDev.getInstance(UserService.class).findByName(userName);
				if (user != null) 
					addEmailAddress(emailAddresses, user);
				else 
					throw new ExplicitException("Unable to find user '" + userName + "'");
			} else if (criteria.groupCriteria() != null) {
				String groupName = getValue(criteria.groupCriteria().Value());
				Group group = OneDev.getInstance(GroupService.class).find(groupName);
				if (group != null) {
					emailAddresses.addAll(group.getMembers().stream()
							.map(it->it.getPrimaryEmailAddress())
							.filter(it-> it!=null && it.isVerified())
							.map(it->it.getValue())
							.collect(Collectors.toList()));
				} else { 
					throw new ExplicitException("Unable to find group '" + groupName + "'");
				}
			} else if (criteria.Committers() != null) {
				if (build != null) {
					for (RevCommit commit: build.getCommits(null)) {
						PersonIdent committer = commit.getCommitterIdent();
						if (committer != null && StringUtils.isNotBlank(committer.getEmailAddress())) 
							emailAddresses.add(committer.getEmailAddress());
					}
				}
			} else if (criteria.Authors() != null) {
				if (build != null) {
					for (RevCommit commit: build.getCommits(null)) {
						PersonIdent author = commit.getAuthorIdent();
						if (author != null && StringUtils.isNotBlank(author.getEmailAddress())) 
							emailAddresses.add(author.getEmailAddress());
					}
				}
			} else if (criteria.CommittersSincePreviousSuccessful() != null) {

View on GitHub (pinned to d44925c47c)

Solutions

  1. Correct the group name to an existing group (check Administration -> Groups).
  2. Create the group if it should exist, and add members with verified email addresses.
  3. Switch the criterion to explicit email addresses if the group cannot be guaranteed.

Example fix

// before
notification receiver: to group qateam

// after (existing group)
notification receiver: to group qa-team
Defensive patterns

Strategy: validation

Validate before calling

Group group = OneDev.getInstance(GroupService.class).find(groupName);
if (group == null)
    throw new IllegalArgumentException("Receiver group '" + groupName + "' does not exist in OneDev");

Try / catch

try {
    NotificationReceiver.parse(receiverSpec, build, paramMatrix);
} catch (ExplicitException e) {
    if (e.getMessage().startsWith("Unable to find group")) {
        // fallback to explicit email list
    } else throw e;
}

Prevention

When it happens

Trigger: A receiver expression like 'to group qa-team' where no group named 'qa-team' exists in OneDev.

Common situations: Group renamed or deleted after configuration; typo in group name; environments (test vs prod) with different group setups.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/18e771bd6de85061. Report an issue: GitHub.