seydx / camera.ui

NVR like user Interface for RTSP capable cameras
https://github.com/seydx/camera.ui
MIT License
656 stars 104 forks source link

Cannot read properties of undefined (reading 'toFixed') #212

Open captainerd opened 2 years ago

captainerd commented 2 years ago

Describe the bug At starting the server and/or at radom times (not sure for the last one) we may get TypeError: Cannot read properties of undefined (reading 'toFixed')

To Reproduce Enable recording start the server.

Expected behavior Record

Logs

Screenshots

Environment

Seems it is caused by this piece of (Orphan?) code at the event.cotroller.js

      if (!allowRecording) {
            log.warn(
              `The available disk space is less than 1 GB (${diskSpace.available.toFixed(2)
              } GB)! Please free up disk space to be able to create new recordings!`,
              cameraName
            );

            log.info('Skip local storage of the recording..', cameraName);
          }
captainerd commented 2 years ago

PS. despite allowRecording would be true which ! will equal not true. expecting someone when recording is true this will be ignored. (i guess as far as i can see) seems removing this completly solved also the issue.

mkz212 commented 1 month ago

🎉 A new version of camera.ui

A new version of camera.ui is currently under active development. An initial alpha/beta release and previews are coming soon. Stay tuned for exciting updates: https://github.com/seydx/camera.ui/issues/448 .

This version will no longer be developed / fixed. The new version contains many novelties and fixes (most important is for HKSV recording).