dropbox/dropbox-sdk-obj-c

Crash while integrating DropBox SDK . Xcode build system has crashed. Please close and reopen your workspace

Opened this issue · 8 comments

Xcode crashes while integrating DropBox ObjC SDK .The Xcode build system has crashed. Please close and reopen your workspace. Command c failed with a nonzero exit code I googled and did following steps.

  1. Deintegrate pods, remove workspace delete pod.lock file and again install pods
  2. Delete drive data and clean and again start
  3. Quit Xcode and again open
  4. Finally restart OS

But still the issue persists . My XCODE version is 12.0.1 . Did anyone faced this?

Screenshot 2020-12-10 at 7 29 29 PM

@abbiee Thanks for the report. I just gave the SDK a try with Xcode 12.0.1 and this issue doesn't reproduce for me. It does sound like an Xcode issue, as JBishopJr said. Please do try the things they mentioned. Also, there's a similar report here, which indicated updating Cocoapods helped. Please try updating your version of Cocoapods, if you haven't already.

@JBishopJr Thanks for the feedback! I'll pass this along to the team. While it's not currently implemented in the sample app, you can find an example of how to use the updated authorization flow in the documentation here.

@greg-db and @abbiee I am having a similar issue and setting Apple Clang Warnings CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to No (avoiding all the warning messages) seems to workaround the crash occurring in the Xcode build service (This is on macOS 11.1, Xcode 12.3, Dropbox SDK 5.0.3 with Carthage).

I am having same problem using my iOS app. My app build is crashing only when I tried to install on device and archive build. I have tried using Xcode 12, 12.2, 12.3. Xcode compiler is crashing. If I remove #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h> and comment out code using dropbox, it works. I am sure it is causing when using dropbox code. Just including SDK using POD will not cause the problem. As soon as we try to implement dropbox it causes crash in release build. Please help.

@ram1972 We haven't been able to reproduce this issue here, but there are a number of potential solutions mentioned above. Please give those a try if you haven't already.

R4N commented

I've experienced this issue as well. The crash does seems to be an Xcode issue, but I suspect it might be related to the number of warnings generated related to "double-quoted include in framework header "xx.h", expected angle-bracketed instead [-Wquoted-include-in-framework-header]"

Here are the steps in which I reproduced it:

  1. Create a new Xcode project in Xcode 12.5.1, Objective-C, storyboard.
  2. Add Dropbox via Pod, and pod install, then open the workspace.
  3. Add this import to the default ViewController.m #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
  4. Go to the Builds Settings of the Project (or target) and search for CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER and set it to YES (to show Quoted Include in Framework Header warnings).
  5. Attempt to run the project, over 6k warnings are generated from ViewController.m related to double quoted include in framework headers, Xcode build system crashes.

Just as another data point, I've also tried including Dropbox via submodule outside of pods and the same error occurs, so I don't believe it's isolated to cocoa pods.

As mentioned setting the CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to NO suppresses the warnings and prevents the crash from occurring.

@R4N Thanks for sharing this detailed information!

HI all, we've looked investigated and reproduced this issue. While we cannot fix the crash in Xcode itself, to avoid this, for Cocoapods users, we recommend switching to Cocoapods v1.10+ (see this issue for more information), or for non-Cocoapods users, please disable CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER. Thanks!