erdnaxeli / castblock

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

SSL routines:tls_process_cert_verify:bad signature (OpenSSL::SSL::Error) #33

Closed eur0pa closed 2 years ago

eur0pa commented 2 years ago

Latest docker, worked fine last night

pi@europi:~ $ docker run --rm --network host erdnaxeli/castblock --category sponsor --mute-ads --debug
2021-11-24T11:51:13.458746Z   INFO - castblock.chromecast: Found go-chromecast at /usr/bin/go-chromecast.
2021-11-24T11:51:13.459487Z   INFO - castblock.chromecast: Starting the go-chromecast server.
2021-11-24T11:51:13.466890Z  DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/"
2021-11-24T11:51:13.975320Z  DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/"
2021-11-24T11:51:13.981851Z   INFO - castblock.chromecast: The go-chromecast server is up
2021-11-24T11:51:14.475313Z  DEBUG - castblock.blocker: Checking for new devices
2021-11-24T11:51:14.475435Z  DEBUG - http.client: Performing request -- method: "GET", host: "127.0.0.1", port: 8011, resource: "/devices"
2021-11-24T11:51:17.487701Z   INFO - castblock.blocker: New device found -- name: "Chromecast9315", uuid: "ee9eee047f2085fd70c570d1d0034174"
2021-11-24T11:51:17.487709Z   INFO - castblock.blocker: Connect to device -- name: "Chromecast9315", uuid: "ee9eee047f2085fd70c570d1d0034174"
2021-11-24T11:51:17.487745Z  DEBUG - http.client: Performing request -- method: "POST", host: "127.0.0.1", port: 8011, resource: "/connect?uuid=ee9eee047f2085fd70c570d1d0034174"
2021-11-24T11:51:20.630395Z   INFO - castblock.chromecast: Starting go-chromecast watcher -- name: "Chromecast9315", uuid: "ee9eee047f2085fd70c570d1d0034174"
2021-11-24T11:51:20.902711Z  DEBUG - castblock.blocker: Received message -- application: "YouTube"
2021-11-24T11:51:22.932623Z  DEBUG - castblock.blocker: Received message -- application: "YouTube"
2021-11-24T11:51:22.932639Z  DEBUG - castblock.blocker: Youtube video playing -- id: "z-q8ehzHeQQ", current_time: 11.879
2021-11-24T11:51:22.932826Z  DEBUG - http.client: Performing request -- method: "GET", host: "sponsor.ajay.app", port: 443, resource: "/api/skipSegments?categories=%5B%22sponsor%22%5D&videoID=z-q8ehzHeQQ"
Unhandled exception in spawn: SSL_connect: error:1417B07B:SSL routines:tls_process_cert_verify:bad signature (OpenSSL::SSL::Error)
Invalid memory access (signal 11) at address 0x701
[0x5665b8] ???
[0x4e1370] __crystal_sigfault_handler +148
arebokert commented 2 years ago

Sometimes the sponsorblock servers goes down. This could be the reason for the error. You can check the status of their servers at https://status.sponsor.ajay.app/

eur0pa commented 2 years ago

@arebokert nope, curl works fine

~
❯ curl -s 'https://sponsor.ajay.app/api/skipSegments?videoID=o2ixj0m4F_E'|jq
[
  {
    "category": "sponsor",
    "actionType": "skip",
    "segment": [
      0,
      2.939796
    ],
    "UUID": "0f8f9dd3d6e4357ff07833b5c410976022d2fb53e778d0915a612ed18058373e",
...
erdnaxeli commented 2 years ago

Thanks for the report, I am seeing it too.

erdnaxeli commented 2 years ago

Running curl in the same container (on the sponsorblock api) works :thinking: So far I have no clue about the issue.

I am trying to bump to Crystal to 1.2.2 but I got this issue.

erdnaxeli commented 2 years ago

I think the cause was an outdated certificates store in the docker image crystal-alpine 1.0.0. I bumped to 1.1.1 and it seems to works now.

Tell me if that's not the case :)

eur0pa commented 2 years ago

Seems to be working fine using the new Docker image