AR Camera Not Starting

Just went to work on some AR projects that were working fine yesterday to find they are no longer launching the camera. Doesn’t even bring up a permission request dialog. Just gives me a blank grey screen.

Everything looks normal in the console. Tried on Firefox and Chrome on Linux and Android with the same result. Some older projects I haven’t modified recently are also doing the same thing. Previously published apps are working fine.

Ok, now published projects aren’t working either. Not even one I downloaded as a zip a few days ago.

I can hardly keep track of what’s working and what isn’t now. The one I linked above now works on mobile again but not desktop, same with the AR Starter Kit published copy.

The one I uploaded as a standalone zip doesn’t work. No launch.playcanvas URL is working anywhere.

Just published a new version of my project above and it works on mobile. Still grey screen with no camera permission request on desktop.

Is this an WebXR project or using the AR Toolkit?

It’s possible that the browsers have been updated due to a recent exploit patch.

Tried on a couple of laptops that haven’t had any updates carried out for weeks. I don’t think my phone has updated anything recently either.

This is the project it’s based on:

https://playcanvas.com/editor/scene/523517

Desktop:
Editor = not working
Published = not working

Mobile:
Editor = not working
Published = working

Could there be some change on the servers that might have affect this? It doesn’t seem to be specifically PlayCanvas related as I tried forcing several older versions with the same result.

Edit
I just double checked the URL on the mobile and it was using http on this last try. Changed that to https and it’s working through the launch.playcanvas.com links. I’m pretty sure I checked this earlier. History says https for everything else.

So, current status:
Desktop = not working
Mobile = working

(Still not working with the previously zipped version at all.)

Desktop URLs are definitely using https.

I’ve forked the starter kit and tried it on:

Launch tab Mac Chrome Version 86.0.4240.111 (Official Build) (x86_64): Works fine
Launch tab Mac Chrome Version 86.0.4240.183 (Official Build) (x86_64): Works fine
Published build Mac Chrome Version 86.0.4240.183 (Official Build) (x86_64): Works fine
Published build Android Chrome 86.0.4240.110: Works fine
Published build iPhone Safari (iOS version 12.1 (16B92)): Works fine

Just tried it on MacOS and both Safari and Brave run fine via both published and launch.

Tested in Windows and neither Firefox or Chrome work.

Windows 10, Chrome Version 86.0.4240.111 (Official Build) (64-bit): Launch and published tabs work for me.

Same with Version 86.0.4240.183 (Official Build) (64-bit)

I would double check the permissions for Camera access on the PlayCanvas domain in the browser.

Go to settings -> Privacy and Security -> Site Settings and check there.

Permissions seem fine. Nothing blocked in Chrome. Firefox has both playcanv.as and launch.playcanvas.com set to Allow.

It’s very strange that it’s happening on specific hardware, across systems on my main laptop, and on devices that haven’t had any updates applied recently.

Though a Samsung Slate 7 I haven’t used in a while works fine in Firefox and Chrome.

I just thought to look for a webcam tester and found webcamtests.com. The same pattern is emerging there. Where PlayCanvas is failing, webcamtests is unable to access the webcam. So it doesn’t seem to be PlayCanvas itself at fault but there is definitely something weird going on.

Ok, so two dumb things.

First, one of the other laptops I was testing doesn’t even have a webcam (I have a similar model that does so I assumed this one did without even checking).

Secondly, there’s a webcam toggle button on my main laptop (hardware level so it affects all operating systems). Apparently I’ve pressed that accidentally at some point, though it’s a very unlikely Fn + F6 combination to accidentally press.

Maybe this coincided with accidentally accessing everything via http on mobile somehow (though I’m still sure I checked that before that one that I noticed was wrong).

Comedy ensues.

Aaanyway, everything appears to be in order again. Excuse me while I go and hand in my computer licence.

2 Likes

Fun times! Easily done :rofl: