Hello
Today an old version of my app had some functionality that stopped working. After some time investigating I found out that the issue is that the Cesium Default Token stopped working. I know that this is a token meant to be replaced (which is what I do) but I don’t understand why it breaks everything:
Explanation :
When I run my app, (under angular using angular-cesium and cesiumJs) instantly an API call is fired from Cesium (containing the default token set in cesium JS source code).
I do not have any idea where this is called (as I do not make the call myself, but it return 401 cause the default token is expired).
Now a few moment later, from my API, i receive the user token registered in our BE and I apply it to my next cesium call and also set it like this.
Cesium.Ion.defaultAccessToken = accessToken
the problem is, even tho the token is now available, some part of the app like the following do not work anymore :
const promise = Cesium.sampleTerrainMostDetailed(this.terrainProvider, copy);
promise.then(
updatedPositions => console.log(updatedPositions),
e => console.log(e)
);
The promise never go neither in the catch or the success, it just do nothing at all.
I hard replaced the defaultToken in cesium source code, to one of the more recent version, and it works.
What am I doing wrong ?
P.S : I also tried to set the defaultAccessToken directly in my code, before everything, but the error still appear wehen using outdated ceseium package