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

Facebook-SDK-Swift Carthage Caught signal triggered by the Swift runtime! #2099

Closed
shubhamcalritus opened this issue Aug 4, 2017 · 20 comments
Labels

Comments

@shubhamcalritus
Copy link

  • carthage version: 0.24
  • xcodebuild -version: 8.3.3
  • Are you using --no-build? NO
  • Are you using --no-use-binaries? NO
  • Are you using --use-submodules? NO
  • Are you using --cache-builds? NO

Cartfile

<YOUR CARTFILE>

github "facebook/Facebook-SDK-Swift"

Carthage Output

<OUTPUT>

*** Fetching Facebook-SDK-Swift
*** Fetching facebook-ios-sdk
*** Fetching Bolts-ObjC
*** Checking out Bolts-ObjC at "1.8.4"
*** Checking out Facebook-SDK-Swift at "0.2.0"
*** Downloading facebook-ios-sdk.framework binary at "4.25.0"
*** Checking out facebook-ios-sdk at "sdk-version-4.25.0"
*** xcodebuild output can be found in /var/folders/k3/nwpj0kfj5kq7mx7kjvqdhzh80000gp/T/carthage-xcodebuild.IAwJDh.log
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "FBSDKCoreKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKLoginKit-Dynamic" in FacebookSDK.xcworkspace

Caught signal triggered by the Swift runtime!
Illegal instruction

Unfortunately, this is probably a bug in Swift and not Carthage. If
this is preventing you from doing work, please file an issue and we'll
do our best to work around it:
https://github.com/Carthage/Carthage/issues/new

Please also consider filing a radar with Apple, containing the version
of Carthage and any crash report found in Console.app.


Caught signal triggered by the Swift runtime!
Illegal instruction
Illegal instruction: 4

@thomasneuteboom
Copy link

Same issue! +1

@jdhealy
Copy link
Member

jdhealy commented Aug 5, 2017

@thomasneuteboom is there a crash report in Console.app that you could post?

@joseantsm
Copy link

Same issue here! +1

@MartinBergerDX
Copy link

MartinBergerDX commented Aug 14, 2017

Same here.

command was:
carthage update --platform ios

Here is report from console.app:

carthage_2017-08-14-105327_iOS-MacBook-Pro.txt

@gaplo917
Copy link

+1

@ikesyo
Copy link
Member

ikesyo commented Aug 16, 2017

Please don't leave +1, that will not be any help.

@hitolaus
Copy link

I have the same issue with the same configuration as the reporter

carthage version: 0.24
xcodebuild -version: 8.3.3 (Build version 8E3004b)
Are you using --no-build? NO
Are you using --no-use-binaries? NO
Are you using --use-submodules? NO
Are you using --cache-builds? NO

Cartfile

github "facebook/Facebook-SDK-Swift"

Carthage Output

*** Fetching Facebook-SDK-Swift
*** Fetching facebook-ios-sdk
*** Fetching Bolts-ObjC
*** Checking out Facebook-SDK-Swift at "0.2.0"
*** Checking out Bolts-ObjC at "1.8.4"
*** Downloading facebook-ios-sdk.framework binary at "4.25.0"
*** Checking out facebook-ios-sdk at "sdk-version-4.25.0"
*** xcodebuild output can be found in /var/folders/ft/n2d0vrjs7zz_1_k0_h3dh5mh0000gn/T/carthage-xcodebuild.lmjq3d.log
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "FBSDKCoreKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKLoginKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKLoginKit-Dynamic" in FacebookSDK.xcworkspace

Caught signal triggered by the Swift runtime!
Illegal instruction

Unfortunately, this is probably a bug in Swift and not Carthage. If
this is preventing you from doing work, please file an issue and we'll
do our best to work around it:
https://github.com/Carthage/Carthage/issues/new

Please also consider filing a radar with Apple, containing the version
of Carthage and any crash report found in Console.app.

<caught signal... keeps repeating>

@jobnte
Copy link

jobnte commented Aug 25, 2017

Same here, please any fix?

@thomasneuteboom
Copy link

thomasneuteboom commented Aug 25, 2017

I have no idea why, but I switched Carthage versions back and forth (and deleted /DerivedData folder) and got it to successfully compile. It may not be working for you, but it's worth a shot!

Console Output

Macbook:ios-app thomasneuteboom$ brew switch carthage 0.24.0
Cleaning /usr/local/Cellar/carthage/0.18.1
Cleaning /usr/local/Cellar/carthage/0.20.1
Cleaning /usr/local/Cellar/carthage/0.21.0
Cleaning /usr/local/Cellar/carthage/0.22.0
Cleaning /usr/local/Cellar/carthage/0.23.0
Cleaning /usr/local/Cellar/carthage/0.24.0
8 links created for /usr/local/Cellar/carthage/0.24.0
Macbook:ios-app thomasneuteboom$ carthage build --platform iOS
*** xcodebuild output can be found in /var/folders/rw/f4q9zjh91djdykrf6sm8z0n40000gn/T/carthage-xcodebuild.l96R9d.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "FBSDKCoreKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKLoginKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKLoginKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKShareKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FacebookCore" in FacebookSwift.xcworkspace
*** Building scheme "FacebookShare" in FacebookSwift.xcworkspace
*** Building scheme "FacebookLogin" in FacebookSwift.xcworkspace
*** Building scheme "RxBlocking-iOS" in Rx.xcworkspace
*** Building scheme "RxTests-iOS" in Rx.xcworkspace
*** Building scheme "RxCocoa-iOS" in Rx.xcworkspace
*** Building scheme "RxSwift-iOS" in Rx.xcworkspace
*** Building scheme "SwiftyJSON iOS" in SwiftyJSON.xcworkspace

1. Clean /DerivedData folder

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

2. Switch version brew

brew switch carthage 0.24.0

3. Used build command

carthage build --platform iOS

It may have something to do with cleaning?

@jobnte
Copy link

jobnte commented Aug 25, 2017

I don;t think so, tried with the same commands and still not wokring

@thomasneuteboom
Copy link

Try removing /DerivedData folder before switching.

@pcantrell
Copy link
Contributor

Removing all derived data and using carthage 0.24.0, I still get the same problem.

@pcantrell
Copy link
Contributor

pcantrell commented Aug 30, 2017

Contra #1844, Carthage 0.18.1 doesn’t work either.

The Facebook SDK does build with CocoaPods.

@jdhealy
Copy link
Member

jdhealy commented Aug 31, 2017

Solution

In facebook-ios-sdk, schemes FBSDKLoginKit-Dynamic.xcscheme and FBSDKLoginKit-Universal.xcscheme both exist in FBSDKLoginKit.xcodeproj/xcshareddata/xcschemes and erroneously FBSDKPlacesKit.xcodeproj/xcshareddata/xcschemes.

If the files (and therefore schemes) are renamed in FBSDKPlacesKit.xcodeproj/xcshareddata/xcschemes, Carthage will no longer signal on unwrapping the nil value asserted here when Building scheme "FBSDKLoginKit-Dynamic" in FacebookSDK.xcworkspace. Carthage should probably precondition check for that nil value, knowing now it affects end-users.

Someone with a Facebook account (not myself 😅) can file a bug for this with Facebook at https://developers.facebook.com/bugs/ and, maybe, invite them to kindly post updates here on this Carthage issue.

Beyond the scheme naming issue, something else was preventing me from compiling facebook-ios-sdk at tag "sdk-version-4.26.0", but, again, file Facebook bugs at https://developers.facebook.com/bugs/.

@mdiep
Copy link
Member

mdiep commented Aug 31, 2017

Awesome debugging, @jdhealy! 🕵️

I think it'd be great if we could print a warning for this instead of crashing.

@zirinisp
Copy link

I would also love to see a warning that gives some direction on what is happening.

Do you have any news on this one as I still get the error?

@MartinBergerDX
Copy link

@zirinisp I couldn't resolve this so i switched to Cocoa Pods..
My project uses bunch of google frameworks, and all of them are supported by Cocoa Pods, suprisingly not by Carthage.
Defeated :(

@zirinisp
Copy link

@MartinBergerDX Thank you for the reply. I will probably do the same. I also use cocoapods for GoogleMaps.

The thing I like with Carthage is that it precompiles everything and gives me fast Xcode compile times on my project. With cocoa pods, it was taking ages for my project to compile. I am not sure if this has changed though.

@scurioni
Copy link

Same here... deleting derivedData and switching carthage versions did not fix it for me. I'm trying to avoid switching to cocoapods. No hope of having this fixed?

@stale
Copy link

stale bot commented Jun 30, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 30, 2018
@stale stale bot closed this as completed Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests