ChimeHQ / Chime

An editor for macOS
https://www.chimehq.com
BSD 3-Clause "New" or "Revised" License
300 stars 14 forks source link

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

Closed RonghuaHe closed 2 months ago

RonghuaHe commented 2 months ago

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?

mattmassicotte commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

https://github.com/ChimeHQ/Chime/assets/34976742/5df0b165-2a7f-4934-b499-4520e89de362

mattmassicotte commented 2 months ago

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 commented 2 months ago
截屏2024-07-10 07 23 07

I just followed the above operation steps and re-operated, but there was still a build error

RonghuaHe commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago
截屏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 commented 2 months ago

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 commented 2 months ago

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.