[SOLVED] Build broken after WebVR update

For some unknown reason my project got corrupted, link between camera and script was lost. (Error showed up) (in build which was tested from top to bottom and was created 3 days ago(!!!))

I opened it 2 days ago and it was good
I opened it yesterday and it was good

I opened it today and it is broken.

Every time it was checked on multiple devices across the world.

How is it possible?

Here is activity log

I think it’s because your engine’s code is linked and not baked into my project/builds…

What project is this on? Can you paste the link to your project?

You have not shared project link and have not explained exact error/issue you are experiencing opening your project.
There were no engine deployments in those days you referring.


look at look-camera.js and web-vr-ui.js (into initialize part) it’s a modified version of tutorial’s scipts (http://developer.playcanvas.com/en/tutorials/webvr-360-image/)

problem is VR. for some reason it’s initialized, when it shouldn’t.

let’s look at code.

if (this.app.vr && this.app.vr.display) {

when project was working that code returned false. Now it returns true.
For some unknown reason. After the build. In changed behavior.

I wasn’t changing this option in project settings before it broke, only after. i toggled it twice.

WebVR specs and implementations do change, and browser vendors do deploy changes now and then, it could have been some recent update of a browser that could have changed some behavior.
Summoning @dave here as he were working on VR polyfil with @yaustar. They could give you a hint.

Please tell us what exact devices and browser versions you are testing stuff. And could you verify that old builds did not changed in behavior (if they did, then it is most likely browser changes that lead to this).

while i reaching to other testers to get their devices and browsers, there is one more thing to note.

tutorial project with same vr managing code works fine, but mine is not. how is it possible?

I remember one more thing. When we found error it was missing Camera attribute on this script on Root object.
Error popped in initialization code block. But there was no errors while we was testing it 2 days in a row (without changing anything in project, as you can see in project’s Activity).
And after assigning the camera we found trouble with VR.

Old builds have that trouble with vr too
But there is one first build which doesn’t have it. :fearful:

But… how? It was working fine long time after first build. lol.

I was sure it was editor(attributes serialization) or engine(as engine’s current version is not baked into build) fault.


Chrome Version 57.0.2987.133 (64-bit)
Mac Os X 10.12.4 (16E195)
Chrome Version 57.0.2987.133
Windows 7 SP1

later i can add a few more

As mentioned, WebVR specs are still in a Draft: https://w3c.github.io/webvr/spec/1.1/
It means that API is not finalized and vendors can change it without notice. This is what is happening in recent months. That explains why some old builds change the way they work. Because once old builds are published - they are fixed, there is nothing we can change on our end to affect them.

I can’t wrap my head around it, sorry D:

They use exactly same code .—.
They were published when they were working

Shouldn’t they behave exactly the same?
I mean, if new one is broken, then why old one is not?

Thanks for the link, found “capabilities” attribute and added it to equation, now it works fine (will do a proper tests later).

Also bear in mind updates to the mobile browser can cause builds not to work correctly as Max mentioned due to changes to potential changes to the WebVR draft/API.

When a build is published, it is published with the engine version at the time. So an older build may be using an older/different version of the engine hence the differences between builds on different days.