DroidsOnRoids / bitrise-step-sonarqube-scanner

Step for running SonarQube Scanner CLI
MIT License
6 stars 19 forks source link

Timeout on Xcode 12.5.x stack #18

Closed tombates-pdr closed 3 years ago

tombates-pdr commented 3 years ago

Latest Xcode builds seem to just hang at this stage until it times out and doesn't actually run the scan. I have no idea where to begin, but the same build runs without the Sonar step just fine.

+ wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472.zip
--2021-05-12 13:39:01--  https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472.zip
Resolving binaries.sonarsource.com (binaries.sonarsource.com)... 91.134.125.245
Connecting to binaries.sonarsource.com (binaries.sonarsource.com)|91.134.125.245|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 589299 (575K) [application/zip]
Saving to: ‘sonar-scanner-cli-4.6.2.2472.zip’
     0K .......... .......... .......... .......... ..........  8%  169K 3s
    50K .......... .......... .......... .......... .......... 17%  342K 2s
   100K .......... .......... .......... .......... .......... 26% 40.6M 1s
   150K .......... .......... .......... .......... .......... 34%  342K 1s
   200K .......... .......... .......... .......... .......... 43% 32.2M 1s
   250K .......... .......... .......... .......... .......... 52% 22.4M 1s
   300K .......... .......... .......... .......... .......... 60% 5.95M 0s
   350K .......... .......... .......... .......... .......... 69% 13.3M 0s
   400K .......... .......... .......... .......... .......... 78%  334K 0s
   450K .......... .......... .......... .......... .......... 86% 4.70M 0s
   500K .......... .......... .......... .......... .......... 95% 4.30M 0s
   550K .......... .......... .....                           100% 8.37M=0.8s
2021-05-12 13:39:03 (739 KB/s) - ‘sonar-scanner-cli-4.6.2.2472.zip’ saved [589299/589299]
+ unzip sonar-scanner-cli-4.6.2.2472.zip
Archive:  sonar-scanner-cli-4.6.2.2472.zip
   creating: sonar-scanner-4.6.2.2472/
   creating: sonar-scanner-4.6.2.2472/bin/
   creating: sonar-scanner-4.6.2.2472/conf/
   creating: sonar-scanner-4.6.2.2472/lib/
  inflating: sonar-scanner-4.6.2.2472/bin/sonar-scanner.bat  
  inflating: sonar-scanner-4.6.2.2472/bin/sonar-scanner-debug.bat  
  inflating: sonar-scanner-4.6.2.2472/bin/sonar-scanner-debug  
  inflating: sonar-scanner-4.6.2.2472/bin/sonar-scanner  
  inflating: sonar-scanner-4.6.2.2472/conf/sonar-scanner.properties  
  inflating: sonar-scanner-4.6.2.2472/lib/sonar-scanner-cli-4.6.2.2472.jar  
++ pwd
+ TEMP_DIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/tmp.IawPVMxk
+ popd
~/git
+ [[ true == \t\r\u\e ]]
+ debug_flag=-X
+ /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/tmp.IawPVMxk/sonar-scanner-4.6.2.2472/bin/sonar-scanner -X
timeout after 5400 seconds
aunghtoo-codigo commented 3 years ago

I'm facing same issue. Any update on this?

koral-- commented 3 years ago

It does not seem to be caused by the step itself. Will forward this issue to bitrise team.

FTR: issue #15137 on zendesk

tombates-pdr commented 3 years ago

Thanks @koral-- I had initially raised it to them but was told to come here. I was worried that I might get sent in circles.

My zendesk ref: #14651

tombates-pdr commented 3 years ago

Bitrise has now agreed to me that it does seem to be their end. I assume they are looking into it

renanvs commented 3 years ago

I'm still facing this issue. Where do you report bugs to bitrise team? tks

koral-- commented 3 years ago

@renanvs here is the report form: https://support.bitrise.io/hc/en-us/requests/new

I'll keep this issue open until underlying Bitrise support request is open.

d4rkd3v1l commented 3 years ago

As this is still an issue, I decided to also file an issue to bitrise (maybe this creates some more pressure on their side to fix it). Zendesk ref: #15412

tombates-pdr commented 3 years ago

I got a message from Bitrise yesterday, saying they thought the issue had resolved itself. Unfortunately, it doesn't seem to have resolved for me 😞

zocario commented 3 years ago

Hi, we're facing same issue.. I've also created a ticket on Bitrise but they previously told me it was an issue on the step not on their side. Maybe they'll change their mind 🙏

tombates-pdr commented 3 years ago

@zocario They have said to me after originally saying it was the step's issue that they think it is in fact their end. I don't think they know the root cause of the issue, but sounds like they managed to get a test project passing the other day, my job is still just hanging though. I messaged back yesterday to tell them it still wasn't resolved for my project.

Given that they don't know the root cause yet, it is going to make it one of those really annoying issues to fix.

zocario commented 3 years ago

I just had an answer from bitrise @tombates-pdr it appears the problem was the script step I use for the jdk installation:

I was using system instead of version 11, updating this code:

#!/usr/bin/env bash
jenv global system
export JAVA_HOME="$(jenv prefix)"
envman add --key JAVA_HOME --value "$(jenv prefix)"

To this one fixed the issue I had on my pull request:

#!/usr/bin/env bash
jenv global 11
export JAVA_HOME="$(jenv prefix)"
envman add --key JAVA_HOME --value "$(jenv prefix)"

Hope this can help :)

ofalvai commented 3 years ago

Hello everyone, Oliver from Bitrise here.

We have found the root cause and it's not related to any step at all. The problem only happens when the build is run on the Xcode 12.5 stack AND a previous step installs JDK11 on the VM. The root cause is that the existing JDK upgrade script we recommend here is not compatible with macOS Big Sur.

We have pushed an update to our docs with an updated JDK11 script, but the short version is that you have to replace jenv global system with jenv global 11 in your script step.

koral-- commented 3 years ago

OK, so I'm closing this ticket as it is not a step issue. I'll update step description to mention this change.