• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by dpet · Jul 02, 2015 at 12:24 PM · unity 5webgl

I get an error when I try to export my game to WebGl

Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/Emscripten/emcc" @"C:/Users/me/Desktop/development/unity_projects/unity5/shapeClicker/Shape Clicker/Assets/../Temp/emcc_arguments.resp"

stdout: WARNING: sanity check failed to run [Errno 13] Permission denied: 'C:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport/BuildTools/emscripten.config_sanity' WARNING: sanity check failed to run [Errno 13] Permission denied: 'C:\Program ...

Exception: Failed building WebGL Player. UnityEditor.WebGL.ProgramUtils.StartProgramChecked (UnityEditor.Utils.Program p) UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)

It happens after native compile to JS.

I've tried with the memory limit at 256 and 512.

I am using Unity 5.1.1f1.

I am using a 64 bit windows machine.

I have tried it in slow and fastest mode.

I found these. http://answers.unity3d.com/questions/952308/failed-build-webgl.html http://forum.unity3d.com/threads/failed-building-webgl-player.321433/

The second one seems like there is a bug in Unity. I tried to comment but apparently I don't have the privileges. I installed cmake but it didn't work. I also use Visual Studio to write my code.

Anybody have any experience with this bug and know more about it? Thanks.

Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

  • Sort: 
avatar image

Answer by Ricna · Feb 20, 2018 at 10:00 AM

  1. Close the Unity.

  2. Remove the Library folder of you project to re-import and generate all those files again.

  3. Edit the file C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\emscripten.config

  4. Change the value --stack_size to 2048 alt text

  5. Open your project and Build.


fixing-webgl-build-errors.png (13.1 kB)
Comment
tim_lol
MushayDroom

People who like this

2 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Larper · Jan 24, 2021 at 12:37 PM 0
Share

Under NO CIRCUMSTANCES do this to your project as this advice has broken my entire project. Luckily I didn't SHIFT + delete the Library folder so I was able restore it from the Recycle bin to get the project to my final working state.

avatar image

Answer by vdwtanner · Jul 09, 2015 at 04:17 PM

Hi, I don't know too much about it, but from what I have found it seems like it is possible to revert back to a 5.0.2 and export at Fast (but not fastest). Haven't personally tried this yet, but from what I've read this sounds like a viable option until the next release.

EDIT: I was able to export just now in 5.1.0f3 64bit. Had to install CMake and run as administrator. Haven't tried building at Fast or Fastest optimizations yet, but will comment when I have results.

Comment
dpet

People who like this

1 Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dpet · Jul 10, 2015 at 04:19 AM 0
Share

Did you have to do anything beyond starting cmake, like configure it or link it to unity? Or did you just start it and somehow unity knows its there.

avatar image vdwtanner · Aug 04, 2015 at 01:25 AM 0
Share

Hi, sorry for not replying, I was out of the country for a bit and away from my PC. Once I installed CMake I ran Unity as Administrator. Should have specified in my first post, sorry about the confusion. Did you ever get this figured out?

avatar image Edy · Aug 31, 2015 at 07:51 PM 0
Share

Running as administrator solved the problem to me also (without installing anything else).

avatar image

Answer by DamiaBonet · Jul 27, 2017 at 01:05 PM

The solution is here! https://youtu.be/lxD02XawLeQ

Comment
Ricna

People who like this

1 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by halconf20 · Oct 22, 2015 at 03:29 PM

Thank from Colombia, I run unity as Adminitrator and solved the problem all worked out great Edy

Comment
jcameron47
Ricna

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by nikola82 · Aug 02, 2015 at 06:18 PM

It is possible that this bug is a file access or creating and saving new . How about using XML and filming data in a temp folder . There is no support in browsers for the operation. Maybe unity does not represent a problem but when compiling arises insurmountable error .

Do you use maybe the FUNCTION :

System.IO.File.WriteAllBytes ? or Directory.CreateDirectory ( Application.persistentDataPath ...

Comment
Ricna

People who like this

-1 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ahmadian · Sep 21, 2016 at 09:28 AM 0
Share

Hi, I used the writeallbytes function. is that the cause? how do I solve it?

  • 1
  • 2
  • ›

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WEBGL BUILDING, HOW TO SHOW CHNESE. 0 Answers

webgl app is not working in browser 0 Answers

Is There Any Ads Networks Are Suppoted For Unity Webgl Games? 0 Answers

WebGL responsive template 0 Answers

Browser doesn't support Web GL 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges