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

5.8.0 InnertubeError: Something went wrong at Button! #477

Closed
4 tasks done
short443 opened this issue Aug 22, 2023 · 1 comment
Closed
4 tasks done

5.8.0 InnertubeError: Something went wrong at Button! #477

short443 opened this issue Aug 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@short443
Copy link

Steps to reproduce

Sometimes, when my users are searching using the query system, they encounter the error "InnertubeError: Something went wrong at Button!" I haven't noticed a pattern, but my parameters are as follows:

const youtube = await Innertube.create({
lang: "pt-BR",
location: "BR",
cookie: process.env.COOKIES,
generate_session_locally: true
});

...

const filters = {
sort_by: "relevance"
};

const searchResult = await youtube.search(queryYT.toLowerCase(), filters);

const videos = searchResult.results
.filter(result => result.type === 'Video')
.map(video => ({
	id: video.id,
	title: video.title.runs[0].text,
	author: video.author.name,
	authorId: video.author.id,
	duration: video.duration.text
}));

Failure Logs

InnertubeError: Something went wrong at Button!
 This is a bug, please report it at https://github.com/LuanRT/YouTube.js/issues
     at Parser._Parser_printError (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:401:18)
     at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:239:77)
     at new BackstagePost (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/BackstagePost.js:31:39)
     at new Post (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/Post.js:4:9)
     at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:234:32)
     at Parser.parseArray (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:249:37)
     at new HorizontalList (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/HorizontalList.js:7:29)
     at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:234:32)
     at new Shelf (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/Shelf.js:13:31)
     at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:234:32) {
   info: {
     stack: 'Error: Type mismatch, got Button but expected CommentActionButtons\n' +
       '    at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:232:31)\n' +
       '    at new BackstagePost (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/BackstagePost.js:31:39)\n' +
       '    at new Post (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/Post.js:4:9)\n' +
       '    at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:234:32)\n' +
       '    at Parser.parseArray (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:249:37)\n' +
       '    at new HorizontalList (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/HorizontalList.js:7:29)\n' +
       '    at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:234:32)\n' +
       '    at new Shelf (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/classes/Shelf.js:13:31)\n' +
       '    at Parser.parseItem (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:234:32)\n' +
       '    at Parser.parseArray (file:///home/ubuntu/project/node_modules/youtubei.js/dist/src/parser/parser.js:249:37)'
   },
   date: 2023-08-22T23:24:38.603Z,
   version: '5.8.0'
 }

Expected behavior

No error.

Current behavior

Sometimes this error occurs:

InnertubeError: Something went wrong at Button!

It doesn't happen in every search, but it occurs quite frequently.

Version

Default

Anything else?

No response

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.
@short443 short443 added the bug Something isn't working label Aug 22, 2023
@LuanRT
Copy link
Owner

LuanRT commented Sep 10, 2023

Fixed in #499.

@LuanRT LuanRT closed this as completed Sep 10, 2023
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

No branches or pull requests

2 participants