Plex HTML5 App WorldWide Request

Discussion in 'Developers Corner' started by jgametest, Dec 17, 2013.

  1. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013

    Advertisements

    Yes. You have to use myplex.
     
  2. jmcmeekan

    jmcmeekan New Member

    12
    0
    Mar 26, 2002
    I currently store all my media and run Plex Server on my machine running Windows Server 2012 essentials. However, port 80 already has a number of services listening to it, so does anyone have any ideas what I can do in this case. The PlexTivo or whatever it ends up being called sounds great but the local web server is the one thing holding me back from testing. Thanks.
     
  3. HarperVision

    HarperVision TiVo's Italian Cuz!

    5,275
    18
    May 14, 2007
    Paradise...
    I just switched it to port 84 and it worked.
     
  4. jmcmeekan

    jmcmeekan New Member

    12
    0
    Mar 26, 2002
    Did you switch the port on the web server (are you running mongoose)? And if so, did you have to change anything in the TiVo Plex client in order for it to work? Thanks.
     
  5. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013

    Advertisements

    Either 1. Put it in a subdirectory of the server you are running
    2. Use myplex and the appspot URL I posted earlier in this thread
     
  6. wr0ngway

    wr0ngway New Member

    23
    0
    Jan 4, 2014
    Thanks, ok, I understand now - just out of curiosity, what is the limitation of running in the tivo browser, does it not allow one to connect to any IP or any internal IP (192.*, 10.*)? Does it also prevent connecting to a hostname that happens to map to any internal ip (e.g. if I try to connect to foo.com which I have mapped in my router to the internal ip)?

    Either way, I still couldn't get the appspot url to work with myplex - It seems to login to myplex ok, but never leaves the login dialog. I ended up just running the app on a local server, and that works great.
     
  7. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    Yes. The tivo seems to have some sort of security limitation that when you connect to an outside domain, it will not let you send XML requests to local IP addresses.

    People seem to be having some problems with myplex, and I would love to figure out the issue. But, I haven't heard any more feedback on it. It works for me, but I had to tweak some settings in my firewall. I thought that was unique to me (I have a very complicated set-up), but perhaps it is not.

    Do you know for sure that your myplex works without my app (i.e. have you used it on an ipad/iphone/android externally to your network)?. Do you have 32400 forwarded through your router to the plex server?

    Thanks,

    ntlord
     
  8. rjmitche

    rjmitche Member

    47
    0
    Dec 30, 2004
    First - excellent work! I'm thrilled to have access to Plex via the TiVo! I've got it working great via a local server but having a similar experience as others with myplex and the appspot URL.

    What I can add is that the appspot URL works fine outside of my home network. In other words, if I go to http://plextivo.appspot.com from work (via a browser), I see the PlexTiVo app and all my videos are available. However, if I try it from home (via the Tivo or a browser) I appear to get signed in but, I just return to the initial page (sign in/out).

    I turned on the 'developer tools' in various browsers to try and see what was happening - maybe this will be useful:

    Firefox:
    Code:
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://<myPlexServerIP>:13340/?X-Plex-Token=<removed>. This can be fixed by moving the resource to the same domain or enabling CORS.
    Chrome:
    Code:
    HTML1300: Navigation occurred.
    File: plextivo.appspot.com
    en
    SEC7118: XMLHttpRequest for https://my.plexapp.com/users/sign_in.xml required Cross Origin Resource Sharing (CORS).
    File: plextivo.appspot.com
    SEC7119: XMLHttpRequest for https://my.plexapp.com/users/sign_in.xml required CORS preflight.
    File: plextivo.appspot.com
    SEC7118: XMLHttpRequest for https://my.plexapp.com/pms/servers.xml?auth_token=<removed> required Cross Origin Resource Sharing (CORS).
    File: plextivo.appspot.com
    SEC7118: XMLHttpRequest for http://<myPlexServerIP>:13340/?X-Plex-Token=<removed> required Cross Origin Resource Sharing (CORS).
    File: plextivo.appspot.com
    CSS3114: @font-face failed OpenType embedding permission check. Permission must be Installable.
    File: glyphicons-regular.ttf
    SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd.
    File: plextivo.appspot.com
    Internet Explorer:
    Code:
    GET http://<myPlexServerIP>:13340/?X-Plex-Token=<removed> net::ERR_CONNECTION_REFUSED jquery-2.0.3.js:8829
    x.support.cors.e.crossDomain.send       jquery-2.0.3.js:8829
    x.extend.ajax                           jquery-2.0.3.js:8829
    PLEX.checkLibraryServerExists           plex.js?v=192:151
    Menu.initialise                         index.js?v=352:201
    (anonymous function)                    (index):26
    (anonymous function)                    language.js:50
    l                                       jquery-2.0.3.js:8829
    c.fireWith                              jquery-2.0.3.js:8829
    k                                       jquery-2.0.3.js:8829
    (anonymous function)                    jquery-2.0.3.js:8829
     
  9. mr_pink

    mr_pink New Member

    49
    0
    Dec 15, 2006
    For those having appspot issues, especially if it works form outside your network but not from inside, check to see that your firewall/router allows you to connect to your external IP on 32400 from inside your network (Nat hairpin/uturn). I was forwarding port 32400 in to my plex server and if I am outside my network I have no problems connecting via myplex, but if I tried from inside I was having issues. I had to to add additional rules to accommodate hitting the external IP from inside.
     
  10. bradleys

    bradleys It'll be fine....

    4,157
    246
    Oct 31, 2007
    Mr. pink, what kind of rules did you add to your routing config?
     
  11. mr_pink

    mr_pink New Member

    49
    0
    Dec 15, 2006
    I have a Palo Alto firewall so I had to do this: https://live.paloaltonetworks.com/docs/DOC-1678

    I don't want to confuse the situation - I think basic home consumer routers that support port forwarding take care of this automatically - but if you are running a more advanced firewall it may be something that is easily overlooked.

    If you are on your own LAN and can browse to http://internalip:32400 and get a response, and then you try browsing to http://externalip:32400 and get the same response, this is not your issue - move on. If however you get no response from http://externalip:32400 from inside when it works just fine from outside, you may have a hairpin/uturn nat issue to work out.
     
  12. wr0ngway

    wr0ngway New Member

    23
    0
    Jan 4, 2014
    Myplex does work fine for me from both outside/inside my firewall, however, by default myplex uses uPNP to map the external port, and it is never 32400 in that case - does the myplex in plextivo assume 32400 or does it try to use the mapped external port?
     
  13. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013

    This was the issue I was referring to originally when I said I had a problem unique to my firewall. I don't have palo alto, but I run a different one from sophos.
     
  14. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    I believe it does. It uses the port that is returned from the myplex login xml, which should be the proper port.
     
  15. rjmitche

    rjmitche Member

    47
    0
    Dec 30, 2004
    I have a (relatively recent) home consumer router that supports port forwarding (D-Link DIR-860L) and I seem to have this issue. I can't find anything in the router config that would allow me to modify the behavior - maybe I'm not looking in the right places but, I've been all around the administration screens.
     
  16. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    You shouldn't need to set this in your consumer router. So I believe there must be other issues going on here.

    I'm not sure what, but I suspect it may have to do with folks that are using the UPNP discovery (I am not, so I haven't tested it). There are like 3 or 4 different ways one can get the server list from myplex, so perhaps I'm using the wrong one.

    Unfortunately, I don't have much time to look at this for next few weeks. Once things settle down, I'll take a look.
     
  17. rjmitche

    rjmitche Member

    47
    0
    Dec 30, 2004
    I've got it working via a local web server (SimpleHTTPServer) so this isn't holding me back. I'm just hoping that maybe I can help troubleshoot this issue so others may benefit...

    From earlier in the thread:
    I think you may have been on the right track with this as I'm seeing this when I look in the Firefox developer console:
    Code:
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://<myPlexServerIP>:13340/?X-Plex-Token=<removed>. This can be fixed by moving the resource to the same domain or enabling CORS.
     
  18. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    Sorry, been busy. Try this again, but after you get the blocked message, try the blocked URL directly in your browser, and let me know what happens. Do you get XML displayed?

    A few more questions:

    1. Does it work outside of your network?
    2. What do you have in "List of networks allowed without auth" setting in Plex? (Settings/Server/Network/Advanced)

    What I find weird is how this works for me, and not for you. Although, it may have to do with that special route I set up that I mentioned earlier. But again, you shouldn't have to set up that route.

    Thanks,

    ntlord
     
  19. rjmitche

    rjmitche Member

    47
    0
    Dec 30, 2004
    The blocked url is: http://<externalIP>:13340/?X-Plex-Token=<tokenValue>. If I put that into the browser, I just get 'unable to connect' -- "Firefox can't establish a connection to the server at <externalIP>:13340."

    1. Yes, if I go to http://plextivo.appspot.com/ outside of my home network, it works and I am able to access the Plex videos.
    2. "List of networks allowed without auth" setting in Plex is blank.
     
  20. ntlord

    ntlord Member

    184
    1
    Nov 30, 2013
    Interesting. That sounds like the uturn/hairpin issue. I thought most consumer routers addressed this. When I find some free time, I'll look into this closer.

    Can someone else test this out too that doesn't have it working?
     

Share This Page

spam firewall

Advertisements