Invidious error: The media could not be loaded, either because the server or network failed or because the format is not supported

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 11.2.30.2
What app is this about: InviDious

Describe your issue

When we open any video it shows an X and the following message:
“The media could not be loaded, either because the server or network failed or because the format is not supported.”

Seems like there is a potential solution found in Invidious GH repo, however I’d need your help to implement.

You will have to run a separate tool called inv_sig_helper which handle the “deciphering” of the video stream fetched from YouTube servers. Thanks @techmetx11 for the development of this tool.
You will have to generate two identity tokens (po_token and visitor_data) in order to pass all the checks on YouTube side. This will increase the traceability of your Invidious session from YouTube side, but we are going to develop a tool to regenerate those tokens periodically in order to avoid YouTube using them to track you.
For the moment, we are only providing a tool that generate them once, it’s called youtube-trusted-session-generator. You have been warned of the current risk.

Source: [Bug] "This helps protect our community." · Issue #4734 · iv-org/invidious · GitHub

Share relevant logs or error messages

Error logs from the Inspection mentu:

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. 
Object { code: 4, message: "The media could not be loaded, either because the server or network failed or because the format is not supported." }
video.js:163:49
    LogByTypeFactory https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:163
    error https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:351
    error https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:28175
    handleTechError_ https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:26287
    loadTech_ https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:25292
    dispatcher https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:2250
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. 
Object { code: 4, message: "The media could not be loaded, either because the server or network failed or because the format is not supported." }
video.js:163:49
Uncaught (in promise) DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable.
    endOfStream https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:57522
    shiftQueue https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:57372
    pushQueue https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:57626
    endOfStream https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:58070
    blacklistCurrentPlaylist https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:62092
    setupMasterPlaylistLoaderListeners_ https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:61437
    dispatcher https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:2250
    trigger https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:2386
    trigger https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:2789
    requestErrored_ https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:43260
    fin https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:43287
    request https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:43313
    endRequestAndCallback https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:42891
    progressListener https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:42900
    callbackWrapper https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:42278
    beforeSend https://mytube.yorili.com/videojs/video.js/video.js?v=febf18cb:42945
video.js:57522

found more on that

1 Like

Hi @cptbichez Thx but I am not really sure how to implement on Yunohost tbh. May be you can assist?

i’m not sure how i could help (i’m not that skilled)
but they did changed docs including the whole inv_sig_helper thing now

I am running same issue, last week everything was ok, now I have same problem.

It would be great if this was done automagically within YunoHost’s install / upgrade of Invidious.

I’m not sure everyone is comfortable doing this manually. I haven’t tried it myself yet, but will try to fix it manually for my machine probably next week (busy right now).

As far as I understand the problem, tokens should be regenerated periodically. Nevertheless, automatizing token creation seems to be a task best suited for the upstream devs. Invidious is kind of broken outside of Yunohost.

The token generation method was meant to address ‘This is to protect our community’ issue and is now obsolete as per this announcement, and never worked for me (I manually modified YNH IV instance to include the fix, no effect).

For now, IV instances hosted in major data centers have no working solution, sorry.

For everyone in this post, I switched this week to Piped and so far it seems to work. So in case you need to use an alternative, you can install it from Yunohost apps, thanks!

2 Likes

@saebaryo after looking some more at the logs I think backend is either down or misconfigured, have you modified the stock Invidious/nginx configuration? API calls (not asset calls) are returning permission errors and that would explain why the video playback is broken.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.