After rendering the viewer, scene was frozen.

I’m using my custom terrainProvider for cesium viewer in nextjs project.
I’m using Cesium 1.117 version.
After rendering the viewer on the browser, it works for about 3 seconds, but after that the screen was frozen.
Could you let me know the cause and how to solve this issue?

I’m sharing my code below.

let mapProjection = new CesiumJs.GeographicProjection(ellipsoid)
mapProjection.project(new CesiumJs.Cartographic(0, 0, 0))
cesiumViewer.current = new CesiumJs.Viewer(cesiumContainerRef.current, {
          mapProjection: mapProjection,
          creditContainer: 'cesium-container',
          animation: false,
          baseLayerPicker: false,
          fullscreenButton: false,
          vrButton: false,
          geocoder: false,
          homeButton: false,
          infoBox: false,
          sceneModePicker: true,
          timeline: false,
          navigationHelpButton: false,
          navigationInstructionsInitiallyVisible: false,
          scene3DOnly: false,
          shouldAnimate: false,
          sceneMode: CesiumJs.SceneMode.SCENE3D,
          terrainProvider: terrainProvider,
        })
        cesiumViewer.current.imageryLayers.addImageryProvider(imagery)
        cesiumViewer.current.scene.skyBox.show = false
        cesiumViewer.current.scene.sun.show = false
        cesiumViewer.current.scene.moon.show = false
        cesiumViewer.current.scene.skyAtmosphere.show = false
        cesiumViewer.current.scene.fog.enabled = false
        cesiumViewer.current.scene.globe.showGroundAtmosphere = false
        cesiumViewer.current.scene.globe.cartographicLimitRectangle = extent

        cesiumViewer.current.scene.backgroundColor = CesiumJs.Color.BLACK
        cesiumViewer.current.scene.globe.baseColor = CesiumJs.Color.BLACK

        cesiumViewer.current.scene.globe.depthTestAgainstTerrain = false
        cesiumViewer.current.scene.globe.enableLighting = false
        cesiumViewer.current.scene.globe.showWaterEffect = false

        const camera_west2 = CesiumJs.Math.toRadians(-100.0)
        const camera_east2 = CesiumJs.Math.toRadians(100.0)
        const camera_north2 = CesiumJs.Math.toRadians(90.0)
        const camera_south2 = CesiumJs.Math.toRadians(-90.0)

        const camera_extent2 = new CesiumJs.Rectangle(
          camera_west2,
          camera_south2,
          camera_east2,
          camera_north2
        )
        cesiumViewer.current.camera.setView({ destination: camera_extent2 })
        cesiumViewer.current.camera.moveBackward(1500)