I got error projectKey=undefined.
node -v
v18.18.0
npm -v
9.8.1
Command that I executing:
sonar-report --sonarurl "http://localhost:9000/" --project MyProject --output "/tmp/sonar-report_sonar-report.html" --allbugs --sonartoken squ_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
lbugs --sonartoken squ_xxxxxxxxxxxxxxxxxxxxxxxxx
sonarqube version: 9.9.2
http://localhost:9000/api/hotspots/search?projectKey=**undefined**&ps=500&p=1&statuses=TO_REVIEW
Error while getting hotspots list : ERR_NON_2XX_3XX_RESPONSE - Response code 404 (Not Found) - 404 - Not Found - {"errors":[{"msg":"Component key \u0027undefined\u0027 not found"}]}
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
HTTPError: Response code 404 (Not Found)
at Request.<anonymous> (/home/ccs/.nvm/versions/node/v18.18.0/lib/node_modules/sonar-report/node_modules/got/dist/source/as-promise/index.js:118:42)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_NON_2XX_3XX_RESPONSE',
timings: {
start: 1695601707195,
socket: 1695601707196,
lookup: 1695601707196,
connect: 1695601707196,
secureConnect: undefined,
upload: 1695601707197,
response: 1695601707208,
end: 1695601707208,
error: undefined,
abort: undefined,
phases: {
wait: 1,
dns: 0,
tcp: 0,
tls: undefined,
request: 1,
firstByte: 11,
download: 0,
total: 13
}
}
}
Node.js v18.18.0
I also tried on version 10.2.0:
sonarqube version: 10.2.0
http://localhost:9000/api/hotspots/search?projectKey=undefined&ps=500&p=1&statuses=TO_REVIEW
Error while getting hotspots list : ERR_NON_2XX_3XX_RESPONSE - Response code 404 (Not Found) - 404 - Not Found - {"errors":[{"msg":"Project \u0027undefined\u0027 not found"}]}
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
I got error projectKey=undefined.
node -v
v18.18.0
npm -v
9.8.1
Command that I executing:
sonar-report --sonarurl "http://localhost:9000/" --project MyProject --output "/tmp/sonar-report_sonar-report.html" --allbugs --sonartoken squ_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I also tried on version 10.2.0: