Entity Label giving Expected index to be typeof number, actual typeof was object

Hey devs,

I have been working on an issue for quite a while which is to do with a large update of Cesium.

We have been stuck on an older version for a while due to issues limiting us from moving to latest.

However, I am having issues with the labels. In my existing implementation after upgrading from
@cesium/engine”: “^18.0.0” → “@cesium/engine”: “^25.0.0”
@cesium/widgets”: “^12.1.0” → “@cesium/widgets”: “^15.0.0”
“cesium”: “~1.123.0” → “cesium”: “~1.141.0”

When adding a label as simple as
` widget.entities.add({

        position: Cartesian3.fromDegrees(0, 0, 0),

        label: {

            text: 'meow',

},

});`

Results in the following stack trace
DeveloperError: Expected index to be typeof number, actual typeof was object

Error
at new DeveloperError (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:7366:11)
at Check.typeOf.number (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:7421:11)
at Check.typeOf.number.greaterThanOrEquals (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:7451:16)
at TextureAtlas.computeTextureCoordinates (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:45798:31)
at BillboardTexture.computeTextureCoordinates (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:130751:16)
at Billboard.computeTextureCoordinates (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:131745:29)
at writeCompressedAttrib0 (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:132577:38)
at writeBillboard (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:132826:3)
at BillboardCollection.update (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:133037:9)
at LabelCollection.update (https://HOST/node_modules/.vite/deps/@cesium_engine.js?v=c6158d33:136003:28)

Now where this gets tricky! I cant reproduce this in sandcastle or a new react project.

I would appreciate all the help :smiling_face_with_tear:

Cheers

It’s hard to be 100% sure. But I’m about … 99.9% sure that this is the same as Billboards throw errors when Zone.js patches Promise to ZoneAwarePromise · Issue #13291 · CesiumGS/cesium · GitHub

I opened Handle promise replacements to avoid crash in BillboardTexture by javagl · Pull Request #13475 · CesiumGS/cesium · GitHub , maybe that can be resolved quickly.

Awesome!!! I really hope so!