# WebXR loader spinning forever in Quest w/ Oculus Browser

**URL:** <https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132>\
**Category:** Questions\
**Tags:** webxr\
**Created:** [June 11, 2020, 6:32pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132 "2020-06-11T18:32:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuzzy\_wobble](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fuzzy_wobble/32/2413_2.png) [@fuzzy\_wobble](https://discourse.threejs.org/u/fuzzy_wobble)\
**Post date:** [June 11, 2020, 6:32pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/1 "2020-06-11T18:32:11Z")

</div>

When you click Enter XR, the loader in Quest just spins and nothing happens.

The same site works fine on Rift+Firefox.

I enabled remote debugging and there are no errors in the console.

Has anyone encountered this? There are zero errors or warning from Oculus Browser so it’s very difficult to debug.

Using r110

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 11, 2020, 7:08pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/2 "2020-06-11T19:08:23Z")

</div>

I’ve tested some official examples with the latest `three.js` version `r117` just yesterday on an Oculus Quests. Everything runs as expected with latest Oculus Browser.

Have you tried to update `three.js`?

---

<div class="post-metadata">

**Author:** ![fuzzy\_wobble](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fuzzy_wobble/32/2413_2.png) [@fuzzy\_wobble](https://discourse.threejs.org/u/fuzzy_wobble)\
**Post date:** [June 12, 2020, 1:26pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/3 "2020-06-12T13:26:29Z")

</div>

I figured it out. The hard way. This was _very_ difficult to debug because no error was thrown.

**I was using requestAnimationFrame instead of setAnimationLoop in the render loop.**

I updated to the new threejs and noticed now it says [WEB XR NOT AVAILABLE]. So newer threejs supports Quest+OculusBrowser but not Rift+FirefoxBrowser?

Side question, this “module” structure for threejs is extremely annoying. Is there a way to use newer threejs without modules.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 12, 2020, 1:54pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/4 "2020-06-12T13:54:03Z")

</div>

> [@fuzzy\_wobble](#):
>
> this “module” structure

What do you mean with module structure? ES6 modules?

---

<div class="post-metadata">

**Author:** ![mrdoob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mrdoob/32/22417_2.png) [@mrdoob](https://discourse.threejs.org/u/mrdoob)\
**Post date:** [June 12, 2020, 2:09pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/5 "2020-06-12T14:09:42Z")

</div>

> [@fuzzy\_wobble](#):
>
> I updated to the new threejs and noticed now it says [WEB XR NOT AVAILABLE]. So newer threejs supports Quest+OculusBrowser but not Rift+FirefoxBrowser?

That’s correct. Firefox doesn’t support WebXR yet, unfortunately.

---

<div class="post-metadata">

**Author:** ![mrdoob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mrdoob/32/22417_2.png) [@mrdoob](https://discourse.threejs.org/u/mrdoob)\
**Post date:** [June 12, 2020, 2:09pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/6 "2020-06-12T14:09:57Z")

</div>

> [@fuzzy\_wobble](#):
>
> Side question, this “module” structure for threejs is extremely annoying. Is there a way to use newer threejs without modules.

What do you find annoying about it?

---

<div class="post-metadata">

**Author:** ![mrdoob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mrdoob/32/22417_2.png) [@mrdoob](https://discourse.threejs.org/u/mrdoob)\
**Post date:** [June 12, 2020, 2:13pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/7 "2020-06-12T14:13:03Z")

</div>

> [@fuzzy\_wobble](#):
>
> I figured it out. The hard way. This was _very_ difficult to debug because no error was thrown.
> 
> **I was using requestAnimationFrame instead of setAnimationLoop in the render loop.**

Hmm, true… We may be able to help with that actually.

---

<div class="post-metadata">

**Author:** ![fuzzy\_wobble](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fuzzy_wobble/32/2413_2.png) [@fuzzy\_wobble](https://discourse.threejs.org/u/fuzzy_wobble)\
**Post date:** [June 12, 2020, 2:14pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/8 "2020-06-12T14:14:29Z")

</div>

Re, Modules.

For example, if I don’t set up a threejs project using the exact folder structure as you, do I need to edit the directories in every file?

> <https://github.com/mrdoob/three.js/blob/400acd3c78c8e631087322eb1e0e9fc00a16b375/examples/jsm/controls/OrbitControls.js#L18>

For example, how would you include OrbitControls (or any threejs import) if you have a totally different file structure without editing it?

Maybe I am missing something here? I am kinda new to ES6 modules.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 12, 2020, 2:19pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/9 "2020-06-12T14:19:21Z")

</div>

Your import modules via the `npm` package and then bundle everything (library + app code) into a single build file. This file can then be included into an `index.html`. An exemplary project setup with `rollup` looks like so: [https://github.com/Mugen87/three-jsm](https://github.com/Mugen87/three-jsm)

The other option is to strictly import all `three.js` dependencies over a **single** CDN e.g.:

[https://cdn.jsdelivr.net/npm/three@0.117.1/build/three.module.js](https://cdn.jsdelivr.net/npm/three@0.117.1/build/three.module.js)  
[https://cdn.jsdelivr.net/npm/three@0.117.1/examples/jsm/loaders/GLTFLoader.js](https://cdn.jsdelivr.net/npm/three@0.117.1/examples/jsm/loaders/GLTFLoader.js)  
[https://cdn.jsdelivr.net/npm/three@0.117.1/examples/jsm/controls/OrbitControls.js](https://cdn.jsdelivr.net/npm/three@0.117.1/examples/jsm/controls/OrbitControls.js)

---

<div class="post-metadata">

**Author:** ![fuzzy\_wobble](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fuzzy_wobble/32/2413_2.png) [@fuzzy\_wobble](https://discourse.threejs.org/u/fuzzy_wobble)\
**Post date:** [June 12, 2020, 2:20pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/10 "2020-06-12T14:20:13Z")

</div>

Interesting. So would you say it would be more accessible for a wider audience to use r110 for webXR now? Still, lots of people using Rift+Firefox since they didn’t release Oculus Browser for Rift (for reasons I don’t understand).

---

<div class="post-metadata">

**Author:** ![fuzzy\_wobble](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fuzzy_wobble/32/2413_2.png) [@fuzzy\_wobble](https://discourse.threejs.org/u/fuzzy_wobble)\
**Post date:** [June 12, 2020, 2:49pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/11 "2020-06-12T14:49:39Z")

</div>

Since I am not using node I will try the second option. Thanks.

---

<div class="post-metadata">

**Author:** ![mrdoob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mrdoob/32/22417_2.png) [@mrdoob](https://discourse.threejs.org/u/mrdoob)\
**Post date:** [June 12, 2020, 3:06pm UTC](https://discourse.threejs.org/t/webxr-loader-spinning-forever-in-quest-w-oculus-browser/16132/12 "2020-06-12T15:06:56Z")

</div>

I was hoping Firefox Desktop would have added WebXR support by now…
