# Issues migrating from 1.104 to 1.110.1

**URL:** <https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735>\
**Category:** CesiumJS\
**Created:** [October 31, 2023, 11:59am UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735 "2023-10-31T11:59:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [October 31, 2023, 11:59am UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/1 "2023-10-31T11:59:43Z")

</div>

Hello,

I’m having some issues when updating the code.I know there are some breaking changes happing already at 1.107.

But I can’t seem to figure out why a simple code snippet like:

> function flyToLoc(lat, long, alt){  
> viewer.camera.flyTo({  
> destination: Cesium.Cartesian3.fromDegrees(lat, long, alt),  
> });  
> };

Won’t run, I spec the coordinates in html with onclick. It just prints “flyToLoc is not defined” in console.  
And in other js files (separated per functionality). They just print “viewer is not defined”.

Any help would be appreciated. The application works running the 1.104 version.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![bertt](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/bertt/32/2702_2.png) [@bertt](https://community.cesium.com/u/bertt)\
**Post date:** [October 31, 2023, 12:43pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/2 "2023-10-31T12:43:25Z")

</div>

probably something with script type=module that’s now needed

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [October 31, 2023, 12:45pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/3 "2023-10-31T12:45:40Z")

</div>

Yes I have added type=module to the main js file where the the flyToLoc function is.

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [November 3, 2023, 1:34pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/4 "2023-11-03T13:34:09Z")

</div>

Hi there,

I think this issue is outside of the function you listed here.

Would you mind telling us more about your build config and how you import Cesium?

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [November 6, 2023, 7:39am UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/5 "2023-11-06T07:39:16Z")

</div>

Hi Gabby, thanks for taking the time to reply. I have manged to solve the problem. The functions where not accessible in the global scope since I used onclick, now I use:

> const citynameLink = document.getElementById(‘cityname’);  
> citynameLink.addEventListener(‘click’, () =\> flyToLoc(latnumber, longnumber, altnumber));

And before I used the function in my post, calling it using onclick=“flyToLoc(latnumber, longnumber, altnumber)”.

I will keep this post open untill we are fully migrated, in case if any other problem come up.  
/A

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [November 6, 2023, 7:44am UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/6 "2023-11-06T07:44:28Z")

</div>

To answer your question, we are currently importing cesium via your CDN.  
We might use npm and webpack later down the road.

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [November 8, 2023, 7:05am UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/7 "2023-11-08T07:05:29Z")

</div>

Hey again, we are getting “Error RESULT\_CODE\_HUNG”. This seem to happen when the user orbits the camera and is or are close to the ground, then everything freezes. Then you get an alert asking if you should wait for the site to respond or close the site. This happens on both Chrome and Edge.

We have not had this issue in CesiumJS before. But we have had it in Cesium Ion e.i. Stories mode. [https://community.cesium.com/t/cesium-crashing-heavly-in-storys/24765/4](https://community.cesium.com/t/cesium-crashing-heavly-in-storys/24765/4)

Have you guys experienced anything like this before?

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [November 8, 2023, 8:01pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/8 "2023-11-08T20:01:52Z")

</div>

> [@Albnas](#):
>
> Error RESULT\_CODE\_HUNG

Interesting, I’m not sure what the exact cause of that may be.

It could be based on the amount of memory the app is using. Would you be able to provide a code snippet, or ion asset IDs that we could use to troubleshoot?

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [November 9, 2023, 3:40pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/9 "2023-11-09T15:40:04Z")

</div>

Thanks for your reply,  
Code snippet or ion asset ID of what?  
The terrain asset?

I don´t know if other people have had this crashing issue in story mode. If not, I´am thinking maybe it could be our custom terrain some how causing this?

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [November 14, 2023, 2:44pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/10 "2023-11-14T14:44:07Z")

</div>

Hi Albnas,

A code snippet reproducing the error.

The terrain provider you’re using will be helpful to know. If it is on Cesium ion, you can let us know the Asset ID and we will be able to check the data.

If this is something that is only replicated with a specific camera movement, maybe a video would be helpful?

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [November 14, 2023, 3:28pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/11 "2023-11-14T15:28:52Z")

</div>

Hi @Gabby_Getz , thanks for taking your time to reply. Do you have a email I can send the video to? I can’t upload a video here, it is not an allowed format.

/Albin

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [November 14, 2023, 4:52pm UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/12 "2023-11-14T16:52:17Z")

</div>

Hi Albin,

Sure, please send the video to [gabby@cesium.com](mailto:gabby@cesium.com) and [support@cesium.com](mailto:support@cesium.com).

---

<div class="post-metadata">

**Author:** ![Albnas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/albnas/32/3476_2.png) [@Albnas](https://community.cesium.com/u/Albnas)\
**Post date:** [December 12, 2023, 7:25am UTC](https://community.cesium.com/t/issues-migrating-from-1-104-to-1-110-1/27735/13 "2023-12-12T07:25:51Z")

</div>

I have sent emails, but got no response, but I saw now this issue was resolved with the updated to 1.112 ( [#11630](https://github.com/CesiumGS/cesium/pull/11630)) I haven’t experinced it any more.

Thanks you guys!
