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

Crashlytics 6.15: Spaces in xcode project path cause errors #714

Closed
firtinapd opened this issue Jun 17, 2020 · 4 comments · Fixed by firebase/firebase-ios-sdk#6789
Closed

Comments

@firtinapd
Copy link

firtinapd commented Jun 17, 2020

Please fill in the following fields:

Unity editor version: 2019.2.21f1
Firebase Unity SDK version: 6.15.0
Source you installed the SDK (.unitypackage or Unity Package Manager): .unitypackage
Firebase plugins in use (Auth, Database, etc.): Crashlytics
Additional SDKs you are using (Facebook, AdMob, etc.): Facebook
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP

Please describe the issue here:

When you have the xcode project be in a directory that has space in its path, the Pods/FirebaseCrashlytics/run fails.

▸ Running script 'Crashlytics Run Script'

❌  error: Unable to read Google Service plist at path /Users/****/Library/Application


The following build commands failed:
	PhaseScriptExecution Crashlytics\ Run\ Script /Users/***/Library/Developer/Xcode/DerivedData/Unity-iPhone-bmwiairdimzpuuhaeunzvtktifoc/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-EFE64D3C9ECC95B065833628.sh

I have looked at the run script and the problem can be resolved by changing this line:

ARGUMENTS="$API_KEY_ARG $@"

to

ARGUMENTS="$API_KEY_ARG $1 \"$2\""

So that the second argument that gets passed into Pods/FirebaseCrashlytics/run from the xcode build script gets passed correctly.

The relevant build script from the pbxproj:

		AD084429AC4472DDD68F6DAB /* Crashlytics Run Script */ = {
			isa = PBXShellScriptBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			name = "Crashlytics Run Script";
			runOnlyForDeploymentPostprocessing = 0;
			shellPath = "/bin/sh -x";
			shellScript = "chmod u+x \"${PROJECT_DIR}/Pods/FirebaseCrashlytics/run\"\nchmod u+x \"${PROJECT_DIR}/Pods/FirebaseCrashlytics/upload-symbols\"\n\"${PROJECT_DIR}/Pods/FirebaseCrashlytics/run\" -gsp \"${PROJECT_DIR}/GoogleService-Info.plist\"";
		};

I guess another solution is to put extra quotes around the path to GoogleService-Info.plist.

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Haven't tried

What's the issue repro rate? (eg 100%, 1/5 etc)
100%

@firtinapd firtinapd added the new New issue. label Jun 17, 2020
@patm1987 patm1987 added type: bug and removed new New issue. labels Jun 18, 2020
@patm1987
Copy link

Thanks for your bug report. I've filed it in our tracker and I'll let you know if we have any questions.

@newatlanta19006
Copy link

Im also seeing this and it has prevented my Unity iOS build from completing. I will attempt the workaround above in the mean time. Any chance this can get fixed soon?

@chkuang-g chkuang-g added this to the 6.16.0 milestone Sep 4, 2020
@chkuang-g chkuang-g removed this from the 6.16.0 milestone Oct 6, 2020
@hasandogu
Copy link

I am having this exact same issue. The workaround seems to have worked for me. It would be great if this issue could be resolved soon.

@mrichards
Copy link

Hi folks, this was a tiny bit more complicated than @firtinapd's workaround, as there are some use cases where more params may be passed to the script. Still, it is great the workaround was effective for you all! The fix will go live in the next release of the iOS SDK, and then will be available in the subsequent release of the Unity plugin.

@firebase firebase locked and limited conversation to collaborators Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants