plcrashreporter icon indicating copy to clipboard operation
plcrashreporter copied to clipboard

Xcode 16 beta 2 build issue

Open xuzhaocheng opened this issue 1 year ago • 7 comments

Description

When I use Xcode 16 beta 2 to build the target "CrashReporter iOS Framework", it fails immediately with an error:

error: unexpected service error: The Xcode build system has crashed. Build again to continue.

Repro Steps

Please list the steps used to reproduce your issue.

  1. Open project with Xcode 16 beta 2
  2. Select target "CrashReporter iOS Framework"
  3. Build

Details

  1. Which SDK version are you using? iOS 18
  2. Which OS version did you experience the issue on? macOS 14.5
  3. Which CocoaPods/Carthage/Xcode version are you using? Carthage
  4. What device version did you see this error on? Were you using an emulator or a physical device?
  5. What language are you using?
    • [x] Objective C
    • [ ] Swift
  6. What third party libraries are you using?

xuzhaocheng avatar Jul 03 '24 09:07 xuzhaocheng

Hello and thank you for reaching out to us! It appears this bug originates from Xcode 16 beta 2. Some users with previous versions of Xcode have found that clearing the cache and deleting the DerivedData folder can help resolve the issue:

cd ~/Library/Developer/Xcode
rm -rf DerivedData

Please try this and let us know if it helps. If it doesn't resolve the issue, we may need to wait for an official fix from Xcode team.

MikhailSuendukov avatar Jul 08 '24 17:07 MikhailSuendukov

Hello and thank you for reaching out to us! It appears this bug originates from Xcode 16 beta 2. Some users with previous versions of Xcode have found that clearing the cache and deleting the DerivedData folder can help resolve the issue:

cd ~/Library/Developer/Xcode
rm -rf DerivedData

Please try this and let us know if it helps. If it doesn't resolve the issue, we may need to wait for an official fix from Xcode team.

Thanks for your reply! I tried to delete the DerivedData and rebuild it, but I still got the same error.

xuzhaocheng avatar Jul 29 '24 03:07 xuzhaocheng

This issue is still reproducible with Xcode 16 beta 4. However, importing PLCrashReporter into your project continues to work correctly. We will wait for the Xcode updates for further investigation.

MikhailSuendukov avatar Aug 05 '24 11:08 MikhailSuendukov

I also came across this crash and discovered for my purposes I could work around the problem by removing PLCrashReport.pb-c.c from targets. It doesn't seem to impact my ability to build and build the Mac crash reporter as a library, at least. I filed a bug with Apple: FB13955896, back in June :( no progress yet...

danielpunkass avatar Aug 11 '24 19:08 danielpunkass

Hi @danielpunkass, could you please share the link to your bug report?

MikhailSuendukov avatar Sep 18 '24 10:09 MikhailSuendukov

@MikhailSuendukov because it's bug I filed with Apple's Feedback Reporter, there is no public link for it.

danielpunkass avatar Sep 19 '24 15:09 danielpunkass

Okay, thank you, then we'll wait for news.

MikhailSuendukov avatar Sep 23 '24 13:09 MikhailSuendukov

@xuzhaocheng , @danielpunkass , the fix is merged. Please let me know if it works for you.

DmitriyKirakosyan avatar Nov 14 '24 10:11 DmitriyKirakosyan

@DmitriyKirakosyan The crash does seem to be fixed, but I'm seeing a new warning:

warning: no rule to process file '/Users/daniel/Sources/PLCrashReporter/Source/PLCrashReport.proto' of type 'sourcecode.protobuf' for architecture 'arm64' (in target 'CrashReporter macOS' from project 'CrashReporter')

danielpunkass avatar Nov 14 '24 17:11 danielpunkass

@DmitriyKirakosyan It looks like you are now checking in a pre-built copy of the built proto file? In that case I think the warning can be eliminated simply by removing the PLCrashReporter.proto file from the Compile Sources phase in all targets.

danielpunkass avatar Nov 14 '24 17:11 danielpunkass

Also note that with the .proto custom build rule removed, the test targets will not be able to build the PLCrashLogWriterEncodingTests.proto source file, either. Maybe you need to check in some built copies of those, too?

danielpunkass avatar Nov 14 '24 18:11 danielpunkass

@danielpunkass Thank you for your feedback! We have prepared a pull request where the .proto files have been removed from the list of source files included in the build.

MikhailSuendukov avatar Dec 05 '24 13:12 MikhailSuendukov

Any plan for when these fixes will be released?

Hello, and thank you for reaching out to us! Could you please clarify the specific project configuration in which you need to build PLCrashReporter yourself? If you're looking for the source code with the fixed error, you can now access it on the master branch.

MikhailSuendukov avatar Dec 16 '24 12:12 MikhailSuendukov

@MikhailSuendukov Thank you for your response. I use the GitHub repository microsoft/appcenter-sdk-apple in my project via Carthage. Unfortunately, the latest release is causing crashes in my application.

Could you kindly publish a new version that includes the fixes from the master branch? This would help resolve the issue and ensure the stability of the project.

Hi, I wasn’t able to reproduce this error when importing appcenter-sdk-apple using Carthage. Could you please provide a small demo project where this issue occurs, along with the detailed steps to reproduce it? Additionally, it would be helpful if you could share more information about your project setup and environment, such as your macOS version, Xcode version, appcenter-sdk-apple version and Carthage configuration. This information will help us investigate the issue and resolve it more quickly. Thank you!

MikhailSuendukov avatar Dec 21 '24 15:12 MikhailSuendukov

I would also like to ask you if you can use AppCenter Apple SDK from develop branch?

MikhailSuendukov avatar Dec 24 '24 15:12 MikhailSuendukov

@MikhailSuendukov, I have added a sample demo zip file for the app center crash issue while installing Carthage. Please check it.

  • Mac OS version: 14.6.1
  • Xcode version: 16.0
  • appcenter-sdk-apple version: 5.0.4
  • Carthage Version: 0.40.0

Carsh log while installing Carthage

`DemoAppCenter % carthage update --use-xcframeworks --platform iOS *** Checking out appcenter-sdk-apple at "5.0.4" *** xcodebuild output can be found in /var/folders/_3/1ygsddwd6hj7jbpm2gh8hlc80000gq/T/carthage-xcodebuild.nXOi2q.log *** Skipped downloading appcenter-sdk-apple binary due to the error: "API rate limit exceeded for 14.99.102.226. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)" *** Building scheme "AppCenterAnalytics iOS Framework" in AppCenter.xcworkspace *** Building scheme "AppCenter iOS Framework" in AppCenter.xcworkspace *** Building scheme "AppCenterCrashes iOS Framework" in AppCenter.xcworkspace Build Failed Task failed with exit code 65: /usr/bin/xcrun xcodebuild -workspace /Users/yagnik/Downloads/Documents/Projects/DemoAppCenter/Carthage/Checkouts/appcenter-sdk-apple/AppCenter.xcworkspace -scheme AppCenterCrashes\ iOS\ Framework -configuration Release -derivedDataPath /Users/yagnik/Library/Caches/org.carthage.CarthageKit/DerivedData/16.0_16A242d/appcenter-sdk-apple/5.0.4 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= SUPPORTS_MACCATALYST=NO CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/_3/1ygsddwd6hj7jbpm2gh8hlc80000gq/T/appcenter-sdk-apple SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/yagnik/Downloads/Documents/Projects/DemoAppCenter/Carthage/Checkouts/appcenter-sdk-apple)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/_3/1ygsddwd6hj7jbpm2gh8hlc80000gq/T/carthage-xcodebuild.nXOi2q.log`

DemoAppCenter.zip

YagnikBavishi04 avatar Dec 30 '24 10:12 YagnikBavishi04

Hello, I attempted to reproduce the command carthage update --use-xcframeworks --platform iOS on your demo project, and I was unable to reproduce the error. The output of the command in my case appears as follows:

DemoAppCenter % carthage update --use-xcframeworks --platform iOS
*** Checking out appcenter-sdk-apple at "5.0.4"
*** xcodebuild output can be found in /var/folders/kk/4gmtws752y1g5r6f5_y5v83r0000gn/T/carthage-xcodebuild.MqAmaA.log
*** Downloading appcenter-sdk-apple binary at "5.0.4"

It’s possible that the issue is related to your environment or the Carthage cache. I recommend trying the following steps:

  1. Clear the Carthage cache: Run rm -rf ~/Library/Caches/org.carthage.CarthageKit to remove the cache and try running the command again.
  2. Reinstall Carthage: If clearing the cache doesn’t resolve the issue, consider reinstalling Carthage to ensure your setup is clean.

I also noticed an error with you

Skipped downloading appcenter-sdk-apple binary due to the error:
"API rate limit exceeded for 14.99.102.226. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"

Perhaps your issue may also be related to it.

MikhailSuendukov avatar Jan 03 '25 13:01 MikhailSuendukov