Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't run Periphery and MobSFScan. #98

Open
2 tasks done
turkcankeskin opened this issue Dec 4, 2024 · 1 comment
Open
2 tasks done

I can't run Periphery and MobSFScan. #98

turkcankeskin opened this issue Dec 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@turkcankeskin
Copy link

turkcankeskin commented Dec 4, 2024

New Issue Checklist

  • Updated the plugin to the latest version
  • I searched for existing GitHub issues

Issue Description

Command executed
Complete output when running sonar-scanner, including the stack trace and command used

Hello,

I am integrating Sonarqube into my iOS project, but when using Periphery, it says that I have to specify --project or --workspace, how can I specify this?

MobSFScan is scanning, I can see it on the console log and I see a json. But then it exits with exit status 1.
at fr.insideapp.sonarqube.apple.mobsfscan.MobSFScanSensor.execute(MobSFScanSensor.java:75)

sonar-scanner -X \
        -Dproject.settings=sonar/sonar.properties  \
        -Dsonar.sources=. \
        -Dsonar.host.url=$SONAR_HOST_URL \
        -Dsonar.token=$SONAR_TOKEN \

sonar.properties

sonar.apple.resultBundlePath=report/Logs/Test/Test.xcresult
sonar.apple.periphery.indexStorePath=report/Index.noindex
sonar.sourceEncoding=UTF-8
2024-12-04T07:58:23.242449Z 01O org.buildobjects.process.ExternalProcessFailureException: External process `periphery` terminated with unexpected exit status 1 after 958ms:
2024-12-04T07:58:23.242453Z 01O   $ periphery scan --skip-build --index-store-path report/Index.noindex --format json --quiet
2024-12-04T07:58:23.242455Z 01O   STDERR: error: You must supply either the --workspace or --project option. If your project uses an .xcworkspace to integrate multiple projects, then supply the --workspace option. Otherwise, supply the --project option.
 
2024-12-04T07:58:37.349347Z 01O 
2024-12-04T07:58:37.349347Z 01O 	at org.buildobjects.process.ProcBuilder.run(ProcBuilder.java:228)
2024-12-04T07:58:37.349348Z 01O 	at fr.insideapp.sonarqube.apple.commons.cli.CommandLineToolRunner.execute(CommandLineToolRunner.java:51)
2024-12-04T07:58:37.349348Z 01O 	at fr.insideapp.sonarqube.apple.commons.cli.SingleCommandLineToolRunner.run(SingleCommandLineToolRunner.java:33)
2024-12-04T07:58:37.349349Z 01O 	at fr.insideapp.sonarqube.apple.commons.cli.StaticSingleCommandLineToolRunner.run(StaticSingleCommandLineToolRunner.java:33)
2024-12-04T07:58:37.349349Z 01O 	at fr.insideapp.sonarqube.apple.mobsfscan.MobSFScanSensor.execute(MobSFScanSensor.java:75)
2024-12-04T07:58:37.349350Z 01O 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
2024-12-04T07:58:37.349351Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
2024-12-04T07:58:37.349351Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
2024-12-04T07:58:37.349352Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
2024-12-04T07:58:37.349352Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
2024-12-04T07:58:37.349353Z 01O 	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
2024-12-04T07:58:37.349353Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349354Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349354Z 01O 	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
2024-12-04T07:58:37.349355Z 01O 	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
2024-12-04T07:58:37.349355Z 01O 	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
2024-12-04T07:58:37.349356Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349356Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349357Z 01O 	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
2024-12-04T07:58:37.349357Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349358Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349358Z 01O 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
2024-12-04T07:58:37.349359Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349359Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349360Z 01O 	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
2024-12-04T07:58:37.349360Z 01O 	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
2024-12-04T07:58:37.349361Z 01O 	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
2024-12-04T07:58:37.349361Z 01O 
2024-12-04T07:58:37.349364Z 01O 10:58:37.348 DEBUG {}
2024-12-04T07:58:37.349364Z 01O com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
2024-12-04T07:58:37.349364Z 01O  at [Source: (String)""; line: 1, column: 0]
2024-12-04T07:58:37.349365Z 01O 	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
2024-12-04T07:58:37.349365Z 01O 	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4765)
2024-12-04T07:58:37.349366Z 01O 	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4667)
2024-12-04T07:58:37.349366Z 01O 	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
2024-12-04T07:58:37.349367Z 01O 	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597)
2024-12-04T07:58:37.349367Z 01O 	at fr.insideapp.sonarqube.apple.mobsfscan.parser.MobSFScanReportParser.perform(MobSFScanReportParser.java:49)
2024-12-04T07:58:37.349368Z 01O 	at fr.insideapp.sonarqube.apple.commons.parser.ReportListParser.parse(ReportListParser.java:38)
2024-12-04T07:58:37.349368Z 01O 	at fr.insideapp.sonarqube.apple.commons.parser.ReportListParser.parse(ReportListParser.java:27)
2024-12-04T07:58:37.349369Z 01O 	at fr.insideapp.sonarqube.apple.mobsfscan.MobSFScanSensor.execute(MobSFScanSensor.java:76)
2024-12-04T07:58:37.349369Z 01O 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
2024-12-04T07:58:37.349370Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
2024-12-04T07:58:37.349370Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
2024-12-04T07:58:37.349371Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
2024-12-04T07:58:37.349371Z 01O 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
2024-12-04T07:58:37.349372Z 01O 	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
2024-12-04T07:58:37.349372Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349373Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349373Z 01O 	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
2024-12-04T07:58:37.349374Z 01O 	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
2024-12-04T07:58:37.349374Z 01O 	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
2024-12-04T07:58:37.349375Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349375Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349376Z 01O 	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
2024-12-04T07:58:37.349376Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349377Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349377Z 01O 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
2024-12-04T07:58:37.349378Z 01O 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-12-04T07:58:37.349378Z 01O 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-12-04T07:58:37.349379Z 01O 	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
2024-12-04T07:58:37.349379Z 01O 	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
2024-12-04T07:58:37.349382Z 01O 	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
2024-12-04T07:58:37.349382Z 01O 
2024-12-04T07:58:37.349382Z 01O 10:58:37.348 INFO  Parsed 0 MobSF issue(s)
2024-12-04T07:58:37.349383Z 01O 10:58:37.348 INFO  Mapped to 0 value(s)
2024-12-04T07:58:37.349383Z 01O 10:58:37.348 INFO  Sensor MobSFScan Sensor [sonarapple] (done) | time=14091ms
 

Environment

 MacOs 15.1.1, Xcode16, Sonarqube 10.7, Sonar-Apple 0.4.1
@turkcankeskin turkcankeskin added the bug Something isn't working label Dec 4, 2024
@gaelfoppolo
Copy link
Contributor

Hi @turkcankeskin,

For Periphery, you need to create a .periphery.yml and provide the value for the project or workspace, schemes and targets. Example:

schemes:
- MyScheme
targets:
- MyTarget
workspace: MyProject.xcworkspace

You will for documentation on that in Periphery documentation.

Regarding MobSFScan, Can you run the command yourself and check the result?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants