Broken Server Behavior on Automatic CI disable

It appears that there is a server side error that is preventing the disabling of automactic CI.

I have included all available information. This is all I know

  • GitHub
  • AppVeyor
  • sonar-scanner -D"sonar.projectKey=NxSys_library.clients-brex" -D"sonar.organization=nxsys" -D"sonar.projectVersion=%APPVEYOR_BUILD_VERSION%" -D"sonar.projectBaseDir=%APPVEYOR_BUILD_FOLDER%" -D"sonar.buildString=%APPVEYOR_BUILD_ID%" -D"sonar.host.url=https://sonarcloud.io" -D"sonar.login=b28706bc660ef44e28f99592a3e3284a6723bf8c"
  • PHP
  • https://sonarcloud.io/project/overview?id=NxSys_library.clients-brex
  • Headers (dumped as curl cmd)
curl 'https://sonarcloud.io/api/autoscan/activation' \
  -H 'Accept: application/json' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Cookie: XSRF-TOKEN=abf3jidvhce6ekpn5gu32s4udv; _gid=GA1.2.1539779264.1678098006; _ga=GA1.1.728341674.1677930909; JWT-SESSION=eyJhbGciOiJIUzI1NiJ9.eyJsYXN0UmVmcmVzaFRpbWUiOjE2NzgxOTAzODU5NTAsInhzcmZUb2tlbiI6ImFiZjNqaWR2aGNlNmVrcG41Z3UzMnM0dWR2IiwianRpIjoiQVlhc2Vkb2VuSzktSFpZQXJqbTAiLCJzdWIiOiJPTlhNYWludGFpbmVyQGdpdGh1YiIsImlhdCI6MTY3NzkzMDkxMiwiZXhwIjoxNjc4Mjc2Nzg1fQ.tyGj8vEe5vuZkOBiC0b08IjSE4GQXjSzEVUk8a9Tjro; _ga_3BQP5VHE6N=GS1.1.1678190385.6.1.1678190449.0.0.0' \
  -H 'Origin: https://sonarcloud.io' \
  -H 'Referer: https://sonarcloud.io/project/analysis_method?id=NxSys_library.clients-brex' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0' \
  -H 'X-XSRF-TOKEN: abf3jidvhce6ekpn5gu32s4udv' \
  -H 'sec-ch-ua: "Opera GX";v="95", "Chromium";v="109", "Not;A=Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  --data-raw 'enable=false&projectKey=NxSys_library.clients-brex' \
  --compressed
  • Response
HTTP/1.1 500
Date: Tue, 07 Mar 2023 12:00:58 GMT
Content-Type: application/json
Content-Length: 76
Connection: keep-alive

{"errors":[{"msg":"An unexpected error occurred. Please try again later."}]}
(anonymous) @ https://sonarcloud.io/app-e4b7fe65b3a133abd980.js:2
t.submit @ https://sonarcloud.io/app-e4b7fe65b3a133abd980.js:2
(anonymous) @ https://sonarcloud.io/app-e4b7fe65b3a133abd980.js:2
C @ https://sonarcloud.io/app-e4b7fe65b3a133abd980.js:2
i @ https://sonarcloud.io/26-a20a0cfb92dacfc2aec7.js:2
(anonymous) @ https://sonarcloud.io/91-3d6836fa04ba9212e767.js:1
ua @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Vo @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Wi @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Eu @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
ku @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
wu @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
du @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
(anonymous) @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
t.unstable_runWithPriority @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Wl @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Bl @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
$l @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Fe @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
Yt @ https://sonarcloud.io/framework-570ac2d18a088daeddd0.js:2
r @ https://sonarcloud.io/app-e4b7fe65b3a133abd980.js:2

CI Log

INFO: Scanner configuration file: C:\Tools\sonar-scanner-4.8.0.2856-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.8.0.2856
INFO: Java 11.0.17 Eclipse Adoptium (64-bit)
INFO: Windows Server 2019 10.0 amd64
INFO: User cache: C:\Users\appveyor\.sonar\cache
INFO: Analyzing on SonarCloud
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=728ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: C:\Users\appveyor\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=628ms
INFO: Load/download plugins (done) | time=6077ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'AppVeyor'
INFO: Load project settings for component key: 'NxSys_library.clients-brex'
INFO: Load project settings for component key: 'NxSys_library.clients-brex' (done) | time=628ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 15.623s
INFO: Final Memory: 7M/27M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: You are running CI analysis while Automatic Analysis is enabled. Please consider disabling one or the other.
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
Command exited with code 1

Hello @onx
Welcome to our community!

After examining the logs I realized that the reason for the problem is that the project’s organization is not bound. (See here for more information about a bound organization)

Probably this is because you uninstalled the SonarCloud App on GitHub for your organization. If you reinstall it, the problem will go away.

We are considering removing this check for Autoscan deactivation. But until we make the change, you can reinstall the SC application for the relevant organization.

1 Like

Hi Serhat,

Ty so much for picking up this case.
It appears that the application is already installed… It was (re?) installed 2 months ago.

I will remove and attempt to re-add it.
-Chris

1 Like

Success!
image

Thank you very much for fixing this.

+1 for removing this check for autoscan deactivation.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.