Closed dmarcos closed 1 year ago
The latest working version was Firefox 105.0 Ubuntu 20.04. Currently tests fails at the end with timeout 30s with Firefox 107.0 Ubuntu 20.04, but I have no idea why.
On Firefox 105.0 Ubuntu 22.04, the tests fail in the same way. Firefox is blocking on the two following tests https://github.com/aframevr/aframe/blob/5189765cbbd81fc4eefe880045662e33aebd138f/tests/core/scene/a-scene.test.js#L203-L210
If I comment them, tests pass on Firefox 105.0 Ubuntu 22.04. I tested again with those commented tests on Firefox 107.0 Ubuntu 22.04
ERROR: 'An uncaught exception was thrown between tests'
✖ "after each" hook for "does not call exitPresent on desktop without a headset"
Finished in 23.867 secs / 3.701 secs @ 08:45:28 GMT+0000 (Coordinated Universal Time)
SUMMARY:
✔ 745 tests completed
ℹ 4 tests skipped
✖ 1 test failed
FAILED TESTS:
✖ "after each" hook for "does not call exitPresent on desktop without a headset"
Firefox 107.0 (Linux x86_64)
too much recursion
enterVRSuccess@build/commons.js:185602:26
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
enterVRSuccess@build/commons.js:185564:16
enterVR@build/commons.js:185541:5
onVRPresentChange@build/commons.js:185810:12
bound@build/commons.js:225185:17
It seems that when the test ends, it triggers the vrdisplaypresentchange event and we enter infinite loop of enterVR. The two commented tests are probably the same issue.
The three tests having the issue have in common the line
this.sinon.stub(sceneEl, 'checkHeadsetConnected').returns(false)
From my understanding, in those tests we reach this code
https://github.com/aframevr/aframe/blob/5189765cbbd81fc4eefe880045662e33aebd138f/src/core/scene/a-scene.js#L333-L348
The only way we get an infinite recursion is if window.hasNativeWebVRImplementation
is true.
I have it to false on my desktop but maybe it's true in CI.
Actually in CI window.hasNativeWebVRImplementation
is true on both Chrome and Firefox, my guess is that because of how the tests are run, the webvr-polyfill is already loaded when executing those tests. Setting it to false in those tests should fix the issue.
@vincentfretin any ideas?