{"record":{"id":"74aef397d42ca7cd","repo":"SonarSource/sonarqube","slug":"cannot-resolve-issue-at-line-of-due-to","errorCode":null,"errorMessage":"Cannot resolve issue at line {} of {} due to: {}","messagePattern":"Cannot resolve issue at line (.+?) of (.+?) due to: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TransitionIssuesToAnticipatedStatesVisitor.java","lineNumber":97,"sourceCode":"        performAnticipatedTransition(issue, matchedRaws.get(issue));\n      }\n    }\n  }\n\n  private static boolean isEligibleForAnticipatedTransitions(DefaultIssue issue) {\n    return issue.isNew() && STATUS_OPEN.equals(issue.getStatus()) && null == issue.resolution();\n  }\n\n  private void performAnticipatedTransition(DefaultIssue issue, AnticipatedTransition anticipatedTransition) {\n    try {\n      issueLifecycle.doManualTransition(issue, anticipatedTransition.getTransition(), anticipatedTransition.getUserUuid());\n      String transitionComment = anticipatedTransition.getComment();\n      String comment = Strings.isNotBlank(transitionComment) ? transitionComment : \"Automatically transitioned from SonarLint\";\n      issueLifecycle.addComment(issue, comment, anticipatedTransition.getUserUuid());\n      issue.setBeingClosed(true);\n      issue.setAnticipatedTransitionUuid(anticipatedTransition.getUuid());\n    } catch (Exception e) {\n      LOGGER.warn(TRANSITION_ERROR_TEMPLATE, issue.getLine(), issue.componentKey(), e.getMessage());\n      ceTaskMessages.add(\n        new CeTaskMessages.Message(getMessage(issue, e),\n          Instant.now().toEpochMilli(),\n          MessageType.GENERIC));\n    }\n  }\n\n  private static String getMessage(DefaultIssue issue, Exception e) {\n    final int MAX_LENGTH = 50;\n    int componentKeyLength = issue.componentKey().length();\n    String componentKey = componentKeyLength > MAX_LENGTH ? (\"...\" + issue.componentKey().substring(componentKeyLength - MAX_LENGTH, componentKeyLength)) : issue.componentKey();\n    return String.format(TRANSITION_ERROR_TEMPLATE.replace(\"{}\", \"%s\"), issue.getLine(), componentKey, e.getMessage());\n  }\n}\n","sourceCodeStart":79,"sourceCodeEnd":112,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TransitionIssuesToAnticipatedStatesVisitor.java#L79-L112","documentation":"During analysis, SonarLint-anticipated issue transitions (e.g. 'wont-fix' status applied in the IDE) are replayed server-side against stored issues. When an issue cannot be resolved to an existing DB issue at its reported line (it was deleted, moved, or the line no longer matches), the transition fails and this warning is logged and surfaced as a CE task message. It is non-fatal: the analysis continues, only that issue's transition is skipped.","triggerScenarios":"SonarLint synchronized an issue status/comment in the IDE, but at analysis time the corresponding issue cannot be resolved: the component's issue at that line is gone, lines shifted, or rule/issue key mapping fails.","commonSituations":"Developer closed or marked 'won't fix' in SonarLint, then the file was edited before CI analysis; issues were purged between analyses; SonarLint and server versions/branch differ so the issue mapping is stale.","solutions":["Re-run analysis after confirming the file/issue state; the stale transition will simply be dropped.","Refresh SonarLint issue synchronization for the project so anticipated transitions match current server issues.","Check that the branch analyzed is the same one the IDE session was bound to.","Inspect the full warn log line to identify the component and line; verify the issue exists via api/issues/search.","If noise persists, disable SonarLint issue status sync or update SonarLint/plugin versions."],"exampleFix":"// before (comment lost / mismatched issue)\n// nothing to change server-side; re-sync\n// after\n// In SonarLint: right-click project > 'Sync security hotspots and issue status', then re-run CI analysis","handlingStrategy":"fallback","validationCode":"// before relying on SonarLint transitions, confirm the issue still exists on the server\ncurl -u $TOKEN: \"$SONAR_URL/api/issues/search?componentKeys=$COMPONENT&issues=$ISSUE_KEY\"","typeGuard":null,"tryCatchPattern":"// server-side: transitions are skipped with a warning; treat the CE task message as informational\n// client-side (tooling): re-check issue state after analysis\nif (issueNotFound(issueKey)) { refreshSonarLintSync(); }","preventionTips":["Keep SonarLint and its connected mode in sync with the server version.","Avoid long gaps between IDE sessions and CI analyses on actively edited files.","Analyze the same branch used in SonarLint connected mode.","Monitor background-task messages rather than failing builds on this warning."],"tags":["sonarqube","analysis","issues","sonarlint"],"backgroundTag":"entity-not-found","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}