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

3.0.0: Error when retrieving info of a video with several dub tracks via Android client. #322

Closed
4 tasks done
wukko opened this issue Feb 25, 2023 · 5 comments · Fixed by #318
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@wukko
Copy link

wukko commented Feb 25, 2023

Steps to reproduce

import { Innertube } from 'youtubei.js';

const yt = await Innertube.create();
let info = await yt.getBasicInfo('TJ2ifmkGGus', 'ANDROID');

Video in code sample has several audio tracks. Any such video causes this error.

Failure Logs

node_modules/youtubei.js/dist/src/parser/youtube/VideoInfo.js:65
            throw new InnertubeError('This video is unavailable', info.playability_status);
                  ^

InnertubeError: This video is unavailable
    at new VideoInfo (node_modules/youtubei.js/dist/src/parser/youtube/VideoInfo.js:65:19)
    at Innertube.<anonymous> (node_modules/youtubei.js/dist/src/Innertube.js:73:20)
    at Generator.next (<anonymous>)
    at fulfilled (node_modules/youtubei.js/dist/src/Innertube.js:4:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
{
  info: {
    status: 'ERROR',
    reason: 'This video is unavailable',
    embeddable: false,
    audio_only_playablility: null,
    error_screen: PlayerErrorMessage {
      type: 'PlayerErrorMessage',
      subreason: Text {
        runs: [
          TextRun {
            text: 'Watch on the latest version of YouTube.',
            bold: false,
            italics: false,
            strikethrough: false,
            endpoint: [NavigationEndpoint]
          }
        ],
        text: 'Watch on the latest version of YouTube.'
      },
      reason: Text {
        runs: [
          TextRun {
            text: 'The following content is not available on this app.',
            bold: false,
            italics: false,
            strikethrough: false,
            endpoint: undefined
          }
        ],
        text: 'The following content is not available on this app.'
      },
      proceed_button: null,
      thumbnails: [
        Thumbnail {
          url: '//s.ytimg.com/yts/img/meh7-vflGevej7.png',
          width: 140,
          height: 100
        },
        Thumbnail {
          url: '//s.ytimg.com/yts/img/meh7-vflGevej7.png',
          width: 140,
          height: 100
        }
      ],
      icon_type: 'ERROR_OUTLINE'
    }
  },
  date: 2023-02-25T11:09:05.107Z,
  version: '3.0.0'
}

Expected behavior

I expected to get video info along with all possible dubs, just like what WEB client returns.

Current behavior

InnerTube throws an error and doesn't provide any video info if the video in question has several dub tracks.

Version

Default

Anything else?

Updating the Android app version here would probably fix this issue, as error suggests.

Checklist

  • I am running the latest version.
  • I checked the documentation and found no answer.
  • I have searched the existing issues and made sure this is not a duplicate.
  • I have provided sufficient information.
@wukko wukko added the bug Something isn't working label Feb 25, 2023
@wukko
Copy link
Author

wukko commented Feb 25, 2023

uhh it works now?? i guess this was temporary, but i couldn't get it to work a few hours ago. that's weird

@wukko wukko closed this as completed Feb 25, 2023
@wukko
Copy link
Author

wukko commented Feb 25, 2023

okay, this same exact error just occurred again. same video, same code, and it doesn't happen 100% of the time.

@wukko wukko reopened this Feb 25, 2023
@wukko
Copy link
Author

wukko commented Feb 25, 2023

truly no idea what this is caused by, so this specific issue is irrelevant

@wukko wukko closed this as completed Feb 25, 2023
@LuanRT
Copy link
Owner

LuanRT commented Feb 25, 2023

See iv-org/invidious#3290.

The library sends all parameters required by the Android client, except the specific user agent, which is likely what's causing the issue here.

Reopening this until #318 is live. Thanks for reporting!

@LuanRT
Copy link
Owner

LuanRT commented Feb 26, 2023

Just released v3.1.0, but I'm not sure if this is fixed yet (can't be reproduced in my region). So please do test it if you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants