Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

WebGL Fail to render on Safari 11

Discussion in '2017.3 Beta' started by GilCat, Oct 29, 2017.

  1. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    617
    I'm building a WebGL version of my game and it falls to render on Safari 11 while it runs fine on Chrome a Firefox.
    Looking at the console log I see 3 errors:
    Code (JavaScript):
    1. [Error] WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
    2. [Error] WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
    3. [Error] WebGL: ERROR: 0:53: '[]' : Index expression must be constant
    I'm running Unity 2017.3.0b6 and building for WebGL 1.0

    Thanks
     
    qCring and nicloay like this.
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    nicloay likes this.
  3. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    617
    Ok, that is great :)
    Thanks
     
  4. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    498
    What's is the reason of this bug? I have the same on 2017.1.0f3.
    Is there any workaround?
     
  5. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    If you get just a black canvas in Safari with 2017.1 then please file a new bug report with a repro project since this is then a different issue.
     
  6. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    498
    no. the game is started (i see rendered scene), but then i see exact the same errors in JS console
     
  7. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    Yeah, they've shown up with the safari update. we took a quick look but so far they seem to not be having a major impact. Will get to them in the future of course.
     
    GilCat likes this.
  8. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    617
    This problem still remains in Unity 2017.3.0.b11. In the issue tracker it states *fixed in Unity 2017.3* . Does it mean it is only available when final 2017.3?
     
    qCring likes this.
  9. qCring

    qCring

    Joined:
    Jan 9, 2017
    Posts:
    4
    I can also confirm the black canvas with the latest beta (2017.3.0b11). Did someone create a new issue for this?
     
  10. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    Indeed, reactivating this one.
     
  11. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    It is fixed for 2018.1 already but we are of course looking into backporting it to 2017.3
     
    qCring likes this.
  12. idchlife

    idchlife

    Joined:
    Jul 25, 2016
    Posts:
    15
    Is there possibility to download 2018.1 beta? Our webgl build is broken in Safari :(
     
  13. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,496
    Unfortunately no, but the fix will most likely become available in 2017.3 within the next two weeks.
     
  14. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,496
    Should be fixed in 2017.3.0f2 (Next week).
     
  15. Julien-Lynge

    Julien-Lynge

    Joined:
    Nov 5, 2010
    Posts:
    142
    We just found this issue w/ a WebGL test on iOS - we'll keep an eye out for the release next week and report back.

    (Yes, I know iOS WebGL is not officially supported, but several Unity devs have stated that everything should work & the main issue is memory availability & backwards compatibility w/ hardware, neither of which are an issue for our project)
     
  16. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    The fix will come with the 2017.3.0f2 build which will be on the beta site next (in a few days I think).
     
    qCring likes this.
  17. CaptParis

    CaptParis

    Joined:
    Sep 18, 2012
    Posts:
    1
    Hey, we've had a similar problem with Safari using post processing. With post processing off everything displays fine, but with it turned on we just get a black screen. UI still appears fine.

    I just wanted to check if the fix you're mentioning will allow post processing to run on Safari, or if this is another, unrelated issue?
     
  18. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    This sounds like an unrelated issue.

    BUT not all effects of the new Post-Processing stack are supported by WebGL, and especially not by browsers that don't support WebGL 2.0 yet like Safari.
     
  19. idchlife

    idchlife

    Joined:
    Jul 25, 2016
    Posts:
    15
    So basically Safari build now should not have post processing enabled, yes?

    Having this in safari: upload_2017-12-12_0-36-18.png

    But this in other browsers:
    upload_2017-12-12_0-36-56.png


    Using color grading in post processing. I shoul disable it for Safari?
     
  20. charlesb_rm

    charlesb_rm

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    476
    We're hoping to start the 2018.1 Beta very soon.
     
  21. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    982
    Yes, try disabling it for now.
     
unityunity