Search Unity

webGL giving me a new error

Discussion in 'Web' started by Teadaddy, Aug 9, 2016.

  1. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    I have been working on a web based environment for a while now, and have successfully hosted multiple versions of it on line. In the last couple of days, I have begun to get this error, any ideas why this might be happening? Any help greatly appreciated! (if you would like to see the JavaScript console, the example is hosted at www.stormcloudimages.com/index-OCEnv_web.html )

    An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
    uncaught exception: Assertion failed: s_GlobalMetadataHeader->sanity == 0xFAB11BAF, at: F:\Program Files\unity5_4\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp,145,Initialize at jsStackTrace@blob:http://www.stormcloudimages.com/60776862-3202-4548-9075-d6a8275eb64e:1:22814
    stackTrace@blob:http://www.stormcloudimages.com/60776862-3202-4548-9075-d6a8275eb64e:1:22997
    ___assert_fail@blob:http://www.stormcloudimages.com/60776862-3202-4548-9075-d6a8275eb64e:1:259899
    Gml@blob:http://www.stormcloudimages.com/b481e5dc-5e6a-41a5-a96c-2496634c3d0a:19:1
    Enl@blob:http://www.stormcloudimages.com/b481e5dc-5e6a-41a5-a96c-2496634c3d0a:19:1
    Kol@blob:http://www.stormcloudimages.com/b481e5dc-5e6a-41a5-a96c-2496634c3d0a:19:1
    POa@blob:http://www.stormcloudimages.com/b481e5dc-5e6a-41a5-a96c-2496634c3d0a:18:1
    oFb@blob:http://www.stormcloudimages.com/b481e5dc-5e6a-41a5-a96c-2496634c3d0a:15:1
    callMain@blob:http://www.stormcloudimages.com/60776862-3202-4548-9075-d6a8275eb64e:36:50672
    doRun@blob:http://www.stormcloudimages.com/60776862-3202-4548-9075-d6a8275eb64e:36:51499
    run/<@blob:http://www.stormcloudimages.com/60776862-3202-4548-9075-d6a8275eb64e:36:51667
     
  2. pera2

    pera2

    Joined:
    Aug 10, 2016
    Posts:
    14
    Last edited: Aug 10, 2016
  3. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Hello Teadaddy.

    This usually happens when your UnityLoader.js and .data files come from different versions of the build. The common reason for this is improper server configuration (for example .js files may be stored in the memory of the proxy software for up to several hours even if you have updated them in the server file system, depending on how the server is configured). In order to check if this is the case or not you can try the following: upload your build into a new folder (with the name you have not used before) and try to launch it. Also it would be very helpful to post a valid link to the uploaded content here.
     
  4. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    Thank you Alexsuvrov, I was indeed loading and unloading some test versions, and that seemed to present that problem,i.e the error in question.
    However, I found that even removing all files and reloading them did not work (my log indeed shows a 404 error for the UnityLoader.js file)
    I then proceeded to your next step and posted a new build to a new folder, with never before used naming etc. and it still fails to get the UnityLoader.js file. the page in question is here -

    http://www.stormcloudimages.com/OCEnvWeb/indexOCEwGL.html

    Thanks for all your help and advice, anything further would be greatly appreciated as well.
     
  5. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Oh, there seems to be some simple issue. As you can see here http://www.stormcloudimages.com/OCEnvWeb/Release/ not only UnityLoader.js is not available, but none of the file from the Release folder can be accessed, while files from other folders are server well. Login to the server and remove the .htaccess file from the Release folder (I suspect it to be there), then try to download the files from the Release folder link again. Let me know if this makes a difference.
     
    Teadaddy likes this.
  6. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    I'm looking but I do not find .htaccess in the Release folder-
    then I remembered I had allowed write permissions on upload (I am uploading to a remote server, justhost) and re-uploaded without write access and it saw 2 versions of the UnityLoader.js, sadly neither was found (404), it then changed after a few minutes to report only one version of the UnityLoader.js, but still it was 404.

    I then uploaded a new version, to a new folder with the same result,
    http://www.stormcloudimages.com/OCEnv/indexOCEwGL.html

    I am beginning to think I somehow screwed up my UnityLoader.js file- it looks like what I would expect when I open it, but I am not sure what I am looking for.

    Thanks again for the incredibly responsive support!
     

    Attached Files:

  7. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    thanks again for your help, I am not sure why it will not load since it is clearly there, and the html is clearly pointing to it. I will continue to try to run it down. is there anywhere else I might find the htaccess on the server?
     
  8. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Check out the following 2 folders:
    http://www.stormcloudimages.com/OCEnvWeb/Release/
    http://www.stormcloudimages.com/OCEnvWeb/TemplateData/
    (follow these links and try to click on the files in the displayed listings)

    As you can see, you can access all the files in TemplateData but you can not access any file in the Release folder. So there is nothing particularly wrong with the UnityLoader.js itself, as it is the whole folder that can not be accessed normally.

    Let's make a small experiment. Create a new subfolder, for example with the following name:
    http://www.stormcloudimages.com/OCEnvWeb/Release2/
    and upload just a single file there (you can even upload the UnityLoader.js if you wish), then open this new folder index with the following link http://www.stormcloudimages.com/OCEnvWeb/Release2/ (this link will work after you create the Release2 subfolder), and click on the uploaded file. If you can access it, then this will mean that there was some difference in the way you created those two containing folders.

    Also note that .htaccess might not be displayed in some folder viewers, as it is a sort of a 'hidden' file. In order to eliminate this possibility, remove that file from the build before uploading content to the server next time (the build should work just fine even without that file).
     
    Teadaddy likes this.
  9. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    it is very strange. I did as you suggested, and it still could not access the file, though as you see it is listed in the release folder. I also tried rebuilding the webGL from Unity into a fresh build, and hosted the UnityLoader.js at another (Release3) folder. Same thing. all will build and run from the localhost, or locally in firefox. So the issue may be just on the server? ....

    OK, update- I was finally able to find the .htaccess files (there were a few) on the server and remove them. I had a few issues since as well- not enough memory allocated, etc. but was finally able to get a working version up at -
    http://www.stormcloudimages.com/OCEnvWeb/indexOCEnv.html
    if you are interested- it is a viz demonstration of a set of products made by a precast concrete construction services company. Not very sexy, but keeping the bills paid so far. (P.S.the play movie and open PDF buttons don't work right now as I am still implementing the .js to open in a new window, please disregard)

    Strangely, it is working in Firefox and Edge, but still failing in Chrome on a memory allocation issue.

    Anyway, thank you again,enormously, for your patient assistance, I would have had a much harder time of it without your help. I was tearing out my hair (so to speak) and I will keep trying to track down the problems, but the education you have given me has been very valuable.
     
    Last edited: Aug 12, 2016
  10. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    Last edited: Sep 9, 2016
  11. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Looks nice!

    By the way, your build can not run in 32-bit Chrome (even if you are using a 64-bit system), because currently 32-bit Chrome does not allocate heap larger than 960MB, while you are trying to allocate 1.5GB. I was able to successfully launch you build with 512MB heap, so you probably don't need more than 768MB.

    You don't need to rebuild your content, as you can override the heap size (TOTAL_MEMORY) directly in the index.html and update just this small file on the server. To set the heap size to 768MB, try to change the index.html in the following way, then your build should launch in Chrome successfully:
    Code (html):
    1. ...
    2.   var Module = {
    3.     TOTAL_MEMORY: 805306368,
    4.     errorhandler: null,            // arguments: err, url, line. This function must return 'true' if the error is handled, otherwise 'false'
    5.     compatibilitycheck: null,
    6.     dataUrl: "Release/OCEnv_webGLtest.data",
    7.     codeUrl: "Release/OCEnv_webGLtest.js",
    8.     memUrl: "Release/OCEnv_webGLtest.mem",
    9.  
    10.   };
    11. ...
     
    Last edited: Aug 12, 2016
    tonialatalo and Teadaddy like this.
  12. Teadaddy

    Teadaddy

    Joined:
    Jan 26, 2015
    Posts:
    22
    Thanks again! works like a charm.
     
  13. BytesCrafter

    BytesCrafter

    Joined:
    Apr 16, 2016
    Posts:
    8
    Wow! Thank you! Now I know what does the error means. No wonder, if we try to update the build in the same folder, we got that error and if we uploaded the webgl content to other subdomain, it works. Thank you so much for your presence. While Im searching for our webgl projects, I notice you twice. Thanks for being active!
     
  14. MohammadAlizadeh

    MohammadAlizadeh

    Joined:
    Apr 16, 2015
    Posts:
    26
    I changed the "Release" folder to "Releases" and TemplateData folder as well and it worked