Open Christopher-Hayes opened 4 years ago
Update
Actually after further testing, it does trip the pc.UnsupportedBrowserError
, but the error is never shown.
Okay yeah the WebGL error gets blocked by the loading screen. I was under the assumption PlayCanvas was oblivious that WebGL was not supported.
Updating the <table>
inline styling to have position: relative; z-index: 1;
would fix this.
Description
It seems on some devices that either have WebGL disabled or hardware in some doesn't support WebGL, will cause PlayCanvas to hang at the loading screen with 0% progress. No console errors are logged either. It should be noted this is a situation where the browser does support WebGL, but for some other reason WebGL isn't available.
I'll try to pin down exactly what circumstances this happens, but I've come across this a number of times testing Mac devices on https://crossbrowsertesting.com. Of course, this is an unusual situation to lack WebGL support, but as a user I would expect an error of some sort to show indicating WebGL isn't available.
The code below is from
__start__.js
, I would expectpc.ContextCreationError
to trip when a device is in this situation, but for whatever reason it does not. I don't believe__start__.js
is part of the PlayCanvas engine, so this repo may not be the appropriate place for this issue and maybe it should really be down to the developer utilizing PlayCanvas to figure this type of stuff out, if so LMK.Expected Behavior
On devices that don't have WebGL available, PlayCanvas would show an error message to the user or at least throw some error that a developer can handle.
Actual Behavior
The PlayCanvas loading screen hangs at 0%. (No console errors either)
WebGL Report on these devices (note how it mentions the browser supports WebGL, but it's somehow unavailable)
Additional info
Device/browser reproduced on: Safari 13 on Mac 10.15 PlayCanvas discussion: https://forum.playcanvas.com/t/does-playcanvas-have-api-to-check-webgl-support/14779/4
pc.app
is defined,pc.app.graphicsDevice
is never defined.