Jump to content

Recommended Posts

Posted (edited)

I am experiencing the problem precisely as described in this topic, except only in Chrome and only when requesting the actual stream file (https://myserver/emby/videos/id/stream.webm?morestuf). All other pages (logging in, navigating, cover art, ...) work fine in all browsers. I am running Emby 3.0.5821 and use Nginx as the reverse proxy.

 

Firefox and Microsoft Edge work fine but Chrome does not. Using the exact same setup, Firefox sends the Authorization header on all pages while Chrome does not send the Authentication header on its request to the stream file (https://myserver/emby/videos/id/stream.mkv?morestuf). One difference that I can see is that Chrome is asking for a stream.mkv file, while Firefox is asking for a stream.webm file.

 

The result is that instead of my video, I get a popup that sais "Video Error There was an error playing the video.". The popup appears to be a recent addition to Emby, because I updated Emby before making this topic and before the update the popup was not there :).

 

Screenshots of the requests made by Firefox and Chrome are attached.

post-111953-0-47959900-1454639967_thumb.png

post-111953-0-34809200-1454640420_thumb.png

Edited by semafoor
Posted

I'm going to set an attribute on the video element to use credentials. hopefully that will take care of it, that's about all we can really do as it's the browser's video player that is making the requests, not us.

  • 3 months later...
mynameisfiber
Posted

Is there any word as to whether the video attribute @@Luke mentioned works?  I'm running emby 3.0.5934.0 and I'm still seeing this problem.  Of note is that my reverse proxy itself has basic auth on it so there is the potential of header mangling.

Posted

I was unable to make that change because it caused other problems, sorry. As far as making it optional, i don't have a proxy test setup to determine if that's something we should do or not.

  • 3 months later...
Posted

Ah I have now run into this same problem!

 

Using the combination of Emby + Nginx reverse proxy HTTPS + Chrome results in being unable to play any video.

 

Is there any fix or workaround?

Posted

Ah I have now run into this same problem!

 

Using the combination of Emby + Nginx reverse proxy HTTPS + Chrome results in being unable to play any video.

 

Is there any fix or workaround?

 

There's a lot of people here running a setup like that without any problems so there must be something specific to your configuration that is not allowing it to work.

Posted (edited)

There's a lot of people here running a setup like that without any problems so there must be something specific to your configuration that is not allowing it to work.

Ok then I suppose I need something specific in my Nginx setup to make it work with Chrome, that's the part I was hoping to get, but I'll search some more, thank you!

 

I forgot to mention, the point is that it's working perfectly fine with Firefox, so Chrome has different requirements than Firefox to make this work.

Edited by liquidox
Posted

If I had to guess, our custom request headers are probably getting dropped along the way by the proxy. I would look into that.

Posted

I'm facing the same issue.

Chrome is not sending the "Authorization" header when the request is initiated from a "video" element.

Captured this on chrome://net-internals :

219242: URL_REQUEST
https://mydomain.org/emby/Videos/997d83b598455b07f562af6fc89863f7/stream.mp4?Static=true&mediaSourceId=997d83b598455b07f562af6fc89863f7&deviceId=291a0bd50a00fbd512fc887800b327c07ae182e6&api_key=123&Tag=ddd3692f48cdbb036b1ff11d4f2659ab
Start Time: 2016-09-07 23:15:46.957

t=255908 [st=  0] +REQUEST_ALIVE  [dt=265]
t=255909 [st=  1]    URL_REQUEST_DELEGATE  [dt=0]
t=255909 [st=  1]   +URL_REQUEST_START_JOB  [dt=1]
                     --> load_flags = 34624 (DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
                     --> method = "GET"
                     --> priority = "LOWEST"
                     --> url = "https://mydomain.org/emby/Videos/997d83b598455b07f562af6fc89863f7/stream.mp4?Static=true&mediaSourceId=997d83b598455b07f562af6fc89863f7&deviceId=291a0bd50a00fbd512fc887800b327c07ae182e6&api_key=123&Tag=ddd3692f48cdbb036b1ff11d4f2659ab"
t=255909 [st=  1]      SERVICE_WORKER_START_REQUEST
t=255909 [st=  1]     +SERVICE_WORKER_DISPATCH_FETCH_EVENT  [dt=1]
                       --> event_type = "Fetch Subresource"
t=255909 [st=  1]        SERVICE_WORKER_FETCH_EVENT  [dt=1]
t=255910 [st=  2]     -SERVICE_WORKER_DISPATCH_FETCH_EVENT
                       --> has_response = false
                       --> status = "Operation has succeeded"
t=255910 [st=  2]      SERVICE_WORKER_FALLBACK_RESPONSE
t=255910 [st=  2]   -URL_REQUEST_START_JOB
t=255910 [st=  2]   +URL_REQUEST_START_JOB  [dt=263]
                     --> load_flags = 34624 (DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
                     --> method = "GET"
                     --> priority = "LOWEST"
                     --> url = "https://mydomain.org/emby/Videos/997d83b598455b07f562af6fc89863f7/stream.mp4?Static=true&mediaSourceId=997d83b598455b07f562af6fc89863f7&deviceId=291a0bd50a00fbd512fc887800b327c07ae182e6&api_key=123&Tag=ddd3692f48cdbb036b1ff11d4f2659ab"
t=255910 [st=  2]      URL_REQUEST_DELEGATE  [dt=0]
t=255910 [st=  2]      HTTP_CACHE_CALLER_REQUEST_HEADERS
                       --> Accept-Encoding: identity;q=1, *;q=0
                           User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.89 Safari/537.36
                           Range: bytes=0-
                           Accept: */*
                           Referer: https://mydomain.org/emby/web/home.html
                           Accept-Language: en-US,en;q=0.8,pt;q=0.6
                       --> line = ""
t=255910 [st=  2]      HTTP_CACHE_GET_BACKEND  [dt=0]
t=255910 [st=  2]      HTTP_CACHE_OPEN_ENTRY  [dt=261]
t=256171 [st=263]      HTTP_CACHE_ADD_TO_ENTRY  [dt=0]
t=256171 [st=263]      HTTP_CACHE_READ_INFO  [dt=0]
t=256171 [st=263]      URL_REQUEST_DELEGATE  [dt=0]
t=256171 [st=263]     +HTTP_STREAM_REQUEST  [dt=0]
t=256171 [st=263]        HTTP_STREAM_REQUEST_STARTED_JOB
                         --> source_dependency = 219253 (HTTP_STREAM_JOB)
t=256171 [st=263]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                         --> source_dependency = 219253 (HTTP_STREAM_JOB)
t=256171 [st=263]     -HTTP_STREAM_REQUEST
t=256171 [st=263]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=0]
t=256171 [st=263]        HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
                         --> :authority: mydomain.org
                             :method: GET
                             :path: /emby/Videos/997d83b598455b07f562af6fc89863f7/stream.mp4?Static=true&mediaSourceId=997d83b598455b07f562af6fc89863f7&deviceId=291a0bd50a00fbd512fc887800b327c07ae182e6&api_key=123&Tag=ddd3692f48cdbb036b1ff11d4f2659ab
                             :scheme: https
                             accept: */*
                             accept-encoding: identity;q=1, *;q=0
                             accept-language: en-US,en;q=0.8,pt;q=0.6
                             if-range: "cc2305ecf7e8082d54372f33704f97ae"
                             range: bytes=0-20936889
                             referer: https://mydomain.org/emby/web/home.html
                             user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.89 Safari/537.36
t=256171 [st=263]     -HTTP_TRANSACTION_SEND_REQUEST
t=256171 [st=263]     +HTTP_TRANSACTION_READ_HEADERS  [dt=2]
t=256173 [st=265]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                         --> HTTP/1.1 401
                             status: 401
                             server: nginx/1.11.3
                             date: Thu, 08 Sep 2016 02:15:47 GMT
                             content-type: text/html
                             content-length: 597
                             www-authenticate: Basic realm="Restricted"
t=256173 [st=265]     -HTTP_TRANSACTION_READ_HEADERS
t=256173 [st=265]      URL_REQUEST_DELEGATE  [dt=0]
t=256173 [st=265]   -URL_REQUEST_START_JOB
t=256173 [st=265]    URL_REQUEST_DELEGATE  [dt=0]
t=256173 [st=265]   +HTTP_TRANSACTION_READ_BODY  [dt=0]
t=256173 [st=265]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                       --> delta = -597
                       --> stream_id = 3
                       --> window_size = 6290859
t=256173 [st=265]   -HTTP_TRANSACTION_READ_BODY
t=256173 [st=265]    URL_REQUEST_JOB_BYTES_READ
                     --> byte_count = 597
t=256173 [st=265]    HTTP_TRANSACTION_READ_BODY  [dt=0]
t=256173 [st=265] -REQUEST_ALIVE
Posted

Who is throwing the 401? Emby or your proxy? Emby doesn't use the authorization header, we use our own custom headers. If Emby is throwing the 401 then it is most likely due to your proxy not preserving the headers.

Posted

There is nothing wrong with Emby - at least not with the server.

The request never reaches it. It stops on Nginx.

Its Chrome related and I'm not sure its solvable through javascript.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...