WebGL Fail to render on Safari 11

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:

[Error] WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
[Error] WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
[Error] WebGL: ERROR: 0:53: '[]' : Index expression must be constant

I’m running Unity 2017.3.0b6 and building for WebGL 1.0

Thanks

2 Likes

We’re already aware of this and will fix it before the release. See Unity Issue Tracker - [Safari] WebGL canvas stays black to follow the bug.

1 Like

Ok, that is great :slight_smile:
Thanks

What’s is the reason of this bug? I have the same on 2017.1.0f3.
Is there any workaround?

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.

no. the game is started (i see rendered scene), but then i see exact the same errors in JS console

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.

1 Like

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?

1 Like

I can also confirm the black canvas with the latest beta (2017.3.0b11). Did someone create a new issue for this?

Indeed, reactivating this one.

It is fixed for 2018.1 already but we are of course looking into backporting it to 2017.3

1 Like

Is there possibility to download 2018.1 beta? Our webgl build is broken in Safari :frowning:

Unfortunately no, but the fix will most likely become available in 2017.3 within the next two weeks.

Should be fixed in 2017.3.0f2 (Next week).

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)

The fix will come with the 2017.3.0f2 build which will be on the beta site next (in a few days I think).

1 Like

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?

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.

So basically Safari build now should not have post processing enabled, yes?

Having this in safari:

But this in other browsers:

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

We’re hoping to start the 2018.1 Beta very soon.