theonedev/onedev · error · ExplicitException

Non-existent issue specified in recipient address:

Error message

Non-existent issue specified in recipient address: 

What it means

After parsing a numeric entity id from an email subaddress (issue~<id>), handleMessage looks up the issue via issueService.get(entityId). If no issue with that id exists, an ExplicitException 'Non-existent issue specified in recipient address: <address>' is thrown.

Source

Thrown at server-core/src/main/java/io/onedev/server/mail/DefaultMailService.java:494

								throw new ExplicitException("Unable to create issue from email as service desk is not enabled");
							}
						}
					} else if (parsedReceiverAddress.isSubaddress() && systemAddress.equalsIgnoreCase(parsedReceiverAddress.getOriginalAddress())) {
						if (involvedIssue == null && involvedPullRequest == null) {
							String subAddress = StringUtils.substringAfter(parsedReceiverAddress.getName(), "+");
							if (subAddress.equals(MailService.TEST_SUB_ADDRESS)) {
								break;
							} else if (subAddress.contains("~")) {
								Long entityId;
								try {
									entityId = Long.parseLong(StringUtils.substringAfter(subAddress, "~"));
								} catch (NumberFormatException e) {
									throw new ExplicitException("Invalid id specified in recipient address: " + parsedReceiverAddress);
								}
								if (subAddress.contains("issue")) {
									involvedIssue = issueService.get(entityId);
									if (involvedIssue == null)
										throw new ExplicitException("Non-existent issue specified in recipient address: " + parsedReceiverAddress);
									if (subAddress.contains("unsubscribe")) {
										if (fromUser != null) {
											var watch = issueWatchService.find(involvedIssue, fromUser);
											if (watch != null) 
												watch.setWatching(false);
										} else {
											involvedIssue.getExternalParticipants().remove(fromInternetAddress);
										}											
										String subject = "Unsubscribed successfully from issue " + involvedIssue.getReference();
										String template = settingService.getEmailTemplates().getIssueNotificationUnsubscribed();

										Map<String, Object> bindings = new HashMap<>();
										bindings.put("issue", involvedIssue);

										String htmlBody = EmailTemplates.evalTemplate(true, template, bindings);
										String textBody = EmailTemplates.evalTemplate(false, template, bindings);

										var threadingReferences = getThreadingReferences(UUID.randomUUID().toString(), getMessageId(message));

View on GitHub (pinned to d44925c47c)

Solutions

  1. Verify the issue id exists in the target OneDev instance and correct the address.
  2. Copy the issue's email address from the issue page rather than constructing it.
  3. If the issue was deleted, comment on a different issue or open a new one via the project address (with service desk enabled).

Example fix

// before
To: issue~99999@company.onedev.io  (no such issue)
// after
To: issue~42@company.onedev.io
Defensive patterns

Strategy: validation

Validate before calling

Issue issue = issueService.get(id);
if (issue == null) throw new IllegalArgumentException("No issue with id " + id);

Try / catch

try { handleMessage(message); } catch (ExplicitException e) { sendFailureNotice(from, e.getMessage()); }

Prevention

When it happens

Trigger: Email sent to issue~<id>@... where the id parses as a number but no issue with that id exists in the database.

Common situations: Emailing an issue id from a different OneDev instance; issue deleted after the address was saved; id typo (e.g. issue~999 when only 50 issues exist).

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/b748174e8f91be1d. Report an issue: GitHub.