moehmeni / syncedlyrics

Get an LRC format (synchronized) lyrics for your music
MIT License
188 stars 18 forks source link

SSL certificates fail for lrclib and megalobiz #25

Closed hseg closed 3 months ago

hseg commented 4 months ago

Am getting the following errors running tests

E           urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='lrclib.net', port=443): Max retries exceeded with url: /api/search?q=bad+guy+billie+eilish (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
E               requests.exceptions.SSLError: HTTPSConnectionPool(host='www.megalobiz.com', port=443): Max retries exceeded with url: /search/all?qry=bad%20guy%20billie%20eilish&searchButton.x=0&searchButton.y=0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))

Perhaps these sources should be downgraded to connecting with HTTP only?

moehmeni commented 4 months ago

Can you check again with the latest code (clone from repo) since #26 changed requests to curl_cffi. Maybe it can solve it.

deedy5 commented 4 months ago

@hseg Try to update certifi package

pip install -U certifi
hseg commented 4 months ago

Indeed, rebuilding against HEAD with the curl-cffi dependency fixes the tests. Would appreciate if you could make a release for this soon, that way I can prod the packager for Arch Linux to edit the dependencies. (Or I guess I could release a version tracking HEAD...)

moehmeni commented 3 months ago

It is not related I think to none of these. Sometimes Megalobiz returns 5xx status code based on logs. It's the same problem for NetEase, which made me remove it from tests. CI environment may not be reliable because I tested it many times on local and it works. Another issue for Genius as well [1].

[1] https://github.com/moehmeni/syncedlyrics/issues/27#issuecomment-2000081737

hseg commented 3 months ago

On Fri, Mar 15, 2024 at 10:09:45AM -0700, Mohammad Momeni wrote:

It is not related I think to none of these. Sometimes Megalobiz returns 5xx status code based on logs. It's the same problem for NetEase, which made me remove it from tests. CI environment may not be reliable because I tested it many times on local and it works. Another issue for Genius as well [1].

[1] https://github.com/moehmeni/syncedlyrics/issues/27#issuecomment-2000081737

Testing this again, I see this is actually caused by my university's network blocking these domains 🙄. Will test again when I get home, sorry for noise.

hseg commented 3 months ago

On Fri, Mar 15, 2024 at 10:09:45AM -0700, Mohammad Momeni wrote:

It is not related I think to none of these. Sometimes Megalobiz returns 5xx status code based on logs. It's the same problem for NetEase, which made me remove it from tests. CI environment may not be reliable because I tested it many times on local and it works. Another issue for Genius as well [1].

[1] https://github.com/moehmeni/syncedlyrics/issues/27#issuecomment-2000081737

OK, you can close this -- testing confirms this was a network error on my end. Sorry for the noise.

moehmeni commented 3 months ago

No problem 👍🏼