New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aframe-xr won't load in WebXR-Viewer w/ aframe v0.8.2 #17
Comments
Not sure where to start. The version in vendor is still showing 0.7.x, I've never tried upgrading to even 0.8. If you figure it out, I'd love to updating the version here to 0.8.x, but I (alas) don't have time to look into this. |
I can confirm that the 0.8.1 version of aframe works with aframe-xr - I am using it as dependency and not from vendor. You still need to add three.xr.js, though. About the 0.8.2 version, I am looking into that - still not sure if the problem lies in the WebXR Viewer or somewhere in between aframe-xr to aframe (or both). |
With 0.8.2 I get the following error on WebARonARCore with S8:
This is apparently this line: Line 35 in 50326e4
maybe enterVR is now a read only property in aframe 0.8.2? |
This seems to be a random issue on WebARonARCore, I don't have the error anymore... or maybe I changed something, I don't remember. |
I updated my last two comments to say the error I saw was on WebARonARCore. |
I've bisected the aframe commits to find the breaking change and found out that since aframe upgraded the webVR-polyfill from 0.9.40 to 0.10.3 it won't work properly. Still not sure this is the thing that is causing the problem, but I'm getting there! @vincentfretin during the bisect I've experienced the overlapping ar/vr buttons also, but tapping either won't work. Couldn't see any errors though. |
Glad to see some progress ... sorry I don't have much insight here! |
Same here, tapping doesn't work for me on WebARonARCore, no error. Tapping works on WebXR Viewer. |
On WebARonARCore, I have touchstart event on window, but no click event on my raycaster entity with aframe master and aframe-xr. |
For the error #17 (comment) on WebARonARCore, it was actually on 0.7.1 when I got this error, not 0.8.2. In aframe 0.7.1, the enterVR, exitVR are using For the click not working with WebARonARCore, with aframe 0.8.0 or 0.8.2, can it be related to a dom element that is above the aframe canvas? I had a similar issue with a full width and height transparent div above the aframe canvas in my project. I'll look closer into webxr-polyfill. Maybe you have some pointers @blairmacintyre For the issue on WebXR Viewer with aframe 0.8.2 where the background stay white (do you have this behavior @Danpollak ?), it is probably a conflict or race condition between latest webvr-polyfill and webxr-polyfill? Actually I have sometime the camera feed working when I enable some of |
Ah I'm going somewhere. My intuition about the element above the canvas seems correct. It seems the a-scene element if above the canvas on WebARonARCore.
without aframe-xr, no logs, with aframe-xr, I have logs saying the click is on a-scene.
the click event doesn't go to document (so no logs) and tapping works correctly, the issue is fixed. I think this has to do with the way the canvas is created for arcore, but I don't really know what is the difference between simple aframe and aframe+aframe-xr though. |
With aframe alone (no three.xr), the canvas is created as a child of a-scene. With three.xr and aframe-xr, the canvas is created as a child of div.webxr-sessions which is the second element in body. There is another canvas inside the div.webxr-realities (first element of body) for the camera video frame I think? |
So I continued to debug with WebXR Viewer
In aframe-xr/src/systems/xr.js I put in cameraActivated the following line to debug:
and included three.xr.js by editing aframe-xr/src/systems/xr.js and put the following lines at the top
and rebuilt aframe-xr. Now navigator.XR is defined and I go in aframe-xr/src/systems/xr.js initXR, I have two displays, the first supports ar, the second one doesn't support ar. I have the iPad 2018.
it works properly. |
This fix is not enough, WebXRManager this.startPresenting go to the VR branch instead of AR branch because displayVR is defined. startPresenting should have a reality parameter I think. |
And in aframe-xr/src/systems/xr.js, disable look-controls on camera to not update the orientation on every tick (because it's enabled now with #18):
Well we should probably enable it back when ending the AR session, similar to what aframe-ar does https://github.com/chenzlabs/aframe-ar/blob/ff7202b838355be603ecd0722093f3c7586f4e08/src/ar-camera.js#L15-L20 @blairmacintyre in sessionEnded Lines 129 to 136 in 50326e4
there is an error no? Shouldn't it be the following?
|
I'll clean up my changes (removing all debug info :)) and do a PR for three.xr.js and aframe-xr to be easier to review. |
@vincentfretin amazing work!! I won't be able to test it till Sunday (no iOS available), but it seems like you nailed it! Will give a more in-depth feedback once I get my hands on an iPhone. |
Oh man I included |
For the two displays issue, see mozilla/three.xr.js#11 |
For the raycaster click that wasn't working on both WebXR Viewer and WebARonARCore, I did this c0544e7 to fix it. |
Hey everyone,
Ever since upgrading our app from aframe v0.8.1 to v0.8.2, we are experiencing issues with running aframe-xr.
With further debugging we found out that the "enterAR" method won't load the scene correctly and will eventually crash it.
I suspect that it might be caused by an event emitter, but I'm still trying to find out what might cause that.
(note that the app works fine on the WebARonARCore browser)
Tested on iPhone 7, iOS v. 11.3.1 (15E302).
Latest https://github.com/mozilla-mobile/webxr-ios build.
Any ideas where to start looking?
The text was updated successfully, but these errors were encountered: