erdnaxeli / castblock

Automatically skip sponsor segments and ads in YouTube videos playing on Chromecast.
MIT License
182 stars 20 forks source link

Unhandled exception: clock_gettime: Operation not permitted (RuntimeError) #36

Closed gpgekko closed 2 years ago

gpgekko commented 2 years ago

I was experiencing issue #33 and saw that you pushed a new image to fix it. So I tried running that, but now I get the following error:

Unhandled exception: clock_gettime: Operation not permitted (RuntimeError) from usr/share/crystal/src/crystal/system/unix/time.cr:17:5 in 'new' from usr/share/crystal/src/log/main.cr:178:7 in 'new' from src/src/castblock.cr:69:17 in 'run' from src/src/castblock.cr:92:1 in '__crystal_main' from usr/share/crystal/src/crystal/main.cr:39:9 in 'main' from __libc_start_main

This is on a Pi running Raspbian (Debian) 9 (Stretch), kernel version 4.19.66-v7+ armv7l.

erdnaxeli commented 2 years ago

How are you running the docker image?

gpgekko commented 2 years ago

I do not have much experience with Docker yet, but I was running the following command to run castblock:

docker run -d --rm --network host --name castblock erdnaxeli/castblock --mute-ads

I took a guess that it might be related to Stretch being quite old and prepared a new SD card with Raspbian Bullseye and with an environment that is as identical as I can get it, I do not get the error. So I suspect it is indeed something to do with Stretch being old.

I still have the old card if you want me to test something, but for now I am equally happy to just keep using the new SD card with Bullseye, since I wanted to replace the current SD card sooner or later anyway as it was quite small capacity.

erdnaxeli commented 2 years ago

Yeah, I suppose something changed in docker between the version in debian Stretch and the one in Bullseye (it seems at some point it required the --privilegied flag: https://stackoverflow.com/questions/53748644/linux-syscall-clock-settime-fails-with-eperm-in-docker-container).

I will close the issue and add a notice in the README, thanks :)

Evanito commented 2 years ago

+1

diawinga commented 1 year ago

Yeah, I suppose something changed in docker between the version in debian Stretch and the one in Bullseye (it seems at some point it required the --privilegied flag: https://stackoverflow.com/questions/53748644/linux-syscall-clock-settime-fails-with-eperm-in-docker-container).

I will close the issue and add a notice in the README, thanks :)

There is a typo above, it should be --privileged , instead of --privilegied i.e. try to run it as

docker run --privileged --rm --network host erdnaxeli/castblock