viewtube icon indicating copy to clipboard operation
viewtube copied to clipboard

Certain search terms fail (also on viewtube.io)

Open ghost opened this issue 2 years ago • 2 comments

Certain search terms fail

For example, I search "linux cast" I get "Search failed - Refresh the page to try again". However, if I search "linux" or "linux cast debian" it works fine. I have tested this on viewtube.io and get the same error.

I have tested this on various devices and get the same error.

ghost avatar Dec 09 '23 15:12 ghost

Same for me. Search terms "2bg" and "2 bored guys" don't give any results.

Docker logs show the following, maybe it helps.

[ViewTube] Info	12/11/2023, 8:38:28 PM Unknown search result type DidYouMean
InnertubeError: ButtonCardView not found!
This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues!
Introspected and JIT generated this class in the meantime:
class ButtonCardView extends YTNode {
  static type = 'ButtonCardView';
  title: string;
  image: {
    sources: {
      0: {
        client_resource: {
          image_name: string

}
      }
    }
  };
  renderer_context: {
    command_context: {
      on_tap: {
        innertube_command: NavigationEndpoint
      }
    }
  };
  constructor(data: RawNode) {

    super();
    this.title = data.title;
    this.image = {
      sources: {

        0: {
          client_resource: {
            image_name: data.image.sources.0.clientResource.imageName
          }

}
      }
    };
    this.renderer_context = {
      command_context: {
        on_tap: {
          innertube_command: new NavigationEndpoint(data.rendererContext.commandContext.onTap.innertubeCommand)

}
      }
    };
  }
}
    at ERROR_HANDLER (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:10410:20)
    at createRuntimeClass (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:9890:3)
    at generateRuntimeClass (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:9933:19)
    at parseItem (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:10676:75)
    at Object.parseArray (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:10718:22)
    at new HorizontalList (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:1195:33)
    at Object.parseItem (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:10698:22)
    at new Shelf (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:8903:35)
    at parseItem (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:10698:22)
    at Object.parseArray (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:10718:22) {
  date: 2023-12-11T20:38:44.069Z,
  version: '6.4.1'
}
[ViewTube] Error	12/11/2023, 8:38:44 PM [ExceptionsHandler] Cannot read properties of undefined (reading 'some') - {"stack":["TypeError: Cannot read properties of undefined (reading 'some')\n    at extractSearchVideo (/home/app/server/dist/main.cjs:2953:28)\n    at /home/app/server/dist/main.cjs:2911:50\n    at Proxy.map (<anonymous>)\n    at extractSearchShelf (/home/app/server/dist/main.cjs:2911:38)\n    at /home/app/server/dist/main.cjs:2834:20\n    at Proxy.map (<anonymous>)\n    at extractSearchResults (/home/app/server/dist/main.cjs:2826:11)\n    at toVTSearchResultDto (/home/app/server/dist/main.cjs:2792:100)\n    at SearchService.doSearch (/home/app/server/dist/main.cjs:2769:126)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]}

lennart-m avatar Dec 11 '23 20:12 lennart-m

This should be fixed by update 0.15.0. If errors still occur, please open an issue.

moisout avatar Jan 06 '24 15:01 moisout