Issue(s) found in v1.4

I found that when I run my code (that worked in v1.2/v1.3) I got a number of errors:

Initially I got the following error:

TypeError: Cannot read property ‘center’ of undefined

at Primitive.update (
at PrimitiveCollection.update (
at updatePrimitives (
at render (
at Scene.render (
at CesiumWidget.render (
at render (

After debugging I found out that at line 78357 of Cesium.js the code tried to access:

But the geometry object doesn’t contain boundingSphereCV. However it does contain boundingSphere so I thought I’ll try to change it. Afterwards I got the following error:

DeveloperError: Appearance/Geometry mismatch. The appearance requires vertex shader attribute input ‘compressedAttributes’, which was not computed as part of the Geometry. Use the appearance’s vertexFormat property when constructing the geometry.
at new DeveloperError (
at validateShaderMatching (
at Primitive.update (
at PrimitiveCollection.update (
at updatePrimitives (
at render (
at Scene.render (
at CesiumWidget.render (
at render (

At line 78128 of Cesium.js I found a loop checking if attributeLocations contains the same properties as shaderAttributes does (only applicable to it’s own properties). Mostly it does, except for (as the error message mentions) compressedAttributes which causes this error. I’m not quite sure why this is missing but this error might be caused by fixing the first one the way I did.

Does anyone know why this/these error(s) are occurring and how to fix this? If you need any more information please ask.

Here is the code that creates the Geometries that I suspect are causing this error. Mind you that this exact code does work in v1.2/v1.3.

function getDistrictGeoInstance(d) {
if (d && d.geo) {
geopositions = ;

for (var i = 0; i < d.geo.length; i++) {
var g = d.geo[i];
geopositions.push(Cesium.Cartographic.fromDegrees(parseFloat(g.lon), parseFloat(;

var color = Cesium.Color.fromBytes(zerocolor.r, zerocolor.g, zerocolor.b, districtalpha);
var height = 0;

return new Cesium.GeometryInstance({
geometry : Cesium.PolygonGeometry.fromPositions({
positions : ellipsoid.cartographicArrayToCartesianArray(geopositions),
extrudedHeight: height,
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(color)
id: “D” +


The above code is called in a loop iterating through al districts and gets an geometryInstance for each of them and saves them to an array after checking if they fit to certain criteria (nothing is changed). After all districts have their geometryInstances the array gets passed into the next function (if it contains at least 1 entry):

function getDistrictsPrimitive(darray) {
return primitives.add(new Cesium.Primitive({
geometryInstances : darray,
appearance: new Cesium.PerInstanceColorAppearance({
closed: true,
translucent: true


I suspect these Instances because Cesium appears to work perfectly until these geometries are added (they are also the first geometries to be added).

As a quick test, can you try and run your app in a new private/incognito mode tab on whatever browser you’re using. Sometimes when upgrading JS libraries, the browser cache fails to pick up the new version immediately resulting in errors like this (private mode ignores the cache so it makes it easy to test for this).

If it still happens in private mode, then we’ll have to dig a little deeper.

I’m receiving the same error when attempting to load a KML from the latest kml-branch build.

I tried the private/incognito mode though I’m still receiving the same error messages (i.e. the first set of error messages posted).

Can you share the KML that is causing the problem? If I can reproduce it on our end it will hopefully make it easy to fix.

Ah this did fix the issue, thanks. I did remove all browsing data in my “normal mode” but that didn’t fix it… Anyway thanks!

The file was too large so I put it into Google Drive

Part of it that probably makes it problematic is rendering both points and polygons (excluding innerBoundaryIs) at times. It appears to load in Google Earth without problems.

It starts to load but then crashes with this error message:

TypeError: Cannot read property ‘center’ of undefined

TypeError: Cannot read property ‘center’ of undefined

at U.update (

at a.update (

at ct (

at dt (

at vt.render (

at A.render (

at t (

Solved it.

Forgot to replace old JS files with the new ones from the new build.