CesiumGS / CesiumGS/cesium

Billboards throw errors when Zone.js patches Promise to ZoneAwarePromise

Open
#13,291 4 comments 0 reactions 0 assignees View on GitHub
type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

### What happened?

When using Cesium in an environment where Zone.js is loaded (for example, Angular or any app that uses Zone.js to patch window.Promise with ZoneAwarePromise), creating BillboardGraphics causes runtime errors in the browser console.

### Reproduction steps

1. Load an application using ZoneJS
2. Create a viewer
3. Add an entity with a BillboardGraphics

### Sandcastle example

https://sandcastle.cesium.com/#c=ZVJBbtswEPzKQhfJgLu04aZOVccI4PYWoIcAPQQCAppcS2woUuBSTp3Cfy8lOUHTHgRxhzPD4S6PMgDDDWiv+pZcRBVIRvpmaaiKnFUwXcxnXyrHyEElat7E2HEpRO+6pxqVb8WLd4Q/+XaBy0+4FPveaUs8wX2rsTUubeejiXfWS518Dr1T0XgHxQx+Vw5AecfeElpfF/nDZAkDmfQYAICjDHFHbPq2GJBz+t6SNyQ1yq4jp3eNsbrggVK5t3PeqacjhYCT7wPQL8PRuBrupdNKcrQEEzOl0gS1J4aGAs2BsMZy0B5T646Gnimkyzh6vgjwx4gVuRrLnXdRGkfhcoVJgSmwiYYYpdbFGAWg82yGoOWr0y7lTSvpVngIvv1KdSDi4sP6Cq8+r9frOXxc4GJ1fb2azSeLvbF272XQJVxMAUwrayohRxTjksVk/3jna//ojxSsPGHn6vxich7/57HB2TzbcDxZ2g7YrWk7HyL0wRbJLlLb2fRaOE1cPVF6PDz2fCNeJRttjmD0TZX9040qA2Ulc9o59Nbemxeqsu1GJP472TD+NJfvU8qB0iy3dxOIiBuRyv9V0Xu7l+Evxz8

### Environment

Browser: Any
CesiumJS Version: 1.139
Operating System: Windows

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Sandcastle example in an application where Zone.js patches window.Promise, then trace the BillboardGraphics creation path from the viewer and entity setup. The work is done when adding an entity with a BillboardGraphics produces no runtime errors in the browser console under Zone.js.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.