FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Bug]: Local API Error: Failed to extract n-token decipher algorithm

Open daviddoji opened this issue 2 years ago • 29 comments

Guidelines

  • [X] I have encountered this bug in the latest release of FreeTube.
  • [X] I have encountered this bug in the official downloads of FreeTube.
  • [X] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • [X] I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • [X] This issue contains only one bug.

Describe the bug

Trid to play any video and got the following message: Error: Failed to extract n-token decipher algorithm

Expected Behavior

Video reproduces

Issue Labels

content not loading

FreeTube Version

v0.21.2 Beta

Operating System Version

Archlinux, up-to-date

Installation Method

AUR (Unofficial)

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

v0.21.2 Beta

Additional Information

This morning, it did work :shrug: and system was not updated since.

Nightly Build

daviddoji avatar Jul 31 '24 17:07 daviddoji

Seems to have randomly started happening, like that issue from the earlier version last week.

TheGreenSquare avatar Jul 31 '24 17:07 TheGreenSquare

Facing the same issue. Also happens on latest nightly build.

kkorlass avatar Jul 31 '24 17:07 kkorlass

Same thing here, i keep getting (in order): Local API Error: Failed to extract n-token decipher algorithm. Falling back to Invidious API. Invidious API Syntax Error: Unexpected end of JSON input.

XenithXemaku avatar Jul 31 '24 17:07 XenithXemaku

Same error here.

darktohka avatar Jul 31 '24 17:07 darktohka

yes same thing here

M-Hamano16 avatar Jul 31 '24 17:07 M-Hamano16

Guys, just upvote the post. The issue seems to be similar to the one that happened recently - likely YouTube cracking down. Let's not spam the comments.

CharaDr33murr avatar Jul 31 '24 17:07 CharaDr33murr

Using the main branch of https://github.com/LuanRT/YouTube.js solves the issue on nightly.

So maybe we need to wait for a new version release of the library?

darktohka avatar Jul 31 '24 17:07 darktohka

To try the nightly branch of YouTube.js: edit the package.json to reflect

    "youtubei.js": "git+https://github.com/darktohka/YouTube.js.git"

There are build errors on the current main branch of YouTube.js, until the fixes are merged feel free to use my fork to test whether the new version fixes the issue.

darktohka avatar Jul 31 '24 17:07 darktohka

To try the nightly branch of YouTube.js: edit the package.json to reflect

    "youtubei.js": "git+https://github.com/darktohka/YouTube.js.git"

There are build errors on the current main branch of YouTube.js, until the fixes are merged feel free to use my fork to test whether the new version fixes the issue.

how do i even build freetube? theres no cmake or build instructions anywhere.

birb7 avatar Jul 31 '24 18:07 birb7

Using the main branch of https://github.com/LuanRT/YouTube.js solves the issue on nightly.

So maybe we need to wait for a new version release of the library?

The actual fix is in an open pull request on that repo, so they definitely won't do a release until that is finished and merged.

absidue avatar Jul 31 '24 18:07 absidue

To try the nightly branch of YouTube.js: edit the package.json to reflect


    "youtubei.js": "git+https://github.com/darktohka/YouTube.js.git"

There are build errors on the current main branch of YouTube.js, until the fixes are merged feel free to use my fork to test whether the new version fixes the issue.

As mentioned on your YouTube.js bug reports, the build errors don't happen if you build it correctly (clone YouTube.js, build it and add the built version to FreeTube).

absidue avatar Jul 31 '24 18:07 absidue

To try the nightly branch of YouTube.js: edit the package.json to reflect


    "youtubei.js": "git+https://github.com/darktohka/YouTube.js.git"

There are build errors on the current main branch of YouTube.js, until the fixes are merged feel free to use my fork to test whether the new version fixes the issue.

As mentioned on your YouTube.js bug reports, the build errors don't happen if you build it correctly (clone YouTube.js, build it and add the built version to FreeTube).

how would i go about doing that? do i have to add the built youtube.js, and then build freetube? or does it get put into a certain spot where freetube stores data? and where are the instructions to build freetube (if needed)?

birb7 avatar Jul 31 '24 19:07 birb7

Happening on the appimage arch

RobertPPAP avatar Jul 31 '24 19:07 RobertPPAP

Same here. In fact, a number of issues over the past week especially.

JEsa44 avatar Jul 31 '24 20:07 JEsa44

We are aware of the problem that YouTube has intentionally broken stuff again, everyone is affected, so please don't comment unless you have something to add that hasn't already been said.

absidue avatar Jul 31 '24 20:07 absidue

@birb7 How to build is mentioned in the docs and yes you won't find a CMake file because this is a JavaScript project.

https://docs.freetubeapp.io/development/building-from-source

absidue avatar Jul 31 '24 20:07 absidue

Upstream fix is being tested as we speak

Temporary workaround, for the best viewing experience I recommend doing the following things:

  • Set Primary API to Invidious in the General Settings
  • Select an Instance that is near to you, see https://api.invidious.io/. Make sure to pick one that has a check mark in the API field. Also make sure you start typing the instance name in the Current Invidious Instance field under the General Settings with https:// and it should list instances as suggestions.
  • Disable Fallback to Non-Preferred Backend on Failure in the General Settings
  • Disable Proxy Videos Through Invidious in the Player settings

[!NOTE] Some Invidious instances throws the error you see in https://github.com/FreeTubeApp/FreeTube/issues/5489. You should try other Invidious instances when this occurs. It could be difficult to find a working instance because some Invidious instances are IP blocked by YouTube.

UPDATE:

Upstream fix has been merged. We are currently testing the fix.

UPDATE:

Fix has successfully passed our testing. Hotfix release will be coming soon!

UPDATE:

We are facing some technical difficulties with GitHub. We aim to resolve it ASAP so we can provide the hotfix release. Thank you all for being patient!