{"record":{"id":"18e771bd6de85061","repo":"theonedev/onedev","slug":"unable-to-find-group-groupname","errorCode":null,"errorMessage":"Unable to find group '${groupName}'","messagePattern":"Unable to find group '(.+?)'","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/buildspec/job/action/notificationreceiver/NotificationReceiver.java","lineNumber":78,"sourceCode":"\t\tfor (CriteriaContext criteria: parser.receiver().criteria()) {\n\t\t\tif (criteria.userCriteria() != null) {\n\t\t\t\tString userName = getValue(criteria.userCriteria().Value());\n\t\t\t\tUser user = OneDev.getInstance(UserService.class).findByName(userName);\n\t\t\t\tif (user != null) \n\t\t\t\t\taddEmailAddress(emailAddresses, user);\n\t\t\t\telse \n\t\t\t\t\tthrow new ExplicitException(\"Unable to find user '\" + userName + \"'\");\n\t\t\t} else if (criteria.groupCriteria() != null) {\n\t\t\t\tString groupName = getValue(criteria.groupCriteria().Value());\n\t\t\t\tGroup group = OneDev.getInstance(GroupService.class).find(groupName);\n\t\t\t\tif (group != null) {\n\t\t\t\t\temailAddresses.addAll(group.getMembers().stream()\n\t\t\t\t\t\t\t.map(it->it.getPrimaryEmailAddress())\n\t\t\t\t\t\t\t.filter(it-> it!=null && it.isVerified())\n\t\t\t\t\t\t\t.map(it->it.getValue())\n\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\t\t\t\t} else { \n\t\t\t\t\tthrow new ExplicitException(\"Unable to find group '\" + groupName + \"'\");\n\t\t\t\t}\n\t\t\t} else if (criteria.Committers() != null) {\n\t\t\t\tif (build != null) {\n\t\t\t\t\tfor (RevCommit commit: build.getCommits(null)) {\n\t\t\t\t\t\tPersonIdent committer = commit.getCommitterIdent();\n\t\t\t\t\t\tif (committer != null && StringUtils.isNotBlank(committer.getEmailAddress())) \n\t\t\t\t\t\t\temailAddresses.add(committer.getEmailAddress());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (criteria.Authors() != null) {\n\t\t\t\tif (build != null) {\n\t\t\t\t\tfor (RevCommit commit: build.getCommits(null)) {\n\t\t\t\t\t\tPersonIdent author = commit.getAuthorIdent();\n\t\t\t\t\t\tif (author != null && StringUtils.isNotBlank(author.getEmailAddress())) \n\t\t\t\t\t\t\temailAddresses.add(author.getEmailAddress());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (criteria.CommittersSincePreviousSuccessful() != null) {","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/buildspec/job/action/notificationreceiver/NotificationReceiver.java#L60-L96","documentation":"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.","triggerScenarios":"A receiver expression like 'to group qa-team' where no group named 'qa-team' exists in OneDev.","commonSituations":"Group renamed or deleted after configuration; typo in group name; environments (test vs prod) with different group setups.","solutions":["Correct the group name to an existing group (check Administration -> Groups).","Create the group if it should exist, and add members with verified email addresses.","Switch the criterion to explicit email addresses if the group cannot be guaranteed."],"exampleFix":"// before\nnotification receiver: to group qateam\n\n// after (existing group)\nnotification receiver: to group qa-team","handlingStrategy":"validation","validationCode":"Group group = OneDev.getInstance(GroupService.class).find(groupName);\nif (group == null)\n    throw new IllegalArgumentException(\"Receiver group '\" + groupName + \"' does not exist in OneDev\");","typeGuard":null,"tryCatchPattern":"try {\n    NotificationReceiver.parse(receiverSpec, build, paramMatrix);\n} catch (ExplicitException e) {\n    if (e.getMessage().startsWith(\"Unable to find group\")) {\n        // fallback to explicit email list\n    } else throw e;\n}","preventionTips":["Check group names against Administration -> Groups before use.","Create groups via config-as-code so they exist in every environment.","Validate receiver expressions when syncing config between environments."],"tags":["onedev","notification","group-lookup","buildspec"],"backgroundTag":"entity-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}