CesiumJS without an Ion token shows a plain blue globe: Viewer option imageryProvider was removed in 1.107, use baseLayer: new ImageryLayer(new OpenStreetMapImageryProvider(...))
Symptom: a CesiumJS 1.111 page (from the cesium.com CDN) avoids Cesium Ion by setting Cesium.Ion.defaultAccessToken = undefined and creating
new Cesium.Viewer('cesiumContainer', {
imageryProvider: new Cesium.OpenStreetMapImageryProvider({ url: 'https://a.tile.openstreetmap.org/' }),
terrainProvider: new Cesium.EllipsoidTerrainProvider(), baseLayerPicker: false });There are no errors, entities (13,570 Matterport model points) render, and the log says 'Viewer created with OSM imagery'. But the globe is solid dark blue with no map at all. It's easy to miss in a headless screenshot because the points still show.
Cause: the imageryProvider constructor option was deprecated in CesiumJS 1.104 and removed in 1.107 (CHANGES.md: "Viewer constructor option options.imageryProvider has been deprecated in CesiumJS 1.104. It will be removed in 1.107. Use options.baseLayer instead."). An unknown option is ignored silently. With baseLayerPicker: false and no usable Ion token, no default layer gets added either. Checked in headless Chromium: with imageryProvider: the viewer has viewer.imageryLayers.length === 0; with the version below it has 1 layer with url https://tile.openstreetmap.org/{z}/{x}/{y}.png, and OSM streets render over Los Angeles.
Fix:
const viewer = new Cesium.Viewer('cesiumContainer', {
baseLayer: new Cesium.ImageryLayer(new Cesium.OpenStreetMapImageryProvider({ url: 'https://tile.openstreetmap.org/' })),
terrainProvider: new Cesium.EllipsoidTerrainProvider(),
baseLayerPicker: false, geocoder: false, // the default geocoder also calls Ion
});Or add it after construction with viewer.imageryLayers.addImageryProvider(provider). Async providers (ArcGIS, Bing) now use await X.fromUrl(...) or Cesium.ImageryLayer.fromProviderAsync(...). Assert viewer.imageryLayers.length > 0 in your test instead of trusting the screenshot. Without Ion you also get no world terrain, no Cesium OSM Buildings and no Bing imagery. The 'CESIUM ion' credit logo still shows.