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
It fails on sonarqube. Token is fine. Why? I've tried even with admin user token.