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

SSL: CERTIFICATE_VERIFY_FAILED on OS X 10.10.3 #5393

Closed
aisrael opened this issue Apr 10, 2015 · 5 comments
Closed

SSL: CERTIFICATE_VERIFY_FAILED on OS X 10.10.3 #5393

aisrael opened this issue Apr 10, 2015 · 5 comments

Comments

@aisrael
Copy link

@aisrael aisrael commented Apr 10, 2015

youtube-dl: stable 2015.04.03 (bottled), HEAD (installed via Homebrew) was working great until yesterday, then I upgraded to OS X Yosemite 10.10.3 overnight.

Now, I keep getting

ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed (_ssl.c:581)> (caused by URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed (_ssl.c:581)'),))

A workaround is to use the --no-check-certificate flag.

Pretty sure this isn't youtube-dl's fault (OS X 10.10.3 probably trashed some roots or CA certificate files) but I'm putting it here so someone with more time and understanding than me can maybe post a proper solution, and so others can find it here, too.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 10, 2015

Please post the full verbose log with --verbose option

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 10, 2015

Possibly a duplicate of #5317. Could you try the workaround provided by @izzyleung in #5317 (comment)?

@aisrael
Copy link
Author

@aisrael aisrael commented Apr 10, 2015

$ youtube-dl --verbose https://www.youtube.com/watch?v=dQw4w9WgXcQ
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=dQw4w9WgXcQ']
[debug] Encodings: locale UTF-8, fs utf-8, out None, pref UTF-8
[debug] youtube-dl version 2015.04.03
[debug] Python version 2.7.9 - Darwin-14.3.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.6.1, ffprobe 2.6.1
[debug] Proxy map: {}
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)> (caused by URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),))
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 314, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1673, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 695, in https_open
    req, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)

(Apologies for the URL ;) )

@aisrael
Copy link
Author

@aisrael aisrael commented Apr 10, 2015

Got it, tried the workaround in #5317 (comment).

The following worked:

SSL_CERT_FILE=/Users/aisrael/curl-7.41.0/lib/ca-bundle.crt youtube-dl --verbose https://www.youtube.com/watch?v=dQw4w9WgXcQ

And yields (for reference):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=dQw4w9WgXcQ']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.04.03
[debug] Python version 2.7.9 - Darwin-14.3.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.6.1, ffprobe 2.6.1
[debug] Proxy map: {}
[youtube] dQw4w9WgXcQ: Downloading webpage
[youtube] dQw4w9WgXcQ: Extracting video information
[youtube] {43} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {18} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {5} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {36} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {17} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {135} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {244} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {134} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {243} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {133} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {242} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {160} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {140} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] {171} signature length 42.40, html5 player en_US-vflOOhwh5
[youtube] dQw4w9WgXcQ: Downloading DASH manifest
[debug] Invoking downloader on u'https://r3---sn-n3tj5cax-hoal.googlevideo.com/videoplayback?ipbits=0&sparams=dur%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&gcr=ph&mime=video%2Fmp4&id=o-ABfdLWe1X83ujkDrygunPwooF506SXBR5ulhB4D0yX7g&pl=24&mm=31&ms=au&source=youtube&mv=m&ip=114.108.203.161&requiressl=yes&itag=18&initcwndbps=377500&ratebypass=yes&upn=qqlTquOPwGk&dur=212.834&expire=1428668381&key=yt5&fexp=900720%2C907263%2C932627%2C932631%2C934962%2C9408578%2C947243%2C948124%2C948703%2C951703%2C952612%2C957201%2C961404%2C961406%2C964714&sver=3&mt=1428646687&signature=5528DA84455B6EA157FC0D41B900A13D7040F91D.E7B6045DC7DFB5360E7D202F8A1F94431552E5CC'
[download] Destination: Rick Astley - Never Gonna Give You Up-dQw4w9WgXcQ.mp4
[download]  14.4% of 16.75MiB at 248.51KiB/s ETA 00:59
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 10, 2015

Closing. Please go to #5317 for further discussion.

@yan12125 yan12125 closed this Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.