Dear Cesium users and team!
My application cease to work when I switched from Cesium 1.76 to 1.81. These are the error messages:
Any help would be greatly appreciated.
Sincerely,
Ru
Dear Cesium users and team!
My application cease to work when I switched from Cesium 1.76 to 1.81. These are the error messages:
Any help would be greatly appreciated.
Sincerely,
Ru
Hi Ru,
Without seeing your source code, itâs difficult to tell what ceased to work.
If you look through the releases list of changes (which can be found here: Releases ¡ CesiumGS/cesium ¡ GitHub), since v1.76, do you see any changes that could lead to the issue youâre facing?
You can also isolate exactly which commit broke the application using Git bisect: Git - git-bisect Documentation. This will help narrow down the change in the API that caused your application to stop working.
Dear Dzung!
Thank you very much for your attempt to help me.
Looking through releases from 1.76 to 1.81 I did not found anything that I connect with my problem.
May be I badly understand git bisect documentation. This is citation from it: âThis command uses a binary search algorithm to find which commit in your projectâs history introduced a bug.â But I did only 1 commit in that I changed the folder âCesium-1.76/Build/Cesiumâ on âCesium-1.81/Build/Cesiumâ. So I exactly know what commit breaked my code, but cause somewhere inside Cesium.
Do you know how I can go down error mesagge stack trace from the cesiumWorkerBootStrapper to my code and localise thereby a problem place?
Thanks in advance,
Ru
How do you tell Cesium where its assets live? One of the first things I do in my application page is set window.CESIUM_BASE_URL = "./CesiumStatic/"
. My webpack build copies all of Cesiumâs assets (like its worker scripts) into that subdirectory. Itâs supposed to have some fallback algorithm to âguessâ at the path, but IMHO specifying it explicitly is better.
Hi, James!
I didnât any build. In the beginning I simply copied in my resources/public folder a folder Cesium from the folder Build in the Cesium distribution and adjust references to Cesium in my html and javascript files accordingly. All worked well. Then, when new versions of Cesium were issued, I simply replaced that Cesium folder in resources/public same way. And it worked many times until version 1.80 of Cesium come. I got this error above. I waited for the next version, thought it is a bug, that will be fixed. Alas, the error remains.
What to do I donât know. Thanks all the same.
Sincerely,
Ru
So when you say âadjust references to Cesiumâ, could you post that code here? Even better would be a minimal reproduction â just start with a blank page and include Cesium the same way you do in your project, then try to make a basic Viewer. If it has the same error, you can upload that page somewhere easy to get to (like GitHub) which will make it easier to see whatâs going wrong.
If that approach isnât working, you can try replacing the Cesium youâre using with the âunminifiedâ version thatâs distributed in the NPM package. It should work the same way as the library you have now but the line numbers in the console message will be more useful in understanding the error.
Well, James. In fact, I have found only two references on Cesium code location in my app. Both are in a main and sole html page in this fragment:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Cockpit View</title>
<link rel="stylesheet" href="css/cesium_light.css" />
<script src="Cesium/Cesium.js"></script>
<style>
@import url(Cesium/Widgets/widgets.css);
#cesiumContainer {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
margin: 0;
overflow: hidden;
padding: 0;
font-family: sans-serif;
}
html {
height: 100%;
}
body {
padding: 0;
margin: 0;
overflow: hidden;
height: 100%;
}
</style>
</head>
âŚ
Further, Cesium Viewer opens well. Error appears when I call some particular function in my code. Now I whant to envestigate this proces in details, put debug print in some points and thereby limit the search area. Hope this helps. Thank you.
Can you try inserting
<script>window.CESIUM_BASE_URL = "./Cesium/";</script>
just above
<script src="Cesium/Cesium.js"></script>
to see if it makes any difference? Might have no impact, but it doesnât hurt to try.
Bingo! Miracle! James, you are magician!
This simple addition solved a problem and save me a lot of time.
Thank you very much!
Good luck!
Best regards,
Ru