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

When compiling with Version Xcode 15.4, an error occurs and cannot be compiled #19

Closed
RonghuaHe opened this issue Jul 8, 2024 · 10 comments

Comments

@RonghuaHe
Copy link

When compiling with Version 15.4, an error occurs and cannot be compiled:Command PhaseScriptExecution failed with a nonzero exit code;Could you fix it?

@RonghuaHe RonghuaHe changed the title When compiling with Version 15.4, an error occurs and cannot be compiled When compiling with Version Xcode 15.4, an error occurs and cannot be compiled Jul 8, 2024
@mattmassicotte
Copy link
Contributor

mattmassicotte commented Jul 8, 2024

I'm not seeing a failure myself, and CI is successfully building (mostly) with Xcode 15.4. Can you include the Xcode build output?

Also, which target are you trying to build and for what platform?

@RonghuaHe
Copy link
Author

Could not launch “Chime”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
User Info: {
DVTErrorCreationDateKey = "2024-07-09 14:03:11 +0000";
DVTRadarComponentKey = 968756;
IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}

Could not launch “Chime”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
User Info: {
DVTRadarComponentKey = 968756;
IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}

The operation couldn’t be completed. Launch failed.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launch failed.

Launchd job spawn failed
Domain: NSPOSIXErrorDomain
Code: 153

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "MacBookPro18,1";
"device_osBuild" = "14.5 (23F79)";
"device_platform" = "com.apple.platform.macosx";
"dvt_coredevice_version" = "355.28";
"dvt_mobiledevice_version" = "1643.120.2";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 61;
"operation_errorCode" = 20;
"operation_errorDomain" = IDELaunchErrorDomain;
"operation_errorWorker" = IDELaunchServicesLauncher;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.macosx";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "macosx14.5";
"sdk_osVersion" = "14.5";
"sdk_variant" = macos;
}

System Information

macOS Version 14.5 (Build 23F79)
Xcode 15.4 (22622) (Build 15F31d)

@RonghuaHe
Copy link
Author

2024-07-09.22.19.41.mov

@mattmassicotte
Copy link
Contributor

Ok, the clue we have here is the wording "PhaseScriptExecution failed" in that video. I think one of the build phases is failing, possibly a custom one. Can you check out the build logs from the failing part here:

Screenshot 2024-07-09 at 10 42 10 AM

I also just tried a fresh check out, and followed all the published directions. The build succeeded for me locally.

clone the repo
git submodule update --init --recursive
cp User.xcconfig.template User.xcconfig
update User.xcconfig with your personal information

@RonghuaHe
Copy link
Author

截屏2024-07-10 07 23 07 I just followed the above operation steps and re-operated, but there was still a build error

@RonghuaHe
Copy link
Author

Showing Recent Issues
/Users/ronghuahe/Library/Developer/Xcode/DerivedData/Edit-crkitrsxwzqthlfurzlqmhjrafsc/Build/Intermediates.noindex/Edit.build/Debug/Edit.build/Script-C9E878122A9F563F0018340C.sh: line 2: /Users/ronghuahe/myIOS/iOS: No such file or directory

Showing Recent Issues
Command PhaseScriptExecution failed with a nonzero exit code

@mattmassicotte
Copy link
Contributor

Ok we're getting closer.

"/Users/ronghuahe/myIOS/iOS: No such file or directory"

This path does not appear in the project, so it must be coming from the environment somehow. I bet what is happening is the Edit target's "validate build" step is failing. This relies on being able to execute a shell script on your machine within the Xcode build phases.

Somewhere in that same screen is a smaller red x next to the failing step. If you can find it and select it, you can expand it to see the full output of the step.

Also, just to test. What happens if you run this from your shell?

/bin/sh --version

@RonghuaHe
Copy link
Author

截屏2024-07-10 21 30 17 Thanks for your answer, I have found the cause of the problem. The cause of the problem is that my directory file name has Spaces. After deleting the Spaces, you can build. But now there are two new problems: 1, why I Build, not the previous file navigation bar + editor, but a seemingly no function of the editor? 2, select File -> Open, open the folder is an orange background, and no function?

@mattmassicotte
Copy link
Contributor

Ah, that's the detail I needed. This is indeed a bug! I can reproduce the failure with a fresh check out in a path containing spaces. Looking into that now.

For your (very resonable) follow-up questions, the answer is that this open source version is not functional at the moment. I'm working on it! Right now, the Quick Look extension does work for the languages currently supported. And I'm working right now on expanding that to match the released version #20 .

@mattmassicotte
Copy link
Contributor

Thanks so much both for reporting this and for having the patience to help me debug. I was able to fix up the build phase and this now will work when the repo is at a path with spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants