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

All videos randomly stop working #2952

Open
mav808 opened this issue Jul 24, 2024 · 31 comments
Open

All videos randomly stop working #2952

mav808 opened this issue Jul 24, 2024 · 31 comments

Comments

@mav808
Copy link

mav808 commented Jul 24, 2024

Describe the Bug

Somewhat randomly, I get a video playback error. This can happen when starting a video or while a video is playing. Once the error occurs, no more videos will play until the Viewtube instance is restarted. Once restarted, videos will play again for a while until again the error occurs. The longest without an error has been about 6 hours, but it usually much sooner.

The popup with the error reads...

Video playback error
PIPELINE_LOAD_ERROR: An HTTP status code indicating failure was received: 403

Steps to Reproduce the Bug

  1. Use ViewTube as normal
  2. At some point within about 6 hours, but sometimes much sooner, videos will stop playing and the error is displayed.
  3. ViewTube must be restarted and then videos start working again.

Expected Behaviour

Videos should keep playing.

Screenshot/Screen recording

Screenshot 2024-07-24 at 19 40 31

Device Info

  • Device: M2 MacBook Air
  • OS: macOS 14.5
  • Browser: Safari

Additional Context

Self-hosted ViewTube running in a Docker container.

@ac1mx
Copy link

ac1mx commented Jul 24, 2024

This has also appeared for me just recently.

@Berkopl
Copy link

Berkopl commented Jul 24, 2024

Same for me Video playback error
PIPELINE_LOAD_ERROR: An HTTP status code indicating failure was received: 403

what is Happening YouTube Google star war for $$$ with ViewTube?

@ac1mx
Copy link

ac1mx commented Jul 24, 2024

Looks like https://github.com/TeamNewPipe/NewPipe/issues/11255#issue-2398629565 was fixed by the NewPipe team, seems to be the same error.

@XfEnE
Copy link

XfEnE commented Jul 25, 2024

having same issue for a while now :(

@Berkopl
Copy link

Berkopl commented Jul 25, 2024

Any solution?!

@Berkopl
Copy link

Berkopl commented Jul 25, 2024

Looks like https://github.com/TeamNewPipe/NewPipe/issues/11255#issue-2398629565 was fixed by the NewPipe team, seems to be the same error.

Sorry don't se solution!

@jakejackson
Copy link

Looks like https://github.com/TeamNewPipe/NewPipe/issues/11255#issue-2398629565 was fixed by the NewPipe team, seems to be the same error.

Sorry don't se solution!

If I'm correctly following, from the NewPipe issue linked by ac1mx: https://github.com/TeamNewPipe/NewPipe/issues/11255, Stypox seems to indicate https://github.com/TeamNewPipe/NewPipe/issues/11255#issuecomment-2223964100 that the issue was fixed https://github.com/TeamNewPipe/NewPipeExtractor/pull/1191 and that a hotfix release is in the making.

That said, I suppose we'll simply need to patiently wait for fix(es) to be merged into ViewTube branches -- like (I assume) most self-hosters, I'm running the dev branch to work around the "Unexpected token (1:47)" error https://github.com/ViewTube/viewtube/issues/2929, but the PIPELINE_LOAD_ERROR unfortunately hasn't been fixed yet in dev (or, obviously, latest.)

@Berkopl
Copy link

Berkopl commented Jul 25, 2024

Looks like https://github.com/TeamNewPipe/NewPipe/issues/11255#issue-2398629565 was fixed by the NewPipe team, seems to be the same error.

Sorry don't se solution!

If I'm correctly following, from the NewPipe issue linked by ac1mx: https://github.com/TeamNewPipe/NewPipe/issues/11255, Stypox seems to indicate https://github.com/TeamNewPipe/NewPipe/issues/11255#issuecomment-2223964100 that the issue was fixed https://github.com/TeamNewPipe/NewPipeExtractor/pull/1191 and that a hotfix release is in the making.

That said, I suppose we'll simply need to patiently wait for fix(es) to be merged into ViewTube branches -- like (I assume) most self-hosters, I'm running the dev branch to work around the "Unexpected token (1:47)" error https://github.com/ViewTube/viewtube/issues/2929, but the PIPELINE_LOAD_ERROR unfortunately hasn't been fixed yet in dev (or, obviously, latest.)

ok, so we wait. Please set us know wen we can update viewtube. Thx

@Berkopl
Copy link

Berkopl commented Jul 25, 2024

PS. ist there viewtube alternative on docker?

@ac1mx
Copy link

ac1mx commented Aug 9, 2024

Still appearing, although typically the video gets to around 20 seconds before the error appears.

@lersi
Copy link

lersi commented Aug 17, 2024

I also have this issue, it seems that all stable releases are broken, probably because google changed something.
I have just ran a nightly build and it seems to work fine. maybe the dev version also works but I did not try it

The stable versions do not work at all, no able to play any video.
The nighly build worked for the first and second video, afterwards it does the same and stops working 30 seconds into the video. This is probably google's actions against "pirates" (people who want good experience on the platform)

@ac1mx
Copy link

ac1mx commented Aug 17, 2024 via email

@ac1mx
Copy link

ac1mx commented Aug 20, 2024

Invidious has this fixed btw. I hope Viewtube can be updated with the same fix soon, I much prefer the Viewtube UI.

@iwannet
Copy link

iwannet commented Aug 30, 2024

is this the cause ? LuanRT/YouTube.js#724

@alienbob
Copy link

I experience the same issue. I run viewtube in Docker, latest version of viewtube obtained from Docker Hub (0.17.0).
For me this error appears when video's have barely started, like 10 or 20 seconds into the playback.

@NovaCyntax
Copy link

Haven't been able to use Viewtube all summer because of this issue, probably going to have to stand up an Invidious instance in the meantime. I wish I could document or debug more but it looks like everything's been mentioned already

@skynet2982
Copy link

Same here

@averagenokiauser
Copy link

I am also getting this error. I am self hosting it on Raspberry Pi 4.

@LeMaX10
Copy link

LeMaX10 commented Sep 26, 2024

I found the cause of the bug. An external Youtube.js >=10.4.0 fixed it, viewtube hasn't held it yet, but version updated in development branch.
The reason is the absence of po_token and visitor_data in the request.

See - LuanRT/YouTube.js#728 (comment)

To generate those you can use https://github.com/iv-org/youtube-trusted-session-generator
And add po_token, visitor_data to this file https://github.com/ViewTube/viewtube/blob/development/server/src/common/innertube/innertube.ts

Add po_token and vistor_data after line 17 example:

const innertubeOptions: InnerTubeConfig = {
  cache: new UniversalCache(true, cacheDirectory),
  fetch: innertubeFetch,
  enable_session_cache: false,
  lang: 'en',
  po_token: "AddYouPoTokenString",
  visitor_data: "AddYouVisitorDataString",
};

[Not working in stable version, only dev or nightly version]

@Lucky-Lobo
Copy link

I found the cause of the bug. An external Youtube.js >=10.4.0 fixed it, viewtube hasn't held it yet, but version updated in development branch. The reason is the absence of po_token and visitor_data in the request.

See - LuanRT/YouTube.js#728 (comment)

To generate those you can use https://github.com/iv-org/youtube-trusted-session-generator And add po_token, visitor_data to this file https://github.com/ViewTube/viewtube/blob/development/server/src/common/innertube/innertube.ts

Add po_token and vistor_data after line 17 example:

const innertubeOptions: InnerTubeConfig = {
  cache: new UniversalCache(true, cacheDirectory),
  fetch: innertubeFetch,
  enable_session_cache: false,
  lang: 'en',
  po_token: "AddYouPoTokenString",
  visitor_data: "AddYouVisitorDataString",
};

[Not working in stable version, only dev or nightly version]

I didn't manage to make it work:

SyntaxError: Unexpected identifier 'po_token'
    at wrapSafe (node:internal/modules/cjs/loader:1378:20)
    at Module._compile (node:internal/modules/cjs/loader:1428:41)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/app/server/dist/core/comments/comments.service.js:12:20)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)

Node.js v20.17.0

am I missing something?

Build is Dev - running on unraid.

@LeMaX10
Copy link

LeMaX10 commented Sep 27, 2024

I didn't manage to make it work:

screenshot please?

My screenshot:
Снимок экрана 2024-09-27 в 22 17 01

@Lucky-Lobo
Copy link

I didn't manage to make it work:

screenshot please?

My screenshot: Снимок экрана 2024-09-27 в 22 17 01

2024-09-28_10-31
2024-09-28_10-28
2024-09-28_10-24

I generated the token with the invidious script.

@LeMaX10
Copy link

LeMaX10 commented Sep 28, 2024

I didn't manage to make it work:

screenshot please?

My screenshot: Снимок экрана 2024-09-27 в 22 17 01

2024-09-28_10-31

2024-09-28_10-28

2024-09-28_10-24

I generated the token with the invidious script.

You missing comma after - lang: 'en'
it should be like this: lang: 'en',

@Lucky-Lobo
Copy link

You were right! Instance starts with the tokens but i stell get the error:

2024-09-28_11-00

But thanks anyway!

@LeMaX10
Copy link

LeMaX10 commented Sep 28, 2024

You were right! Instance starts with the tokens but i stell get the error:

2024-09-28_11-00

But thanks anyway!

maybe something didn't assemble correctly? in my case it helped, but I had to completely restart the instance.

@Lucky-Lobo
Copy link

You were right! Instance starts with the tokens but i stell get the error:
2024-09-28_11-00
But thanks anyway!

maybe something didn't assemble correctly? in my case it helped, but I had to completely restart the instance.

I did so too, multiple times, with redis and mongo as well, tried serveral videos etc. - no such luck.

@LeMaX10
Copy link

LeMaX10 commented Sep 28, 2024

You were right! Instance starts with the tokens but i stell get the error:

2024-09-28_11-00

But thanks anyway!

maybe something didn't assemble correctly? in my case it helped, but I had to completely restart the instance.

I did so too, multiple times, with redis and mongo as well, tried serveral videos etc. - no such luck.

You version youtubei.js 10.4.0 ?
See in server/packages.json
And see server/node_modules/youtubei.js/packages.json first or two line "version: "10.4.0"

@Lucky-Lobo
Copy link

You were right! Instance starts with the tokens but i stell get the error:

2024-09-28_11-00

But thanks anyway!

maybe something didn't assemble correctly? in my case it helped, but I had to completely restart the instance.

I did so too, multiple times, with redis and mongo as well, tried serveral videos etc. - no such luck.

You version youtubei.js 10.4.0 ? See in server/packages.json And see server/node_modules/youtubei.js/packages.json first or two line "version: "10.4.0"

Yes, I checked both locations:

root@19a445b424e5:/home/app/server/node_modules/youtubei.js# cat package.json | grep version
  "version": "10.4.0",
root@19a445b424e5:/home/app/server# cat package.json | grep youtube
    "youtubei.js": "10.4.0",

@LeMaX10
Copy link

LeMaX10 commented Sep 30, 2024

You were right! Instance starts with the tokens but i stell get the error:

2024-09-28_11-00

But thanks anyway!

maybe something didn't assemble correctly? in my case it helped, but I had to completely restart the instance.

I did so too, multiple times, with redis and mongo as well, tried serveral videos etc. - no such luck.

You version youtubei.js 10.4.0 ? See in server/packages.json And see server/node_modules/youtubei.js/packages.json first or two line "version: "10.4.0"

Yes, I checked both locations:

root@19a445b424e5:/home/app/server/node_modules/youtubei.js# cat package.json | grep version
  "version": "10.4.0",
root@19a445b424e5:/home/app/server# cat package.json | grep youtube
    "youtubei.js": "10.4.0",

This is strange, I also tried to do it in an already assembled docker container and it also worked. I can't tell you why you have a problem, but I suspect something is still done wrong :(

The only thing that I see a difference between my own and your version is the length of the po_token, for some reason it is much longer than mine. In my case, the generator outputs a po_token in one line, in your case it is more than 3 lines long. Perhaps initially there is a problem with its generation?

@Lucky-Lobo
Copy link

You were right! Instance starts with the tokens but i stell get the error:

2024-09-28_11-00

But thanks anyway!

maybe something didn't assemble correctly? in my case it helped, but I had to completely restart the instance.

I did so too, multiple times, with redis and mongo as well, tried serveral videos etc. - no such luck.

You version youtubei.js 10.4.0 ? See in server/packages.json And see server/node_modules/youtubei.js/packages.json first or two line "version: "10.4.0"

Yes, I checked both locations:

root@19a445b424e5:/home/app/server/node_modules/youtubei.js# cat package.json | grep version
  "version": "10.4.0",
root@19a445b424e5:/home/app/server# cat package.json | grep youtube
    "youtubei.js": "10.4.0",

This is strange, I also tried to do it in an already assembled docker container and it also worked. I can't tell you why you have a problem, but I suspect something is still done wrong :(

The only thing that I see a difference between my own and your version is the length of the po_token, for some reason it is much longer than mine. In my case, the generator outputs a po_token in one line, in your case it is more than 3 lines long. Perhaps initially there is a problem with its generation?

Well I used the invidous script mentioned in the Docs - tried it serveral times, it always threw quite a long token.

On the other hand, my invidious instance doesn't work with these tokens either - I had to comment the whole part out in my docker-compose file to make it work..

At least one instance is working as intended at the moment, so we'll see about the future updates and fixes.

Thanls again for your help!

@wes1993
Copy link

wes1993 commented Oct 7, 2024

Hello all,
I have the same problem, trying to use the dev branch I have this error:

viewtube-1          | Scheduled subscription job to run every 60 minutes
viewtube-1          |
viewtube-1          | /home/app/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/pluginUtils.js:125
viewtube-1          |     throw new FST_ERR_PLUGIN_VERSION_MISMATCH(meta.name, requiredVersion, this.version)
viewtube-1          |           ^
viewtube-1          | FastifyError [Error]: fastify-plugin: @fastify/helmet - expected '5.x' fastify version, '4.28.1' is installed
viewtube-1          |     at Object.checkVersion (/home/app/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/pluginUtils.js:125:11)
viewtube-1          |     at Object.registerPlugin (/home/app/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/pluginUtils.js:148:16)
viewtube-1          |     at Boot.override (/home/app/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/pluginOverride.js:28:57)
viewtube-1          |     at Boot._loadPlugin (/home/app/node_modules/.pnpm/[email protected]/node_modules/avvio/boot.js:425:25)
viewtube-1          |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
viewtube-1          |   code: 'FST_ERR_PLUGIN_VERSION_MISMATCH',
viewtube-1          |   statusCode: 500
viewtube-1          | }
viewtube-1          |
viewtube-1          | Node.js v20.18.0

Could someone help me?

Best Regards
Stefano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests