ytdl-org/youtube-dl · error · ExtractorError

', '.join(auth['messages'])

Error message

', '.join(auth['messages'])

What it means

Raised by the Gaia extractor after a successful HTTP POST to https://auth.gaia.com/v1/login when the response JSON contains success=false. The message is built by joining the API's own 'messages' list, so the text comes straight from Gaia's auth service. It is marked expected=True, meaning youtube-dl treats it as a user-facing failure (bad credentials), not a bug.

Source

Thrown at youtube_dl/extractor/gaia.py:74

    def _real_initialize(self):
        auth = self._get_cookies('https://www.gaia.com/').get('auth')
        if auth:
            auth = self._parse_json(
                compat_urllib_parse_unquote(auth.value),
                None, fatal=False)
        if not auth:
            username, password = self._get_login_info()
            if username is None:
                return
            auth = self._download_json(
                'https://auth.gaia.com/v1/login',
                None, data=urlencode_postdata({
                    'username': username,
                    'password': password
                }))
            if auth.get('success') is False:
                raise ExtractorError(', '.join(auth['messages']), expected=True)
        if auth:
            self._jwt = auth.get('jwt')

    def _real_extract(self, url):
        display_id, vtype = re.search(self._VALID_URL, url).groups()
        node_id = self._download_json(
            'https://brooklyn.gaia.com/pathinfo', display_id, query={
                'path': 'video/' + display_id,
            })['id']
        node = self._download_json(
            'https://brooklyn.gaia.com/node/%d' % node_id, node_id)
        vdata = node[vtype]
        media_id = compat_str(vdata['nid'])
        title = node['title']

        headers = None
        if self._jwt:
            headers = {'Authorization': 'Bearer ' + self._jwt}

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Verify the Gaia username/password (try logging in at gaia.com in a browser)
  2. Update stored credentials via --username/--password or ~/.netrc
  3. If credentials are correct, check auth.gaia.com/v1/login manually with curl to see the raw 'messages' payload and confirm the API contract changed
  4. Update to a newer youtube-dl/yt-dlp where the Gaia extractor may be fixed

Example fix

# before (wrong credentials supplied)
youtube-dl --username me --password wrong https://www.gaia.com/video/123
# after
eyoutube-dl --username me --password correct https://www.gaia.com/video/123
# or omit credentials if the video is free	youtube-dl https://www.gaia.com/video/123
Defensive patterns

Strategy: try-catch

Validate before calling

import requests
resp = requests.post('https://auth.gaia.com/v1/login', data={'username': u, 'password': p})
body = resp.json()
if body.get('success') is False:
    print('Gaia login would fail:', ', '.join(body.get('messages', [])))

Type guard

def gaia_auth_ok(auth):
    return isinstance(auth, dict) and auth.get('success') is not False and 'jwt' in auth

Try / catch

from youtube_dl.utils import DownloadError
try:
    ydl.extract_info(url, download=True)
except DownloadError as e:
    if 'Gaia' in str(e) or 'login' in str(e).lower():
        # expected auth failure: fix credentials, not a bug
        log_auth_failure(e)
    else:
        raise

Prevention

When it happens

Trigger: Calling a gaia.com URL with --username/--password (or netrc) where Gaia's /v1/login returns {"success": false, "messages": ["Invalid username or password"]}. Only fires when a cached auth cookie is absent and login info was supplied; without credentials the extractor silently returns instead.

Common situations: Wrong or expired password, account locked, Gaia changing its auth API response shape, 2FA-only accounts, or a stale GLBID-style auth cookie forcing a fresh login path.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/4e29c4df5190808f. Report an issue: GitHub.