CORS and 503s suddenly showing

1. A concise explanation of the problem you’re experiencing.

We have an elderly cesiumjs instance on our hobby website. I haven’t looked at it for literally years and its worked fine until a few days ago. The tracks are still loading fine from kml files, but they are displayed with no terrain behind, just stars. In chrome log there is the following information:
Failed to load resource: the server responded with a status of 503 (Service Unavailable)

363989:1 Access to XMLHttpRequest at ‘https://assets.agi.com/stk-terrain/world/layer.json’ from origin ‘https://www.ka72.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Example page exhibiting the issue:

https://www.ka72.com/Track/t/363989

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you’re using, your operating system and browser.

As I said, the version is quite old, I think dating from 2015. We reached a point where newer versions just didn’t work with our kml files any more, so due to the break in backward compatibility we had to stop upgrading. However, it looks as though this issue is due to the unavailability of terrain tiles at the above url, so if I could update the embedded script with an updated url and get the site working again that would be very helpful.

Hey Dylan,

That terrain server has been deprecated for a while. The assets now stream from Cesium ion, see this thread for more context:

https://groups.google.com/forum/#!topic/cesium-dev/yrFyyTLoGyk

I think the most straightforward way to update the URL without updating CesiumJS is to get an ion account, get a token, load terrain in CesiumJS 1.51, find out what the URL it’s using is (either by console.logging or checking the network tab) and then replace the old AGI link with the ion one).