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

Missing temporary directory causes CameraInstance to return undefined. #1

Open
shawjb opened this issue Nov 23, 2020 · 1 comment
Open

Comments

@shawjb
Copy link

shawjb commented Nov 23, 2020

Hi there interesting project I am giving it a quick try.

On my initial run if the temporary directory is missing which it will always be since the program has never been run the rm command here https://github.com/n1ckyrush/wyzecam-hls/blob/master/methods/createCameraInstance.js#L39 fails and causes the camera instance to be undefined which causes issues down stream. I was able to get around this by manually creating the directory then running the app and it seems to be fine from there.

It's late so I haven't submitted a PR but I was thinking a few things here.

  1. Change it so that the command checks for existence first then deletes it.
  2. Undefined camera instance should be removed from the camera instances array.
  3. Have the app clean up it's temporary directories when it is stopped
  4. Put the temporary files in to the system temp directory
@famewolf
Copy link

famewolf commented Jan 2, 2021

Hi there interesting project I am giving it a quick try.

On my initial run if the temporary directory is missing which it will always be since the program has never been run the rm command here https://github.com/n1ckyrush/wyzecam-hls/blob/master/methods/createCameraInstance.js#L39 fails and causes the camera instance to be undefined which causes issues down stream. I was able to get around this by manually creating the directory then running the app and it seems to be fine from there.

It's late so I haven't submitted a PR but I was thinking a few things here.

  1. Change it so that the command checks for existence first then deletes it.
  2. Undefined camera instance should be removed from the camera instances array.
  3. Have the app clean up it's temporary directories when it is stopped
  4. Put the temporary files in to the system temp directory

What exactly do I need to create and where because I keep getting that undefined error in all my streams. I assume this is what you meant?

2021-01-02T18:03:31.054Z [0] [Garage_Cam][checkPlaylistFile] playlist file error TypeError: Cannot read property 'filename' of undefined
at checkPlaylistFile (/root/wyzecam-hls/methods/checkPlaylistFile.js:46:244)

I've gotten to where I can telnet into the camera's...just not sure what to "fix".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants