Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to generate report from Web API without branch(optional) parameter #292

Closed
RohKumarT opened this issue Dec 8, 2021 · 5 comments · Fixed by #302
Closed

Not able to generate report from Web API without branch(optional) parameter #292

RohKumarT opened this issue Dec 8, 2021 · 5 comments · Fixed by #302
Assignees
Labels
bug Something isn't working done This issue was solved but not merged in master
Milestone

Comments

@RohKumarT
Copy link

SonarQube version: 8.9 LTS
Plugin Version : 4.0.0

I am using web API to generate the reports. As per the documentation branch parameter is optional, However when i try to generate report without branch parameter i get the below error, and when i passed the branch(I just have default master) parameter, then i was able to generate the reports.

Error:
2021.12.08 21:58:07 ERROR web[AX2ZRrHoNzlUBEYsAARJ][o.s.s.w.WebServiceEngine] Fail to process request http://localhost:9000/api/cnesreport/report?key=********&author=*****&token=8965a0b071ae**************f58ed057
org.sonarqube.ws.client.HttpException: Error 404 on api/navigation/component : {"errors":[{"msg":"Component \u0027*******roxy\u0027 on branch \u0027%\u0027 not found"}]}
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
at org.sonarqube.ws.client.BaseService.call(BaseService.java:55)
at org.sonarqube.ws.client.navigation.NavigationService.component(NavigationService.java:46)
at fr.cnes.sonar.report.providers.project.ProjectProviderPlugin.getProjectAsJsonObject(ProjectProviderPlugin.java:63)
at fr.cnes.sonar.report.providers.project.AbstractProjectProvider.hasProjectAbstract(AbstractProjectProvider.java:128)
at fr.cnes.sonar.report.providers.project.ProjectProviderPlugin.hasProject(ProjectProviderPlugin.java:53)
at fr.cnes.sonar.report.factory.ReportModelFactory.create(ReportModelFactory.java:101)
at fr.cnes.sonar.report.ReportCommandLine.execute(ReportCommandLine.java:144)
at fr.cnes.sonar.plugin.ws.ExportTask.handle(ExportTask.java:181)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:110)
at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:84)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
at org.sonar.server.platform.web.SonarLintConnectionFilter.doFilter(SonarLintConnectionFilter.java:66)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:194)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:81)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:194)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:194)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)

@RohKumarT RohKumarT added the bug Something isn't working label Dec 8, 2021
@Sancretor
Copy link
Contributor

Hi @RohKumarT
Thanks for the feedback and sorry you met this issue.
We'll have a look into it as soon as possible, sorry for the huge delay.

@Sancretor
Copy link
Contributor

Hi @RohKumarT
I just did some tests and am able to reproduce this error.
I'll investigate a bit but this seems to be a real bug.

@Sancretor
Copy link
Contributor

Hi @RohKumarT
We fixed your issue and the PR is ready to be merged on the dev branch.
We may also add a new feature in dev before we could merge it into master, and create a new release.
I'm sorry for the delay, but if you desperately need that fix, you could build the plugin from the fix branch directly.

@RohKumarT
Copy link
Author

@Sancretor Thank you very much!. As of now i am creating reports providing the branch name, so it is working. I will wait for new release , and use the same. I really appreciate for your effort and time into it. Sorry i am not aware of the sonarqube plugin development, i will surely learn and try to contribute once my project things gets settles. :)

@Sancretor
Copy link
Contributor

Hi @RohKumarT
Don't worry too much about learning how to develop plugins, providing your feedback regarding issues is already contributing ;)
That said, any PR is welcome !

@Sancretor Sancretor added the done This issue was solved but not merged in master label Jan 11, 2022
@Sancretor Sancretor self-assigned this Jan 19, 2022
@Sancretor Sancretor mentioned this issue Jan 26, 2022
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done This issue was solved but not merged in master
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants