ViewTube / viewtube

▶️ ViewTube: The open source, privacy-conscious way to enjoy your favorite YouTube content. Docs: https://viewtube.wiki, Status: https://uptime.viewtube.io
https://viewtube.io
GNU Affero General Public License v3.0
1.33k stars 77 forks source link

All videos randomly stop working #2952

Open mav808 opened 4 months ago

mav808 commented 4 months ago

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

Additional Context

Self-hosted ViewTube running in a Docker container.

ac1mx commented 4 months ago

This has also appeared for me just recently.

Berkopl commented 4 months ago

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 commented 4 months ago

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

XfEnE commented 4 months ago

having same issue for a while now :(

Berkopl commented 4 months ago

Any solution?!

Berkopl commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

PS. ist there viewtube alternative on docker?

ac1mx commented 3 months ago

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

lersi commented 3 months ago

~~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 commented 3 months ago

If you could try the dev build that would be great.


From: Lior @.> Sent: Saturday, August 17, 2024 5:10:36 PM To: ViewTube/viewtube @.> Cc: ac1mx @.>; Comment @.> Subject: Re: [ViewTube/viewtube] All videos randomly stop working (Issue #2952)

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

— Reply to this email directly, view it on GitHubhttps://github.com/ViewTube/viewtube/issues/2952#issuecomment-2294986637, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS4OYSJ5S52JQPCQP374XTLZR634ZAVCNFSM6AAAAABLNB5BSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJUHE4DMNRTG4. You are receiving this because you commented.Message ID: @.***>

ac1mx commented 3 months ago

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

iwannet commented 2 months ago

is this the cause ? https://github.com/LuanRT/YouTube.js/issues/724

alienbob commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

Same here

averagenokiauser commented 2 months ago

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

LeMaX10 commented 2 months ago

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 - https://github.com/LuanRT/YouTube.js/issues/728#issuecomment-2306525195

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 commented 1 month ago

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 commented 1 month ago

I didn't manage to make it work:

screenshot please?

My screenshot:

Снимок экрана 2024-09-27 в 22 17 01
Lucky-Lobo commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

2024-09-28_11-00

But thanks anyway!

LeMaX10 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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/fastify@4.28.1/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/fastify@4.28.1/node_modules/fastify/lib/pluginUtils.js:125:11)
viewtube-1          |     at Object.registerPlugin (/home/app/node_modules/.pnpm/fastify@4.28.1/node_modules/fastify/lib/pluginUtils.js:148:16)
viewtube-1          |     at Boot.override (/home/app/node_modules/.pnpm/fastify@4.28.1/node_modules/fastify/lib/pluginOverride.js:28:57)
viewtube-1          |     at Boot._loadPlugin (/home/app/node_modules/.pnpm/avvio@8.3.2/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

wouldntyouknow commented 1 week ago

Just installed Viewtube, and have the same issue. The mentioned error after about 20 seconds of video playback.