CesiumGS / CesiumGS/cesium

DeviceOrientationCameraController specs fail in Chrome and Edge on Windows

Open
#9,782 0 comments 0 reactions 0 assignees View on GitHub
test failure
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Running the specs for DeviceOrientationCameraController, I get the following error:

```
Scene/DeviceOrientationCameraController rotates for alpha
ReferenceError: DeviceOrientationEvent is not defined
ReferenceError: DeviceOrientationEvent is not defined
at createDeviceOrientationEvent (http://192.168.1.173:8080/Specs/DomEventSimulator.js:297:5)
at Object.fireDeviceOrientation (http://192.168.1.173:8080/Specs/DomEventSimulator.js:355:7)
at fireEvent (http://192.168.1.173:8080/Specs/Scene/DeviceOrientationCameraControllerSpec.js:43:23)
at http://192.168.1.173:8080/Specs/Scene/DeviceOrientationCameraControllerSpec.js:60:5
at Object. (http://192.168.1.173:8080/Specs/spec-main.js:93:20)
at attemptAsync (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1793:24)
at QueueRunner.run (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1746:26)
at QueueRunner.execute (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1732:10)
at Spec.queueRunnerFactory (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:620:35)
at Spec.execute (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:357:10)
Scene/DeviceOrientationCameraController rotates for beta
ReferenceError: DeviceOrientationEvent is not defined
ReferenceError: DeviceOrientationEvent is not defined
at createDeviceOrientationEvent (http://192.168.1.173:8080/Specs/DomEventSimulator.js:297:5)
at Object.fireDeviceOrientation (http://192.168.1.173:8080/Specs/DomEventSimulator.js:355:7)
at fireEvent (http://192.168.1.173:8080/Specs/Scene/DeviceOrientationCameraControllerSpec.js:43:23)
at http://192.168.1.173:8080/Specs/Scene/DeviceOrientationCameraControllerSpec.js:80:5
at Object. (http://192.168.1.173:8080/Specs/spec-main.js:93:20)
at attemptAsync (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1793:24)
at QueueRunner.run (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1746:26)
at QueueRunner.execute (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1732:10)
at Spec.queueRunnerFactory (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:620:35)
at Spec.execute (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:357:10)
Scene/DeviceOrientationCameraController rotates for gamma
ReferenceError: DeviceOrientationEvent is not defined
ReferenceError: DeviceOrientationEvent is not defined
at createDeviceOrientationEvent (http://192.168.1.173:8080/Specs/DomEventSimulator.js:297:5)
at Object.fireDeviceOrientation (http://192.168.1.173:8080/Specs/DomEventSimulator.js:355:7)
at fireEvent (http://192.168.1.173:8080/Specs/Scene/DeviceOrientationCameraControllerSpec.js:43:23)
at http://192.168.1.173:8080/Specs/Scene/DeviceOrientationCameraControllerSpec.js:97:5
at Object. (http://192.168.1.173:8080/Specs/spec-main.js:93:20)
at attemptAsync (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1793:24)
at QueueRunner.run (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1746:26)
at QueueRunner.execute (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:1732:10)
at Spec.queueRunnerFactory (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:620:35)
at Spec.execute (http://192.168.1.173:8080/ThirdParty/jasmine-2.2.0/jasmine.js:357:10)
```

Environment:

- Cesium 1.84 release (from zip file)
- pending 1.85 release (also from zip file)

Windows 10 Home 10.0.19043 Build 19043
NVIDIA GeForce RTX 2070

This error happens in the following browsers:
Chrome 92.0.4515.159
Edge 92.0.902.84

But not:
Firefox 91.0.2

Interestingly, this error has been seen before in IE 11 [a long time ago](https://github.com/CesiumGS/cesium/issues/2860#issuecomment-178120035) though not sure if it's related.

Contributor guide

Open the contributing guide

Research direction

Start with Specs/DomEventSimulator.js at createDeviceOrientationEvent and fireDeviceOrientation, then read Specs/Scene/DeviceOrientationCameraControllerSpec.js around the alpha, beta, and gamma cases. Reproduce the specs in Chrome or Edge and determine why DeviceOrientationEvent is unavailable there. Done means those DeviceOrientationCameraController specs pass in the affected browsers without breaking Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.