- Home /
Unable to build code for WEBGL platform, il2cpp.exe error
I just updated unity3d to latest 5.5 version. I am able to build for windows but unable to build for webGL
Failed running C:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --compile-cpp --libil2cpp-static --platform="WebGL" --architecture="EmscriptenJavaScript" --configuration="Release" --outputpath="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets /../Temp/StagingArea/Data\Native\build.js" --cachedirectory="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets..\Library/il2cpp_cache" --compiler-flags="-Oz -DIL2CPP_EXCEPTION_DISABLED=1 " --linker-flags="-s PRECISE_F32=2 -s DISABLE_EXCEPTION_CATCHING=0 --memory-init-file 1 -O3 -s NO_EXIT_RUNTIME=1 -g0 -s USE_WEBGL2=1 -s TOTAL_MEMORY=268435456 --separate-asm --emit-symbol-map --output_eol linux -s MEMFS_APPEND_TO_TYPED_ARRAYS=1 " --js-pre="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\FileSystem.js" --js-pre="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\MediaDevices.js" --js-pre="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\prejs\SendMessage.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Audio.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Cursor.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Eval.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\FileSystem.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\library_memfs.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\Logging.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\SystemInfo.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\UnetWebSocket.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebCam.js" --js-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\WebRequest.js" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AIModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AnimationModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_AudioModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ClothModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CloudWebServicesModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CoreModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_CrashReportingModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_IMGUIModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_JSONSerializeModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticlesLegacyModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_ParticleSystemModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_Physics2DModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_PhysicsModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TerrainPhysicsModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_TextRenderingModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UIModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UmbraModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UNETModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAdsModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityAnalyticsModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityConnectModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_UnityWebRequestModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VehiclesModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VideoModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_VRModule_Dynamic.bc" --additional-libraries="C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib\modules\WebGLSupport_WebModule_Dynamic.bc" --additional-libraries="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\FacebookSDK\Plugins\iOS\Bolts.framework" --additional-libraries="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\FacebookSDK\Plugins\iOS\FBSDKLoginKit.framework" --additional-libraries="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\FacebookSDK\Plugins\iOS\FBSDKCoreKit.framework" --additional-libraries="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\AudienceNetwork\Plugins\iOS\libs\FBAudienceNetwork.framework" --additional-libraries="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\FacebookSDK\Plugins\iOS\FBSDKShareKit.framework" --extra-types.file="C:\Program Files\Unity\Editor\Data\il2cpp\il2cpp_default_extra_types.txt" --assembly="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" --assembly="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" --assembly="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Temp\StagingArea\Data\Managed\Facebook.Unity.Settings.dll" --assembly="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Temp\StagingArea\Data\Managed\UnityEngine.dll" --generatedcppdir="C:\unity5_workspace\BallWay_multiplatform\Ball Way\Temp\StagingArea\Data\il2cppOutput"
stdout: Building build.js with EmscriptenToolChain. Output directory: C:\unity5_workspace\BallWay_multiplatform\Ball Way\Temp\StagingArea\Data\Native Cache directory: C:\unity5_workspace\BallWay_multiplatform\Ball Way\Library\il2cpp_cache ObjectFiles: 438 of which compiled: 0 Total compilation time: 1809 milliseconds. Response file: C:\Users\FahimAlavi\AppData\Local\Temp_1914938763\response.rsp il2cpp.exe didn't catch exception: System.UnauthorizedAccessException: Access to the path 'C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\FacebookSDK\Plugins\iOS\Bolts.framework' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Unity.IL2CPP.Building.Hashing.HashTools.HashOfFile(NPath path) at Unity.IL2CPP.Building.CppProgramBuilder.HashLinkerInvocation(LinkerInvocation linkerInvocation, IEnumerable`1 objectFiles) at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext) at Unity.IL2CPP.Building.CppProgramBuilder.Build() at il2cpp.Program.DoRun(String[] args) at il2cpp.Program.Run(String[] args) at il2cpp.Program.Main(String[] args) stderr:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\unity5_workspace\BallWay_multiplatform\Ball Way\Assets\FacebookSDK\Plugins\iOS\Bolts.framework' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Unity.IL2CPP.Building.Hashing.HashTools.HashOfFile(NPath path) at Unity.IL2CPP.Building.CppProgramBuilder.HashLinkerInvocation(LinkerInvocation linkerInvocation, IEnumerable`1 objectFiles) at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext) at Unity.IL2CPP.Building.CppProgramBuilder.Build() at il2cpp.Program.DoRun(String[] args) at il2cpp.Program.Run(String[] args) at il2cpp.Program.Main(String[] args)
UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:281) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:272) UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:126) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:39) UnityEditor.HostView:OnGUI()
Answer by JoshPeterson · Jan 12, 2017 at 01:01 PM
You can correct this issue in the plugin importer for the Facebook SDK. Make sure the native plugin is only selected to build for iOS, not for WebGL. Note that we should have a fix for this issue in an upcoming 5.5 patch release of Unity.