Facebook SDK 7.9.0 Builds locally but not via Cloud Build

Description of the issue:

I’ve imported Facebook SDK 7.9.0 into the project, and cannot get it to build either for Android or IOS. It seems to compile ok, I get no errors within Unity and no errors when exporting the project to Xcode. Xcode also builds the project successfully with no errors.

I’ve set the -fno-objc-arc compile flag for FBUnityInterface.h and .mm as advised by an older thread but this hasn’t made any difference.

Unity Version: 5.5
XCode version: 8.0
Source control: Git via BitBucket

Local build platform: Unity 5.5, Xcode 8.0

Build target: iOS and Android (currently building to a separate branch called IOS_EXPERIMENTAL until cloud build issues are resolved)

Relevant plugins: Facebook SDK 7.9.0
(Also installed: MoPub, Google Play Games Services (NO_GPGS is set for iOS builds), Playfab)

Project Name: PuzzlerNameGame

Build log (relevant):

18718: ! Unity player export failed!
18719: ! build of ‘ios_experimental’ failed. compile failed
18720: Publishing build 5 of puzzlerredhill/namegame for target ‘ios_experimental’…
18721: publishing finished successfully.
18722: uninstalling iOS credentials for puzzlerredhill/namegame - ios_experimental
18723: MAC verified OK
18724: Removing certificate…
18725: removing: /BUILD_PATH/Library/MobileDevice/Provisioning Profiles/b7ce89e6-361c-4017-a0eb-bbca8346b695.mobileprovision
18726: done.
18727: Build step ‘Execute shell’ marked build as failure
18728: postbuildstatus finished successfully.
18729: Finished: FAILURE

There doesn’t seem to be any other errors that I can find in the build log.

Does it build locally from a fresh checkout?: Yes, it builds to the device with no errors.

Looks more like an intermittent cloud build error than something related to the Facebook SDK.

At first I thought so too, but it’s very reliably caused by adding the Facebook SDK.

I add it, it does not build. I revert that commit, it builds. And it’ll do this reliably several times in a row.

I’m having similar issues with Fabric SDK and with MoPub’s adapters for Chartboost and Admob, but one thing at a time I guess.

Did you show the full build log above? or is this the shorter one? please post the full log. maybe it contains more hints as to what’s going on.

Huh. weirdly, I was all set to go “Yes I’ve checked that a hundred times” so I thought I’d check the Compact Log just to see if it shows me anything different.

Turns out, in this instance (although not in others, in particular with Chartboost) it actually shows more information than the Full Log. Which I don’t understand.

Compact Log:

977: [Unity] Exception: [Fabric] Twitter requires iOS 7+. Please change the Target iOS Version in Player Settings to iOS 7 or higher.
978: [Unity] at Fabric.Internal.Editor.Utils.Error (System.String format, System.Object[ ] list) [0x00012] in /BUILD_PATH/puzzlerredhill.namegame.ios-stage/NameGamePrototype/Assets/Fabric/Editor/FabricUtils.cs:23
979: [Unity] UnityEngine.Debug:LogWarning(Object)
980: ! build of ‘ios-stage’ failed. compile failed
981: publishing finished successfully.
982: Finished: FAILURE

Full Log:

9592: ! Unity player export failed!
9593: ! build of ‘ios-stage’ failed. compile failed
9594: Publishing build 224 of puzzlerredhill/namegame for target ‘ios-stage’…
9595: publishing finished successfully.
9596: uninstalling iOS credentials for puzzlerredhill/namegame - ios-stage
9597: MAC verified OK
9598: Removing certificate…
9599: removing: /BUILD_PATH/Library/MobileDevice/Provisioning Profiles/2f99f265-dab9-43ea-aff6-214488eb034e.mobileprovision
9600: done.
9601: Build step ‘Execute shell’ marked build as failure
9602: postbuildstatus finished successfully.
9603: Finished: FAILURE

At least I have something to go on now, cheers for giving me the idea to check the compact log. I’ve set the minimum IOS version up from 6.0 to 7.0 based on the error message shown in the compact log, fingers cross that works, at least that’ll be Twitter out of the way then.

it could be that one library is throwing an exception that breaks the build… anyways - please report how it went this time.

It builds successfully for IOS now, thankfully.

I wonder why that error showed up in the Compact log but not the Full one? Weird.

Maybe the compact log will have something to say about my issues building with the Facebook and Chartboost SDK’s too.

Good to hear. no idea about the different log types, they do some filtering, so i guess it’s always worth to check all options to see if anything shows up.