Could not load type 'UnityEditor.iOS.Xcode.PlistDocument' error with Unity 5.6

1,494 views
Skip to first unread message

Anh Le Giang

unread,
Apr 1, 2017, 11:28:59 AM4/1/17
to Firebase Google Group
Hello,

I have some errors as below when upgrading my Unity project from version 5.5.2f to 5.6.0f3 using latest Firebase SDK:

System.TypeLoadException: Could not load type 'UnityEditor.iOS.Xcode.PlistDocument' from assembly 'Unity.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
  at Firebase.Editor.XcodeProjectPatcher.ReadConfig (Boolean errorOnNoConfig, System.String filename) [0x00000] in <filename unknown>:0 
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()


TypeLoadException: Could not load type 'UnityEditor.iOS.Xcode.PlistDocument' from assembly 'Unity.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Firebase.Editor.XcodeProjectPatcher.ReadConfig (Boolean errorOnNoConfig, System.String filename)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Firebase.Editor.XcodeProjectPatcher
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101)
UnityEditor.EditorAssemblies.ProcessEditorInitializeOnLoad (System.Type type) (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:136)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519)
System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528)
System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:77)
System.Activator.CreateInstance (System.Type type, Boolean nonPublic) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:372)
System.Activator.CreateInstance (System.Type type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:254)
UnityEditor.AssetPostprocessingInternal.GetAudioProcessorVersions () (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:339)
UnityEditor.AssetDatabase:Refresh()
GooglePlayServices.<Resolve>c__AnonStorey1:<>m__0()
GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


TypeLoadException: Could not load type 'UnityEditor.iOS.Xcode.PlistDocument' from assembly 'Unity.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Firebase.Editor.XcodeProjectPatcher.ReadConfig (Boolean errorOnNoConfig, System.String filename)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Firebase.Editor.XcodeProjectPatcher
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101)
UnityEditor.EditorAssemblies.ProcessEditorInitializeOnLoad (System.Type type) (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:136)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:27)


Did anyone upgrade successfully? 

Thanks,
Anh

Stewart Miles

unread,
Apr 3, 2017, 1:50:51 PM4/3/17
to fireba...@googlegroups.com
Do you have the iOS plugin installed?

Could you enable verbose logging under "Assets > Play Services Resolver > iOS Resolver > Settings" then share the logs?

The code that loads the Xcode extension is here https://github.com/googlesamples/unity-jar-resolver/blob/master/source/IOSResolver/src/IOSResolver.cs#L265 if you're interested in taking a look at what could be going wrong.

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a5d7dd40-5a13-41a1-bde5-70c66376aef8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anh Le Giang

unread,
Apr 4, 2017, 9:43:23 AM4/4/17
to Firebase Google Group
Also, here are some other error with Unity 5.6:
TypeInitializationException:An exception was thrown by the type initializer for Firebase.Editor.XcodeProjectPatcher
UnityEditor.EditorWindow:GetWindow(Type)
Firebase.Editor.SettingsWindow:ShowWindow()


TypeLoadException: Could not load type 'UnityEditor.iOS.Xcode.PBXProject' from assembly 'Google.IOSResolver'.
Google.IOSResolver..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Google.IOSResolver
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
Google.VersionHandler.InvokeMethod (System.Type type, System.Object objectInstance, System.String methodName, System.Object[] args, System.Collections.Generic.Dictionary`2 namedArgs)
Google.VersionHandler.InvokeStaticMethod (System.Type type, System.String methodName, System.Object[] args, System.Collections.Generic.Dictionary`
2 namedArgs)
FirebaseMessagingDeps.SetupDeps () (at Assets/Firebase/Editor/MessagingDeps.cs:60)
FirebaseMessagingDeps..cctor () (at Assets/Firebase/Editor/MessagingDeps.cs:23)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for FirebaseMessagingDeps
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:513)

Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519)
System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528)
System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:77)
System.Activator.CreateInstance (System.Type type, Boolean nonPublic) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:372)
System.Activator.CreateInstance (System.Type type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:254)
UnityEditor.AssetPostprocessingInternal.GetMeshProcessorVersions () (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:164)
UnityEditor.AssetPostprocessingInternal:GetMeshProcessorVersions()



Anh Le Giang

unread,
Apr 8, 2017, 10:56:55 AM4/8/17
to Firebase Google Group
Attach the log after enabling verbose logging for Android and iOS. For iOS I cannot open the setting screen, nothing happened.

Stewart Miles

unread,
Apr 11, 2017, 3:41:32 PM4/11/17
to fireba...@googlegroups.com
Thanks for the logs Anh.  The logs look like you're trying to build a project on Unity Cloud Build, is this also a problem with local builds?  Is there anything peculiar about your build environment (e.g machine configuration) that we should be aware of?

I just tried this out with a vanilla install with:
  • OSX: 10.12.3
  • System language: en-US
  • Unity 5.6.01f3
  • Firebase SDK 3.0.1
I used the Unity installer which installed under /Applications/Unity .

I'll check out Unity Cloud Build next.

Cheers,
Stewart

On Sat, Apr 8, 2017 at 2:56 AM, Anh Le Giang <anh.l...@gmail.com> wrote:
Attach the log after enabling verbose logging for Android and iOS. For iOS I cannot open the setting screen, nothing happened.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Anh Le Giang

unread,
Apr 12, 2017, 8:15:56 AM4/12/17
to Firebase Google Group
Hello,

I'm using local PC using Windows 10. 
  • Unity 5.6.01f3
  • Firebase SDK 3.0.1
Thanks,
Anh

On Wednesday, April 12, 2017 at 2:41:32 AM UTC+7, Stewart Miles wrote:
Thanks for the logs Anh.  The logs look like you're trying to build a project on Unity Cloud Build, is this also a problem with local builds?  Is there anything peculiar about your build environment (e.g machine configuration) that we should be aware of?

I just tried this out with a vanilla install with:
  • OSX: 10.12.3
  • System language: en-US
  • Unity 5.6.01f3
  • Firebase SDK 3.0.1
I used the Unity installer which installed under /Applications/Unity .

I'll check out Unity Cloud Build next.

Cheers,
Stewart
On Sat, Apr 8, 2017 at 2:56 AM, Anh Le Giang <anh.l...@gmail.com> wrote:
Attach the log after enabling verbose logging for Android and iOS. For iOS I cannot open the setting screen, nothing happened.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Stewart Miles

unread,
Apr 13, 2017, 8:47:58 PM4/13/17
to fireba...@googlegroups.com
Oh you're trying to build for iOS on Windows ?  That's a use case that we don't support I'm afraid.

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Anh Le Giang

unread,
Apr 14, 2017, 9:41:14 AM4/14/17
to Firebase Google Group
Hi,

Sorry I cannot get it. The users are able to build the XCode project in Windows machine and it's the default and normal process of Unity.
These errors appear in the Editor even before I build the project. 
Anyways, I will try on my Mac and let you know the result.

Thanks,
Anh

Stewart Miles

unread,
Apr 14, 2017, 11:56:33 AM4/14/17
to fireba...@googlegroups.com
See https://docs.unity3d.com/Manual/iphone-BuildProcess.html you can generate the Xcode project on a Windows machine and that's about it, the project still needs to be built on an OSX machine.  https://forum.unity3d.com/threads/build-on-windows-deploy-to-ios-new-to-unity.364368/ has some discussion about this as well.

In our case the limitation is due to our use of Cocoapods, we pull in iOS dependencies via Cocoapods then inject those into the Xcode project generated by Unity.  So even if our IOSResolver plugin (source here BTW https://github.com/googlesamples/unity-jar-resolver/tree/master/source/IOSResolver) didn't fail to find the iOS extension DLL provided by Unity - we use this to modify the Xcode project - the build would still fail as Cocoapod installation won't run on Windows as their tools don't work on Windows.  I guess we could partially support this use case by fixing the IOS resolver to find the iOS extension on Windows to generate a Podfile without running Cocoapod install but you would still need to copy the final project to an OSX machine, run "pod install" to download the dependencies required and finally build it using Xcode.

Is there anything you can share about your particular use case and the number of users affected by this?

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Richard Fu

unread,
May 29, 2017, 9:52:58 PM5/29/17
to Firebase Google Group
I have the same errors too!

As Anh said, it's not happens when build, but every time I put Unity back to foreground, the errors appears. It seems Unity trying to reload/verify the assets and fires Firebase.Editor.XcodeProjectPatcher?

I am on:
Unity 5.5.3p2 - Android Build
macOS 10.12.5

iOS Resolver Settings:
Podfile Generation: On
Cocoapods Integration: Xcode Workspace
Auto Install...: On

Log:

TypeLoadException: Could not load type 'UnityEditor.iOS.Xcode.PlistDocument' from assembly 'Unity.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Firebase.Editor.XcodeProjectPatcher.ReadConfig (Boolean errorOnNoConfig, System.String filename)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Firebase.Editor.XcodeProjectPatcher

System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:513)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519)
System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528)
System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:77)
System.Activator.CreateInstance (System.Type type, Boolean nonPublic) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:372)
System.Activator.CreateInstance (System.Type type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:254)
UnityEditor.AssetPostprocessingInternal.GetMeshProcessorVersions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:158)
UnityEditor.AssetPostprocessingInternal:GetMeshProcessorVersions()


Stewart Miles

unread,
Jun 9, 2017, 1:32:08 PM6/9/17
to Firebase Google Group
Do you by any chance have the Firebase settings window open when this happens?

Is it possible you have the iOS platform selected but not active for build?

We've been playing around with this and haven't reproduced the problem.  A screengrab of the behavior would be great.

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Stewart Miles

unread,
Jun 9, 2017, 7:15:44 PM6/9/17
to Firebase Google Group
Also it would be great to try this out with the 4.0.0 release we posted today.


Reply all
Reply to author
Forward
0 new messages