playMaker

Author Topic: ARKit and DataMaker throw error[SOLVED]  (Read 153 times)

Padenlee

  • Playmaker Newbie
  • *
  • Posts: 39
  • You can't hit what you don't shoot for!
    • View Profile
    • Personal Site
ARKit and DataMaker throw error[SOLVED]
« on: May 28, 2019, 09:01:12 AM »
Hey humans, bug hunter extraordinaire here!

I've been trying to test the new PUN 2 actions and found this other bug. When combining ARKit and Datamaker I get this bug shown below, I tried a few different methods for a work around and here is the result:

Unity 2019.1.1f1

In both attempts I had to switch "Stripping Runtime Version" to .NET 4.x Equivalent to get around a Text Mesh Pro error.

attempted1.
Unity ARKit projet download:https://bitbucket.org/Unity-Technologies/unity-arkit-plugin/src/default/

Unity ARKit Project(Build)>playmaker(Build)>DataMaker(Build error)
 
attempted 2.
Export UnityARKitPlugin folder from Unity ARKit downloaded project.

Fresh project>Playmaker>DataMaker(Build)>Import ARKit UnityARKitPlugin folder(Build error)

I'm trying to help test the Pun 2 actions Jean has been working hard on and I love mixing AR and multiplayer, so I thought I'd give it a try and found this bug. I'm wondering if it has to do with the linker file?


IL2CPP error for type 'Newtonsoft.Json.Serialization.DefaultContractResolver' in assembly '/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/StagingArea/Data/Managed/Newtonsoft.Json.dll'
Additional information: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver

Failed running /Applications/Unity/Hub/Editor/2019.1.1f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2019.1.1f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/StagingArea/Data/Managed" --generatedcppdir="/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/il2cppOutput/il2cppOutput"

stdout:
IL2CPP error for type 'Newtonsoft.Json.Serialization.DefaultContractResolver' in assembly '/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/StagingArea/Data/Managed/Newtonsoft.Json.dll'
Additional information: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
il2cpp.exe didn't catch exception: System.Exception: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
   at Unity.IL2CPP.Metadata.VTableBuilder.ValidateInterfaceMethodSlots(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, List`1 slots)
   at Unity.IL2CPP.Metadata.VTableBuilder.VTableForType(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, Int32 currentSlot)
   at Unity.IL2CPP.Metadata.VTableBuilder.VTableFor(TypeReference typeReference)
   at Unity.IL2CPP.Metadata.VTableBuilder.IndexFor(MethodDefinition method)
   at Unity.IL2CPP.MethodBodyWriter.VirtualCallFor(IGeneratedMethodCodeWriter writer, MethodReference method, MethodReference unresolvedMethod, IEnumerable`1 args, TypeResolver typeResolver, IRuntimeMetadataAccess runtimeMetadataAccess, VTableBuilder vTableBuilder)
   at Unity.IL2CPP.MethodBodyWriter.CallExpressionFor(MethodReference callingMethod, MethodReference unresolvedMethodToCall, MethodCallType callType, List`1 argsFor, Func`2 addUniqueSuffix, Boolean emitNullCheckForInvocation)
   at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins)
   at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node)
   at Unity.IL2CPP.MethodBodyWriter.Generate()
   at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   at Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
   at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, SharedMethodCollector sharedMethodCollector, ISequencePointProvider sequencePointCollector)
   at Unity.IL2CPP.SourceWriter.<>c__DisplayClass7_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
   at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`1 writeHeaderAction, Action`2 writeItemAction, Action`1 writeFooterAction, SourceWritingContext sourceWritingContext)
   at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext)
   at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
   at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, AssemblyDefinition assemblyDefinition, IMethodCollector methodCollector)
   at Unity.IL2CPP.AssemblyConverter.Apply()
   at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
   at il2cpp.Program.DoRun(String[] args)
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)
stderr:

Unhandled Exception: System.Exception: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
   at Unity.IL2CPP.Metadata.VTableBuilder.ValidateInterfaceMethodSlots(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, List`1 slots)
   at Unity.IL2CPP.Metadata.VTableBuilder.VTableForType(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, Int32 currentSlot)
   at Unity.IL2CPP.Metadata.VTableBuilder.VTableFor(TypeReference typeReference)
   at Unity.IL2CPP.Metadata.VTableBuilder.IndexFor(MethodDefinition method)
   at Unity.IL2CPP.MethodBodyWriter.VirtualCallFor(IGeneratedMethodCodeWriter writer, MethodReference method, MethodReference unresolvedMethod, IEnumerable`1 args, TypeResolver typeResolver, IRuntimeMetadataAccess runtimeMetadataAccess, VTableBuilder vTableBuilder)
   at Unity.IL2CPP.MethodBodyWriter.CallExpressionFor(MethodReference callingMethod, MethodReference unresolvedMethodToCall, MethodCallType callType, List`1 argsFor, Func`2 addUniqueSuffix, Boolean emitNullCheckForInvocation)
   at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins)
   at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node)
   at Unity.IL2CPP.MethodBodyWriter.Generate()
   at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
   at Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
   at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, SharedMethodCollector sharedMethodCollector, ISequencePointProvider sequencePointCollector)
   at Unity.IL2CPP.SourceWriter.<>c__DisplayClass7_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
   at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`1 writeHeaderAction, Action`2 writeItemAction, Action`1 writeFooterAction, SourceWritingContext sourceWritingContext)
   at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext)
   at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
   at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, AssemblyDefinition assemblyDefinition, IMethodCollector methodCollector)
   at Unity.IL2CPP.AssemblyConverter.Apply()
   at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
   at il2cpp.Program.DoRun(String[] args)
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)
   at Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:494)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Exception: /Applications/Unity/Hub/Editor/2019.1.1f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:494)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:833)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:655)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:601)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:48)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:52)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)



« Last Edit: June 12, 2019, 04:01:33 AM by jeanfabre »
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14210
  • Official Playmaker Support
    • View Profile
Re: ARKit and DataMaker throw error
« Reply #1 on: May 29, 2019, 01:13:15 AM »
Hi,

 ok, try to remove the Newtonsoft.Json.Net20 dll inside PlayMaker DataMaker/Plugins, it's likely the cause of the issue.

If that doesn't work, I'll try on my end as well.

 Bye,

 Jean


Padenlee

  • Playmaker Newbie
  • *
  • Posts: 39
  • You can't hit what you don't shoot for!
    • View Profile
    • Personal Site
Re: ARKit and DataMaker throw error
« Reply #2 on: June 10, 2019, 10:22:20 AM »
I can confirm this works! Also, I had to delete some JSON actions that also threw some errors. Builds perfect now.
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone