Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
captainerd opened this issue May 28, 2022 · 1 comment
Open

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

captainerd opened this issue May 28, 2022 · 1 comment
Labels
bug Something isn't working fixed

Comments

@captainerd
Copy link

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

  • Node.js Version: v16.15.0
  • Camera UI Version: v17
  • Operating System: win10
  • Browser: XXX

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 captainerd added the bug Something isn't working label May 28, 2022
@captainerd
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants