Jump to content


Photo

Roku app never finishes Loading or Retrieving when behind reverse proxy


  • Please log in to reply
62 replies to this topic

#1 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 16 June 2019 - 02:44 AM

Recently the Roku app has stopped working correctly for my family. Whenever we try to play a video, it either never finishes retrieving, or after a few seconds of play it start loading again, and does not ever finish. Videos play fine from a laptop.

 

After some troubleshooting I have discovered that everything works properly when connecting directly to emby, but fails as above when using an nginx reverse proxy. I've been using the reverse proxy ever sice i started using emby, so it's new behavior that it does not work now.

 

As the roku sits in retrieving, I see this repeatedly in the nginx logs:
 

192.168.6.59 - - [15/Jun/2019:23:52:10 -0600] "GET /emby/Sessions?deviceId=75e55a13-af5d-51a2-88de-19f691b4b6f7 HTTP/1.1" 200 1618 "-" "Roku/DVP-9.10 (519.10E04111A)"
192.168.6.59 - - [15/Jun/2019:23:52:12 -0600] "GET /emby/videos/109728/hls1/main/1.ts?DeviceId=75e55a13-af5d-51a2-88de-19f691b4b6f7&MediaSourceId=6527a5714674becb83efd40b33208476&PlaySessionId=ad317233652b4344a750d808e026e4cb&api_key=b21ddb589d2a41ffaba61fad7ea51476&VideoCodec=h264,mpeg1video,mpeg2video&AudioCodec=aac,mp2,mp3,flac,opus,vorbis,lpcm&VideoBitrate=109808000&AudioBitrate=192000&MaxFramerate=61&MaxWidth=1280&MaxHeight=720&AudioStreamIndex=1&TranscodingMaxAudioChannels=2&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=41&aac-audiochannels=2&flac-audiochannels=2&lpcm-audiochannels=2&mp3-audiochannels=2&mp2-audiochannels=2&vorbis-audiochannels=2&opus-audiochannels=2&TranscodeReasons=AudioCodecNotSupported HTTP/1.1" 206 146234 "-" "Roku/DVP-9.10 (519.10E04111A)"

I'm honestly not sure what to try next. there are no errors in the nginx error log, so i don't know how it could be breaking things.



#2 speechles ONLINE  

speechles

    Advanced Member

  • App Developer
  • 5769 posts
  • Local time: 08:45 AM

Posted 16 June 2019 - 03:29 AM

Please try with the Emby beta of the Roku app. This may provide a better experience. I recently included fixes in areas to address issues where the app was attempting to recover unrecoverable streams. There is an underlying issue and the beta app should be able to give a proper error message what that is. Please let us know if it does not. Thanks.

 

We are working on more upgrades/improvements to the Roku app every day and playback issues are priority number one. Please bear with us and work with us to address your problem. We may need server logs and ffmpeg logs from you if the beta does not address your issues. We apologize and we will keep in contact with you in this thread. If you have any further issues with the beta please follow up in this thread. Thanks. ^_^


Edited by speechles, 16 June 2019 - 03:32 AM.


#3 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 16 June 2019 - 01:21 PM

I forgot to mention that I already did load and try the emby beta app - unfortunately the issue seems to be present there as well.

 

I did NOT let the emby beta app run long enough to time out retrieve, so I did not see any error messages. I'll do that soon, when i have a moment.

 

I had a hunch this morning, and I modified my nginx configuration to allow http connections, instead of automatically redirecting http to https. After doing that, using both http://emby.servername.com:80 (through the nginx proxy), and https://emby.servername.com:443 work properly - so I suspect that some part of the emby app is trying to connect to http://<name> even when the server is configured for access via https, and that part of the app does not work properly with redirects. I'm attempting to verify this suspicion.



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 11:45 AM

Posted 16 June 2019 - 01:42 PM

Does the server dashboard display http for your remote address?



#5 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 16 June 2019 - 02:23 PM

The server dashboard displays this:

 

Remote (WAN) access: https://emby.klopnet.com:443

however, these connections are from the LAN though I am connecting to that address.

 

To add a further wrinkle, I have a roku TV in addition to the roku express i have done all of this testing on. I didn't consider that the two devices might act differently, but it appears that the roku TV is not exhibiting the problem, but the roku express is. I need to further test the http vs https factor on the roku express, because I only tested that on the roku TV.



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 11:45 AM

Posted 16 June 2019 - 03:34 PM

Right once the apps establish connection, they will then get address info from the server in order to stay updated, and as part of that, they will always attempt connection on the local address first.



#7 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 16 June 2019 - 03:47 PM

first - with redirect totally disabled, the roku express does experience this issue when connecting via HTTPS or HTTP. So, whether there's a redirect on HTTP or not, and whether SSL or not, the issue does occur on the roku express as long as I am proxying through nginx.

 

playback appears to work perfectly well n each of these scenarios using a TCL roku TV.

 

Second - the beta app does not behave differently than the stable app, even if i let it sit in 'retrieving' for like 10 minutes, so it doesn't seem like timeout changes have made a difference here.

 

Because the behavior occurs with HTTP, later today I will try sniffing the traffic to see exactly what requests are being made and if the nginx proxy configuration (very close to the configuration pinned on this forum) is perhaps mangling something.



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 11:45 AM

Posted 16 June 2019 - 03:53 PM

Let us know how you get on. Thanks.



#9 snodrog742 OFFLINE  

snodrog742

    Advanced Member

  • Members
  • 233 posts
  • Local time: 10:45 AM

Posted 16 June 2019 - 06:24 PM

I've been beating my head against a wall thinking it was me.  We recently started experiencing this too but no issues in the log that I can find.  Seems to only be Roku related and using both Beta & Stable.

 

Logs attached.

 

 

Attached Files



#10 ebr OFFLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 48153 posts
  • Local time: 11:45 AM

Posted 17 June 2019 - 09:50 AM

By any chance did both of you guys recently get a Roku firmware update?



#11 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 17 June 2019 - 12:53 PM

I would not be surprised if I did recently get a firmware update, but I'm not the primary user of this roku and I don't think I would probably notice.

 

current details:

3900X - Roku Express

9.1.0 - Build 4111-51



#12 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 17 June 2019 - 01:02 PM

It appears this is pretty recent firmware - https://support.roku...e-release-notes

It looks like it came out on or around May 14 (according to google metadata - it doesn't seem to be listed on that page), and says it wil roll out "in the coming weeks", which just about fits when my family started telling me emby wasn't working on the roku.

 

My Roku TV (Model 7101X / TCL 43" 43S405) that does NOT experience the issue is on "9.0.0 - build 4151-30" - so it's entirely possible this broke with firmware 9.1.0. The article linked above claims all roku TVs will get 9.1.0, so I guess when that happens I'll find out for sure if the roku TV can no longer use emby through the reverse proxy.



#13 snodrog742 OFFLINE  

snodrog742

    Advanced Member

  • Members
  • 233 posts
  • Local time: 10:45 AM

Posted 17 June 2019 - 01:37 PM

I would not be surprised if I did recently get a firmware update, but I'm not the primary user of this roku and I don't think I would probably notice.

 

I echo this.  I'd have to check firmware but really wouldn't be surprised.



#14 benklop OFFLINE  

benklop

    Newbie

  • Members
  • 7 posts
  • Local time: 10:45 AM

Posted 17 June 2019 - 01:44 PM

I have a Roku Streaming Stick 3600X which hasn't been plugged in since march. It was on 9.0.0 when I plugged it in, and emby works correctly through the proxy. I then updated it to "9.1.0 - 4111-24". After doing that, emby STILL works correctly through the proxy. Now, this is not the exact same build as the Roku Express, so it's possible the difference there accounts for it. I now have two devices on 9.1.0 (different builds however), one of which works through the proxy, the other which does not.



#15 jeffsand121 OFFLINE  

jeffsand121

    Newbie

  • Members
  • 8 posts
  • Local time: 12:45 PM

Posted 09 July 2019 - 03:06 PM

Is there a solution to this Roku issue?  I am having the same problem with several different Roku models that are used remotely and have all been updated to version 9.1.0.  These have been tested from multiple remote locations and different wifi connections, all with the same result.  I have tested using a Windows browser, Android Emby app, Windows Emby app, and iOS Emby app and there are no issues with any of these devices playing TV shows or movies from the emby server, just the Roku Emby app is not working properly.  All the Roku Emby apps were working properly prior to the updated firmware.



#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 11:45 AM

Posted 09 July 2019 - 03:17 PM

HI there, have you tried the new Roku app update that was released today?



#17 jeffsand121 OFFLINE  

jeffsand121

    Newbie

  • Members
  • 8 posts
  • Local time: 12:45 PM

Posted 10 July 2019 - 07:44 AM

We did try 3.0.175 and had the same results.



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142356 posts
  • Local time: 11:45 AM

Posted 10 July 2019 - 12:27 PM

Ok so this is reverse proxy related. Most likely it's related to your nginx configuration that might be tampering with the original requests or responses.

 

I would suggest comparing your nginx config to here:

https://emby.media/c...nginx/?p=457670

 

Please let us know if this helps. Thanks.



#19 jeffsand121 OFFLINE  

jeffsand121

    Newbie

  • Members
  • 8 posts
  • Local time: 12:45 PM

Posted 12 July 2019 - 10:12 AM

Thank you, I will check it. I am using the Emby docker and the linuxserver/letsencrypt docker with the sample configs to handle the SSL and reverse proxy. It is just odd that my Roku TV with the older firmware still works with no problem, but the Streaming Stick, Express, and 4 older models all stopped playing media after the update.

#20 speechles ONLINE  

speechles

    Advanced Member

  • App Developer
  • 5769 posts
  • Local time: 08:45 AM

Posted 12 July 2019 - 11:26 AM

The newer firmwares have changes to local domain policy. Changes also to the SSL security policy for cross domains. All of this was done to prevent hijack of the Roku ECP port and intercepting DIAL from outside of the network by spoofing internal IP addresses. With these changes it breaks those spoofs. It also breaks reverse proxies that before were allowed and were not forwarding headers correctly. Those are seen as cross domain now rather than in domain. It causes the Roku to abort and reject the connection. That is entirely the reason.


Edited by speechles, 12 July 2019 - 11:26 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users