java.lang.NullPointerException: Pull request data should be available for branch type PULL_REQUEST

Hi Team,

Sonar is encountering error when trying to render dashboard and we are getting following error. Could you please help to fix this issue.

  • which versions are you using : sonarQube * Community Edition
  • Version 10.1
  • how is SonarQube deployed: Hosted in AWS as Docker container,
    =====

2024.06.06 13:20:13 ERROR web[AY/n/akUG12awHWTAiet][o.s.s.w.WebServiceEngine] Fail to process request http://hostname/api/project_pull_requests/list?project=xxxxxxxxxx
java.lang.NullPointerException: Pull request data should be available for branch type PULL_REQUEST
at java.base/java.util.Objects.requireNonNull(Unknown Source)
at com.github.mc1arke.sonarqube.plugin.server.pullrequest.ws.pullrequest.action.ListAction.addPullRequest(ListAction.java:123)
at com.github.mc1arke.sonarqube.plugin.server.pullrequest.ws.pullrequest.action.ListAction.lambda$handleProjectRequest$2(ListAction.java:102)
at java.base/java.util.ArrayList.forEach(Unknown Source)
at com.github.mc1arke.sonarqube.plugin.server.pullrequest.ws.pullrequest.action.ListAction.handleProjectRequest(ListAction.java:102)
at com.github.mc1arke.sonarqube.plugin.server.pullrequest.ws.pullrequest.action.ProjectWsAction.handle(ProjectWsAction.java:61)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:111)
at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:84)

Hey there.

Branch analysis / Pull Request analysis is only supported in Developer Edition and higher. If you’re using some other mechanism/plugin to enable it, you’ll have to go back to the maintainer.