You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "ces-truongvu (via GitHub)" <gi...@apache.org> on 2024/03/04 04:22:15 UTC

[I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

ces-truongvu opened a new issue, #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   Add Sonarqube connection successfully but its projects not loaded when adding Data scope.
   
   ### What do you expect to happen
   
   Should show Sonarqube projects.
   
   ### How to reproduce
   
   1. Added & test connection succesfully
   2. Add data scope, it shows nothing in the popup window
    
   ![image](https://github.com/apache/incubator-devlake/assets/12593828/8958e072-c9d2-4dd0-99ad-7054b69c3d82)
   
   
   ### Anything else
   
   I found out that the key of the organization is required. Seems you are using deprecated API, check it out [here](https://sonarcloud.io/web_api/api/projects?query=search&deprecated=false).
   
   ### Version
   
   v0.21.0-beta6
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "d4x1 (via GitHub)" <gi...@apache.org>.
d4x1 commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2149634330

   > Hmm, fault exists between chair and keyboard. Well, kindoff...
   > 
   > I realised that I entered the url wrong. I omitted the `/api/` path in the url. Now I have it consistently returning with the correct json response from the API, but I still don't get any scopes back 🤔
   
   @marais-vzc  What's the sonarqube's version that you are using?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "d4x1 (via GitHub)" <gi...@apache.org>.
d4x1 closed issue #7091: [Bug][Sonarqube] Can not load data scope
URL: https://github.com/apache/incubator-devlake/issues/7091


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "marais-vzc (via GitHub)" <gi...@apache.org>.
marais-vzc commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2135622567

   Hmm, fault exists between chair and keyboard. Well, kindoff...
   
   I realised that I entered the url wrong. I omitted the `/api/` path in the url. Now I have it consistently returning with the correct json response from the API, but I still don't get any scopes back 🤔 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API [incubator-devlake]

Posted by "rgcouto (via GitHub)" <gi...@apache.org>.
rgcouto commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2983759042

   > Hey everyone!
   > 
   > I'm experiencing a similar issue with the SonarCloud integration. I've successfully added the SonarCloud connection, but I'm encountering errors when trying to retrieve data from some specific repositories.
   > 
   > My setup:
   > 
   > * Using SonarCloud (not self-hosted SonarQube)
   > * Multiple repositories configured in SonarCloud
   > * DevLake version: v0.21.0-beta6 (same as reported in the issue)
   > 
   > Symptoms:
   > 
   > * The connection test passes successfully
   > * When collecting data, I get consistent 404 errors for specific repositories
   > 
   > Here's an excerpt of the error log I'm seeing:
   > 
   > > subtask CollectAdditionalFilemetrics ended unexpectedly Wraps: (2) Error waiting
   > > for async Collector execution Wraps: (3) | combined messages: | { | Retry
   > > exceeded 3 times calling measures/component_tree. The last error was: Http
   > > DoAsync error calling [method:GET path:measures/component_tree query:map[
   > > component:[myorg_web-api] metricKeys:[duplicated_lines_
   > > density,duplicated_blocks,duplicated_lines, duplicated_files, complexity,
   > > cognitive_complexity, effort_to_reach_maintainability_rating_a, lines] p:[10] ps
   > > :[100] qualifiers:[FIL]]]. Response: {"errors":[{"msg":"Project doesn\u0027t
   > > exist"}]} (404)
   > 
   > The key issue appears to be that DevLake is trying to access a project with component ID `myorg_web-api` (I've anonymized the ID), but SonarCloud is responding with "Project doesn't exist" (404).
   > 
   > This project exists in my SonarCloud organization, and I can access it through the SonarCloud UI. However, DevLake consistently fails with the same error when trying to collect metrics for this repository. I've tried to call the `measures/component_tree` endpoint manually and I've noticed this is only happening in two repositories so far on my organization.
   > 
   > Has anyone else encountered similar problems with certain repositories in SonarCloud? Any suggestions for troubleshooting would be greatly appreciated.
   > 
   > Thanks for your help!
   
   I've eventually found out that the problem was related to the lack of "Browser Project" permissions on the Sonar user rather than a problem with the DevLake integration.
   
   Nothing to see here, then 😄   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "ces-truongvu (via GitHub)" <gi...@apache.org>.
ces-truongvu closed issue #7091: [Bug][Sonarqube] Can not load data scope
URL: https://github.com/apache/incubator-devlake/issues/7091


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2151306786

   SonarQube >9.2 and SonarCloud are not supported at this point.
   Collecting vote.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "ces-truongvu (via GitHub)" <gi...@apache.org>.
ces-truongvu commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1985184364

   Hi @abeizn,
   
   I've update to the latest version (v0.21.0.beta7), I believe this issue still not be fixed. 
   
   ### Steps to produces
   
   Test connection works
   
   ![Screenshot from 2024-03-08 14-15-43](https://github.com/apache/incubator-devlake/assets/12593828/1b5b9166-76ea-4ac7-96b6-4f99b83233f1)
   
   But data scope does not show my projects. 
   
   ![image](https://github.com/apache/incubator-devlake/assets/12593828/3af48d01-f83f-4459-a083-f1a873d8d145)
   
   ### What I found out
   
   So, I've started development environment and modified the following file `backend/plugins/sonarqube/api/remote_api.go` by adding the required query string as it was written [here](https://sonarcloud.io/web_api/api/projects?query=search&deprecated=false), then it shows my projects.
   ![image](https://github.com/apache/incubator-devlake/assets/12593828/10ab4c49-a7d5-48c6-8479-0e55d1710a2a)
   
   I wish I can create the PR but I am not familiar with Golang. 
   I hope that helpful. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2987033047

   @rgcouto, great find! Would you like to add it to the document?
   If so, here is the website repo https://github.com/apache/incubator-devlake-website


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2154449916

   @sr2530 No one is working on it at this point, we are open for anyone who would like to contribute.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "ohjongsung (via GitHub)" <gi...@apache.org>.
ohjongsung commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1987425874

   I'm having the same problem. The project list does not appear.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1977930064

   @ces-truongvu This seems to be a problem with filling in the connection, and the test connection does have a bug, which causes the user to test successfully even if he fills in the wrong information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "mieliespoor (via GitHub)" <gi...@apache.org>.
mieliespoor commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2272848485

   not stale


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "ces-truongvu (via GitHub)" <gi...@apache.org>.
ces-truongvu commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2024635413

   > @ces-truongvu - We are using SonarQube Server - Enterprise EditionVersion 9.9.2 (build 77730). Connection is shown as successful. I still dont see projects. They are not loaded when adding Data scope. Can you please assist.
   
   @mrpaapi Devlake only support SonarQube v8.x, v9.x. Find out more [here](https://devlake.apache.org/docs/Overview/SupportedDataSources/#data-sources-and-data-plugins). 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "mrpaapi (via GitHub)" <gi...@apache.org>.
mrpaapi commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1992063621

   We are using SonarQube Server - Enterprise EditionVersion 9.9.2 (build 77730). I still dont see projects. They are  not loaded when adding Data scope.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1978319221

   @ces-truongvu  It will take effect in v0.21.0-beta7 version, expected to be released this week.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2272386603

   This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "ces-truongvu (via GitHub)" <gi...@apache.org>.
ces-truongvu commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1989811033

   > @ces-truongvu Are you using the sonarcloud version? We do not support sonarcloud yet, the corresponding issue is: #4838.
   > 
   > The supported versions are shown in this document: https://devlake.apache.org/docs/Plugins/sonarqube
   
   @abeizn Yes, I'm using Sonar cloud. Got it, thanks for your support.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "marais-vzc (via GitHub)" <gi...@apache.org>.
marais-vzc commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2134940871

   I'm not sure this issue is resolved?
   
   I'm using 1.0.0-beta9 and still seeing the same behaviour.
   
   When going to "Manage Connection" and click test, the UI says succeeded, but if you look at the logs, it actually failed. 
   
   When viewing the scopes, and you click test connection, this time it correct says disconnected / failed, and then not return anything. 
   
   The (redacted html) response from the search api on sonarqube is :
   
   ```
   	<body>
   	    <div id="content">
   	        <div class="global-loading">
   	            <i class="spinner global-loading-spinner"></i> 
   	            <span aria-live="polite" class="global-loading-text">Loading...</span>
   	        </div>
   	    </div>
   	    <script>
   	        window.baseUrl = '';
   	        window.serverStatus = 'UP';
   	        window.instance = 'SonarQube';
   	        window.official = true;
   	    </script>
   	    <script type="module" src="/js/outDBSRE6XU.js"></script>
   	</body>
   ```
   
   The response should be json, not html which is why this fails. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API [incubator-devlake]

Posted by "rgcouto (via GitHub)" <gi...@apache.org>.
rgcouto commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2980903992

   Hey everyone!
   
   I'm experiencing a similar issue with the SonarCloud integration. I've successfully added the SonarCloud connection, but I'm encountering errors when trying to retrieve data from some specific repositories.
   
   My setup:
   - Using SonarCloud (not self-hosted SonarQube)
   - Multiple repositories configured in SonarCloud
   - DevLake version: v0.21.0-beta6 (same as reported in the issue)
   
   Symptoms:
   - The connection test passes successfully
   - When collecting data, I get consistent 404 errors for specific repositories
   
   Here's an excerpt of the error log I'm seeing:
   
   > subtask CollectAdditionalFilemetrics ended unexpectedly Wraps: (2) Error waiting
   > for async Collector execution Wraps: (3) | combined messages: | { | Retry 
   > exceeded 3 times calling measures/component_tree. The last error was: Http 
   > DoAsync error calling [method:GET path:measures/component_tree query:map[
   > component:[myorg_web-api] metricKeys:[duplicated_lines_
   > density,duplicated_blocks,duplicated_lines, duplicated_files, complexity, 
   > cognitive_complexity, effort_to_reach_maintainability_rating_a, lines] p:[10] ps
   > :[100] qualifiers:[FIL]]]. Response: {"errors":[{"msg":"Project doesn\u0027t 
   > exist"}]} (404)
   
   The key issue appears to be that DevLake is trying to access a project with component ID `myorg_web-api` (I've anonymized the ID), but SonarCloud is responding with "Project doesn't exist" (404).
   
   This project exists in my SonarCloud organization, and I can access it through the SonarCloud UI. However, DevLake consistently fails with the same error when trying to collect metrics for this repository. I've tried to call the `measures/component_tree` endpoint manually and I've noticed this is only happening in two repositories so far on my organization. 
   
   Has anyone else encountered similar problems with certain repositories in SonarCloud? Any suggestions for troubleshooting would be greatly appreciated.
   
   Thanks for your help!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky closed issue #7091: [Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API
URL: https://github.com/apache/incubator-devlake/issues/7091


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "sr2530 (via GitHub)" <gi...@apache.org>.
sr2530 commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2153531680

   When can we expect to get DevLake support for SonarQube Enterprise Edition 10.5.1? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1988521375

   @ces-truongvu Are you using the sonarcloud version? We do not support sonarcloud yet, the corresponding issue is: https://github.com/apache/incubator-devlake/issues/4838.
   
   The supported versions are shown in this document: https://devlake.apache.org/docs/Plugins/sonarqube


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "ces-truongvu (via GitHub)" <gi...@apache.org>.
ces-truongvu commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-1979976134

   @abeizn Thank you. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Sonarqube] Can not load data scope [incubator-devlake]

Posted by "mieliespoor (via GitHub)" <gi...@apache.org>.
mieliespoor commented on issue #7091:
URL: https://github.com/apache/incubator-devlake/issues/7091#issuecomment-2150921636

   Latest LTS - SonarQube DC 9.9.5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org