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

Error loading video - [GET] "/api/videos/aqz-KE-bpKQ": 500 Internal Server Error #2851

Open
Klar opened this issue Jun 16, 2024 · 18 comments
Open

Comments

@Klar
Copy link

Klar commented Jun 16, 2024

Describe the Bug

every video gets the following error:

Error loading video - [GET] "/api/videos/aqz-KE-bpKQ": 500 Internal Server Error

Steps to Reproduce the Bug

  1. search video
  2. click on video
  3. error message

Expected Behaviour

playing video

Device Info

Running 0.16.2, tried on different browsers / devices.

Not sure if it has to do with the setting "Rewrite YouTube Urls"

I get another error when setting it off:

Cannot read properties of undefined (reading 'replace')

Setting off and site refresh (F5):

Cannot read properties of undefined (reading 'name')

viewtube docker log:

[ViewTube] 1      - 6/16/2024, 1:49:33 PM   ERROR [ExceptionsHandler] Streaming data not available - {"stack":["Error: Streaming data not available\n    at Object.toDash (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:1783:11)\n    at VideoInfo.<anonymous> (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:13761:34)\n    at Generator.next (<anonymous>)\n    at /home/app/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:169:75\n    at new Promise (<anonymous>)\n    at __awaiter (/home/app/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:165:16)\n    at VideoInfo.toDash (/home/app/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/bundle/node.cjs:13751:41)\n    at VideosService.getById (/home/app/server/dist/core/videos/videos.service.js:76:48)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]}
[nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'name')
  at authorToName (./client/.output/server/chunks/build/watch-CtRmNfCQ.mjs:1177:32)  
  at ./client/.output/server/chunks/build/watch-CtRmNfCQ.mjs:1185:43  
  at ReactiveEffect.fn (./client/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:933:13)  
  at ReactiveEffect.run (./client/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:166:19)  
  at get value [as value] (./client/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:945:109)  
  at unref (./client/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:1044:29)  
  at ./client/.output/server/chunks/build/watch-CtRmNfCQ.mjs:1209:16  
  at renderComponentSubTree (./client/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:430:9)  
  at ./client/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:372:25  
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@moisout
Copy link
Member

moisout commented Jun 16, 2024

Can you try the dev image? It has a fix for the streaming data thing.

@Klar
Copy link
Author

Klar commented Jun 16, 2024

it seems to be a bit better (loads comments and video info) but the player is not working / loading.

2024-06-16_16-47
2024-06-16_16-48

@ang3lo-azevedo
Copy link

I'm having the same issue everyday on the official instance, the website works for awhile and then I start to the the error "500 Cannot read properties of undefined (reading 'name')"

@moisout
Copy link
Member

moisout commented Jun 23, 2024

I'm having the same issue everyday on the official instance, the website works for awhile and then I start to the the error "500 Cannot read properties of undefined (reading 'name')"

This is because of IP rate limiting by google

@moisout
Copy link
Member

moisout commented Jun 23, 2024

@Klar I have updated the dev image with better error handling. Could you try it again with the latest image?

@Klar
Copy link
Author

Klar commented Jun 23, 2024

Thanks for updating.

Sign in to confirm you’re not a bot - This helps protect our community. Learn more

I'm gonna try the Youtube Cookie Method to see if this fixes it.

https://viewtube.wiki/configuration/advanced/#youtube-cookie

@Klar
Copy link
Author

Klar commented Jun 23, 2024

I tried it like

    environment:
      - VIEWTUBE_DATABASE_HOST=viewtube-mongodb
      - VIEWTUBE_REDIS_HOST=viewtube-redis
      - VIEWTUBE_YOUTUBE_COOKIE="SOCS.... ; PREF=tz= ...."

but still get the samer error message, do I need to make the cookie from the same ip address?

@Klar
Copy link
Author

Klar commented Jun 26, 2024

I still get the error "Sign in to confirm you’re not a bot - This helps protect our community. Learn more"

it seems the error message is somehow not correct or my environment variable for youtube cookie is not working. Any way to debug this a bit better? (I don't see the youtube cookie message in my docker logs)

@moisout
Copy link
Member

moisout commented Jun 27, 2024

I think that's a new thing YouTube is doing. It just means they don't trust your IP.
You could use a proxy, or run ViewTube through a VPN. Or switch your IP address, but that might not be that easy.
I will update if i figure out anything

@FriedrichM
Copy link

Are you using a reverse proxy like nginx i have tried it with and without that and its working only without nginx, maybe its the encryption thats getting added

@FriedrichM
Copy link

ok maybe its not that now its not working with or without the proxy again

@Klar
Copy link
Author

Klar commented Jul 5, 2024

I am using haproxy. I haven't changed the setup, only updated the dockerfile version.

I will test the same setup on another server (IP) and let you know if it works.

@Klar
Copy link
Author

Klar commented Jul 6, 2024

new IP / Server same error (Sign in to confirm you’re not a bot - This helps protect our community. Learn more)

@FriedrichM
Copy link

i got it working on my home machine what kind of proxy do i need to use to test from my remote server with VIEWTUBE_PROXY_URL? http https socks ? do is put the url like this myproxurl:port or like this http://myproxurl:port

@moisout
Copy link
Member

moisout commented Jul 8, 2024

i got it working on my home machine what kind of proxy do i need to use to test from my remote server with VIEWTUBE_PROXY_URL? http https socks ? do is put the url like this myproxurl:port or like this http://myproxurl:port

It supports http, https and socks proxies.

For example: VIEWTUBE_PROXY_URL="https://proxy.example.com:8555"
With authentication: VIEWTUBE_PROXY_URL="socks://username:[email protected]:8555"

@FriedrichM
Copy link

i got it working for a brief time using a socksproxy to my home network but now its not working again. it loads the thumbnail which it didnt before and the result form api/videos/id looks much more complete but the loading animation wont stop and the play button is not showing even on viewtube.io

@Klar
Copy link
Author

Klar commented Jul 14, 2024

FYI: yt-dlp/yt-dlp#10128

@mycodedoesnotcompile2
Copy link

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

5 participants