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

Error: Request failed with status code 403 from SonarQube #62

Open
sknmi opened this issue Sep 6, 2024 · 1 comment
Open

Error: Request failed with status code 403 from SonarQube #62

sknmi opened this issue Sep 6, 2024 · 1 comment

Comments

@sknmi
Copy link

sknmi commented Sep 6, 2024

It fails on sonarqube. Token is fine. Why?
I've tried even with admin user token.

INFO: Waiting for the analysis report to be processed (max 300s)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 28.887s
INFO: Final Memory: 43M/154M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: QUALITY GATE STATUS: FAILED - View details on https://sonarqube.xxxxx.com/dashboard?id=[MASKED]&pullRequest=1942
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
error code = 2
{"action":"generate report","data":{"provide":"gitlab"}}
{"action":"sonar get task status","data":"/api/ce/activity"}
{"action":"[axios] request","data":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"common":{"Accept":"application/json, text/plain, */*"},"delete":{},"get":{},"head":{},"post":{"Content-Type":"application/x-www-form-urlencoded"},"put":{"Content-Type":"application/x-www-form-urlencoded"},"patch":{"Content-Type":"application/x-www-form-urlencoded"},"Authorization":"Bearer [MASKED]"},"method":"get","url":"https://sonarqube.xxx.com/api/ce/activity?component=[MASKED]&onlyCurrents=true"}}
{"action":"[axios] response error","data":{"message":"Request failed with status code 403","name":"Error","stack":"Error: Request failed with status code 403\n    at createError (/usr/local/lib/node_modules/sonar-quality-gate/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/sonar-quality-gate/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/sonar-quality-gate/node_modules/axios/lib/adapters/http.js:293:11)\n    at IncomingMessage.emit (node:events:529:35)\n    at endReadableNT (node:internal/streams/readable:1400:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"Accept":"application/json, text/plain, */*","Authorization":"Bearer [MASKED]","User-Agent":"axios/0.23.0"},"method":"get","url":"https://sonarqube.xxx.com/api/ce/activity?component=[MASKED]&onlyCurrents=true"},"status":403}}
Error: Request failed with status code 403
@sknmi
Copy link
Author

sknmi commented Sep 6, 2024

Made it work with user access token. But here is a strange thing, original integration found issue, but this plugin is not :)

Screenshot 2024-09-06 at 18 08 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant