Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show error message if Cesium Ion access token is invalid #4739

Closed
Tracked by #5677
nf-s opened this issue Sep 14, 2020 · 4 comments · Fixed by #6675
Closed
Tracked by #5677

Show error message if Cesium Ion access token is invalid #4739

nf-s opened this issue Sep 14, 2020 · 4 comments · Fixed by #6675

Comments

@nf-s
Copy link
Contributor

nf-s commented Sep 14, 2020

No description provided.

@wibily
Copy link
Contributor

wibily commented Jul 7, 2021

Pete: what is the purpose of showing the message if there's nothing the user can do about it?

@wibily wibily self-assigned this Jul 7, 2021
@nf-s nf-s assigned staffordsmith83 and unassigned wibily Nov 23, 2022
@staffordsmith83
Copy link
Contributor

staffordsmith83 commented Jan 9, 2023

Pete: what is the purpose of showing the message if there's nothing the user can do about it?

There is still a purpose: It will notify the user why the map appears to be broken, so rather than think 'This is a terrible product' they realise that creds need to be updated. The use case is probably mostly for maps that we do not host - the users of those maps can then notify their admin. For example, getting a map that looks like this, there is nothing to indicate to non-technical users that there should be terrain underneath unless we show an error in the UI (not the console).
image

@staffordsmith83
Copy link
Contributor

Found this in Cesium.ts - this appears to have been written to handle this situation and commented out at some point

//catch Cesium terrain provider down and switch to Ellipsoid
// terrainProvider.errorEvent.addEventListener(function(err) {
// console.log('Terrain provider error. ', err.message);
// if (viewer.scene.terrainProvider instanceof CesiumTerrainProvider) {
// console.log('Switching to EllipsoidTerrainProvider.');
// that.terria.viewerMode = ViewerMode.CesiumEllipsoid;
// if (!defined(that.TerrainMessageViewed)) {
// that.terria.raiseErrorToUser({
// title : 'Terrain Server Not Responding',
// message : '\
// The terrain server is not responding at the moment. You can still use all the features of '+that.terria.appName+' \
// but there will be no terrain detail in 3D mode. We\'re sorry for the inconvenience. Please try \
// again later and the terrain server should be responding as expected. If the issue persists, please contact \
// us via email at '+that.terria.supportEmail+'.'
// });
// that.TerrainMessageViewed = true;
// }
// }
// });

@staffordsmith83
Copy link
Contributor

staffordsmith83 commented Jan 11, 2023

This is mostly working now, see linked draft PR: #6675
There are still a few errors that need fixing before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants