Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
1
Question by gfilkov · Dec 05, 2021 at 01:37 AM · webglpublishing

Web GL Publish does not work for me

Hi all, I am trying to publish my Unity Web GL build. Uncompressed build. Unity Editor: Menu > Publish > WebGL Project Upload Complete; browser opens with Play button. Play: shows [90%] "The first play through is recorded to add a preview of the game." - and there it is stuck forever. Dev console in browser shows multiple errors: - otBannerSdk.js:7 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'style') website-search-1.4.js:1 Error: no render target found, search-box requires attachSearchBox to be set Project_WebglDetailV2Controller.ee70871274b0619cc6f1.bundle.js:1 Uncaught DOMException: Blocked a frame with origin "https://play.unity.com" from accessing a cross-origin frame. at https://play-static.unity.com/public/assets/Project/Project_WebglDetailV2Controller.ee70871274b0619cc6f1.bundle.js:1:376891 mow-unity-4.loader.js:1 GET https://play-static.unity.com/20211204/webgl/c06e1eef-8716-42d3-aa45-0273b64bcff6/Build/ net::ERR_ABORTED 404 (Not Found) mow-unity-4.loader.js:1 Unable to load file https://play-static.unity.com/20211204/webgl/c06e1eef-8716-42d3-aa45-0273b64bcff6/Build/! Check that the file exists on the remote server. (also check browser Console and Devtools Network tab to debug) GET https://play-static.unity.com/20211204/webgl/c06e1eef-8716-42d3-aa45-0273b64bcff6/Build/ 404 (Not Found) [UnityCache] 'https://play-static.unity.com/20211204/webgl/c06e1eef-8716-42d3-aa45-0273b64bcff6/Build/' request failed with status: 404 Not Found

Please help. Thank you

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by nicca_NJ · Dec 05, 2021 at 09:22 AM

I also experiencing this now. I don't know how to solve this issue if you have a solution pls help us

Comment
Add comment · 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 gfilkov · Dec 07, 2021 at 01:02 AM 0
Share

This editor made me swear badly not once!

Crammed almost all I tried to, but one line still went south.

It should be: Web.config:

 <remove fileExtension=".unityweb" />
 <mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />



avatar image
0

Answer by gfilkov · Dec 07, 2021 at 12:58 AM

Hi @nicca_NJ I assume there are different situations for different people. Not sure if my recipe works for you, but you are free to try it ;)

My issue was: my Unity project had scene with InputField on the canvas. Everything worked when deployed in IIS on my localhost. Publishing WebGL would either fail completely or disable InputField, with multiple errors logged in the browser.

All I could achieve was publishing WebGL build on my server in Azure. If it helps, here is what I did to make it work:

  • C# (my code: KeyboardClass.cs)

       void Start()
         {
     #if !UNITY_EDITOR && UNITY_WEBGL
             // disable WebGLInput.captureAllKeyboardInput so elements in web page can handle keabord inputs
             WebGLInput.captureAllKeyboardInput = false;
     #endif
         }
    
    
  • Build config:

Project Settings > Player > Settings for WebGL > Publishing Settings

Explicitly Thrown Exceptions Only

Throw Gzip Data Caching [v]

Decompression Fallback [v]

=Build/Index.html add:

 var recaptureInputAndFocus = function() {
       //var canvas = document.getElementById("#canvas");
       if(canvas) {
         canvas.setAttribute("tabindex", "1");
         canvas.focus(); 
       } else
         setTimeout(recaptureInputAndFocus, 100);
     }

  • Deployed to Azure (added to my existing webapp)

  • Web.config add:

       <remove fileExtension=".unityweb" />
    
    
    
    

As the result: my project works fine in browsers on PC. But it fails to load on mobile devices :( Previous version, 90 MB, worked fine both on PC and mobile. New version, 170 MB - fails to load on mobiles. Works on PC only.

Comment
Add comment · 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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

178 People are following this question.

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

Related Questions

Error: The first play through is recorded to add a preview of the game (90%) and this recording doesn’t end (WebGL). 1 Answer

WebGL gets ride of background? 1 Answer

webgl overrides privious build on unity play 0 Answers

Help fixing error when building WebGL 0 Answers

Unable to go past 2% while building on WebGL. Getting the following error 0 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