Not allowed to load local resource: blob:null/32d730a2-08f8-4a71-ac51-b9de6b653872
cesiumjs-test-004.html:1
Not allowed to load local resource: blob:null/f3f70524-5b9d-43f8-9611-ecb2e676dc4b
I have no idea You might have to describe your setup in more detail. Maybe this is going through some sort of âdeploymentâ (webpack or whatnot) that messes something up.
But some additional notes:
You probably donât want to assign a terrainProvider. The Google Photorealistic 3D Tiles should contain everything you need
Did you update from ...releases/1.100 to ...releases/1.120 in the head of your HTML?
Just to rule out this as the cause for the error: Try removing that <script src="mytoken.js"></script>
and (only for the first tests!) setting the token directly, as in Cesium.Ion.defaultAccessToken = "... your token ...";
When you want to use await in the <script>, then you have to define that script as <script type="module">
My âsetupâ is just that html file: as I said, my users shall not download and install anything but an html file. It was possible with previous Cesium releases.
mytoken.js just contains mytoken = âxxxxxxxxxxxâ
Do you perform any forms of build- or post-processing steps on that HTML?
(Is it possible to look at the console or network tab in order to narrow down where these âNot allowed to load local resourceâ errors are coming from exactly? )
This implies asking my users to install a local server. They are users, not developers, I donât want them to download anything and install anything (thatâs the point of using JS, else I would use python or C++ compilers for my projects).
It doesnât. This was intended for testing. I didnât expect that you want to distribute your application by sending your users an HTML file via mail. But thatâs also possible. You can just save that file in a directory and double-click it to open it with your browser, without hosting it. (There are some questions about the token, but thatâs unrelated to that part).
Uncaught TypeError: Cannot read properties of null (reading 'createElement')
at HTMLIFrameElement.<anonymous> (Cesium.js:15896:3383)
cesium001.html:1 Refused to cross-origin redirects of the top-level worker script.
cesium001.html:1 Refused to cross-origin redirects of the top-level worker script.
cesium001.html:1 Refused to cross-origin redirects of the top-level worker script.
It seems to still have worked with 1.108. It seems to no longer work with 1.109. I have not yet identified the exact reason or a workaround. Maybe someone from the CesiumJS core team can chime in here.
I am using Chrome, which is known to have issues with local file system access. But if my Cesium page has no reason to access anything on my file system, why should it even try?!? Indeed previous releases of Cesium worked fine for years; this new âfeatureâ is a major limitation)
Got it. Chrome especially prevents some features when running locally for security reasons.
But if my Cesium page has no reason to access anything on my file system, why should it even try?!?
That one HTML file is loaded off the file system when you or your users open it on their machines. CesiumJS then loads files other than a single JS fileâ like worker JS and CSS, and this is resulting in CORS errors.
For background, the previous behavior was likely changed with 1.109. The change we made was to make CesiumJS more modern and maintainable in the long run. However, I understand why it would be frustrating that this broke previous behavior for your use case.
We think the solution to this is to distribute a version which does not load any additional files, and instead inline all content into a single bundle. Iâll add a note there that this came up for this case.
In the meantime, I still would highly recommend looking into some way to serve the file. That is fairly standard web development practice at this point in time, and is still lighter weight than C++ compilers.