leric opened a new issue, #5254: URL: https://github.com/apache/incubator-devlake/issues/5254
### 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 On requesting sonarqube search-remote-scopes api, got a http 500 error: http://testenv.hostname:3000/plugins/sonarqube/connections/1/search-remote-scopes?page=1&pageSize=10 ``` 2023/05/22 08:52:32 [Recovery] 2023/05/22 - 08:52:32 panic recovered: GET /plugins/sonarqube/connections/1/search-remote-scopes?page=1&pageSize=10 HTTP/1.1 Host: 172.26.143.168:30017 [GIN] 2023/05/22 - 08:52:32 | 500 | 723.024µs | 10.244.0.1 | GET "/plugins/sonarqube/connections/1/search-remote-scopes?page=1&pageSize=10" Accept: application/json Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh-HK;q=0.9,zh;q=0.8,en;q=0.7 Connection: keep-alive Cookie: XSRF-TOKEN=bj22avettqeln2u4dfeckbtjtl; JWT-SESSION=eyJhbGciOiJIUzI1NiJ9.eyJsYXN0UmVmcmVzaFRpbWUiOjE2ODQ3NDQ2OTI4MDAsInhzcmZUb2tlbiI6ImJqMjJhdmV0dHFlbG4ydTRkZmVja2J0anRsIiwianRpIjoiQVloQ20tUTZyZXdDeTJuTWtRRWgiLCJzdWIiOiJBWVBCNlJTQTQ5MTFWaV9sRy1WbyIsImlhdCI6MTY4NDc0NDY5MiwiZXhwIjoxNjg1MDAzODkyfQ.2m3yodliP9UwjZD_4gmy8k0iMFOxn_lIqgCd8r0q7Ko Referer: http://172.26.143.168:30017/swagger/index.html User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 runtime error: index out of range [0] with length 0 /usr/local/go/src/runtime/panic.go:113 (0x7fed1fbc5ede) /app/backend/plugins/sonarqube/api/remote.go:87 (0x7fed205fc72a) /app/backend/helpers/pluginhelper/api/remote_api_helper.go:204 (0x7fed206005f7) /app/backend/plugins/sonarqube/api/remote.go:83 (0x7fed205fc7d5) /app/backend/server/api/router.go:119 (0x1b95d7d) /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168 (0x12a0f61) /go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x12a0f4c) /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168 (0x12a00a6) /go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0x12a0089) /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168 (0x129ef90) /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:555 (0x129ebf8) /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:511 (0x129e731) /usr/local/go/src/net/http/server.go:2947 (0xf437ab) /usr/local/go/src/net/http/server.go:1991 (0xf3e4e6) /usr/local/go/src/runtime/asm_amd64.s:1594 (0xb187a0) ``` ### What do you expect to happen Shoud return a list of sonarqube projects, like remote-scope api does, which proved the source configuration is fine. ### How to reproduce Request GET /plugins/sonarqube/connections/1/search-remote-scopes?page=1&pageSize=10 ### Anything else _No response_ ### Version v0.17.0-cloud-service-3-57-g7c013616 ### Are you willing to submit PR? - [X] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
