Plex/Web & URL Services Question - "No service found for URL 'ipad:..."

I am troubleshooting why my plugin isn't working with Plex/Web. I've noticed the following entries showing up in the com.plexapp.system.log and have no idea what it means. The other oddity is that I also see this when i access the plugin using the Roku client. Though, with the Roku, the plugin does actually work and does play the video. Plex/Web just gives me the sad face of death. 

 

2013-07-06 19:33:11,894 (1748) :  DEBUG (runtime:714) - Handling request GET /system/:/services/url/lookup?url=http%3A//www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013
2013-07-06 19:33:11,895 (1748) :  DEBUG (runtime:811) - Found route matching /system/:/services/url/lookup
2013-07-06 19:33:11,895 (1748) :  DEBUG (services:23) - Looking up URL 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:11,897 (1748) :  DEBUG (services:615) - Found a service matching 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013' - Crunchyroll (com.plexapp.plugins.crunchyroll)
2013-07-06 19:33:11,898 (1748) :  DEBUG (services:615) - Found a service matching 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013' - Crunchyroll (com.plexapp.plugins.crunchyroll)
2013-07-06 19:33:11,901 (1748) :  DEBUG (networking:233) - Fetching HTTP headers for 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:14,151 (1748) :  INFO (logkit:16) - Length: 20  Type: text/html
2013-07-06 19:33:14,153 (1748) :  DEBUG (networking:172) - Requesting 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:17,411 (1748) :  DEBUG (services:602) - No service found for URL 'ipad:http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:17,411 (1748) :  DEBUG (services:617) - No matching services found for 'ipad:http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:17,413 (1748) :  DEBUG (services:602) - No service found for URL 'ipad:http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:17,413 (1748) :  DEBUG (services:617) - No matching services found for 'ipad:http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:17,414 (1748) :  DEBUG (networking:233) - Fetching HTTP headers for 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:17,700 (1748) :  INFO (logkit:16) - Length: 20  Type: text/html
2013-07-06 19:33:17,700 (1748) :  DEBUG (networking:172) - Requesting 'http://www.crunchyroll.com/hunter-x-hunter/episode-85-light-x-and-x-dark-623013'
2013-07-06 19:33:21,073 (1748) :  DEBUG (runtime:911) - Response: [404] NoneType, 0 bytes

 

Here is what i don't understand:

  1. Line 4 and 5 of the log says that it located a matching URL service. However a few lines later (lines 9 - 12) it says it can't find a matching service. So i don't understand which is true... 
     
  2. On lines 9 - 12 it references "iPad". This happens from both Plex/Web and Roku. Neither of which is an iPad. Why does it say iPad?
     
  3. As i stated above, the plugin works on Roku but not on Plex/Web. (I've tested with Safari, IE, Firefox, & Chrome.) I just get a sad face when i click to play a particular episode. 

 

Thanks for any advice/thoughts you can provide!

Basically what's happening is that PMS is matching your URL Service but then somewhere in the service it throws an error and then PMS tries to use the "Fallback" URL Service to find a video with the given url. Part of the logic in the fallback service is to load pages using an iPad user-agent header to see if the website has a mobile friendly version with accesible MP4 files.

As to why it works on Roku but not /Web, I'm not really sure. As much as I love the web client, I find that it can be a little tricky dealing with channels. If you can get around that error in your logs, it might start to work on /web. Or, it might expose another error which is currently being buried.

Ah. Thanks for the rundown. I will try and figure out what is happening with the URL service. A couple of follow up questions:

1) Is there any way to specify playback methods in the URL service code for different clients such as iOS or /Web? This way i could playback MP4 streams for iOS and /Web and playback the high-res m3u8 streams for the Desktop and Roku clients. I'm just not sure how to go about targeting client platforms. Or should i do something like try to play the higher res streams first and then with an except play the mp4 streams?

2) I've noticed that the Plex clients don't really adhere to the PlexClientPlatforms & PlexClientPlatformExclusions strings specified in the Info.plist file. Am i doing something wrong here? My goal is to exclude clients that i know don't work. (In this case, that would be iOS, Safari, Firefox, & Chrome) I've tried the following methods but neither seem to do anything. 

---- Specifying a * under PlexClientPlatforms and then specifying the non-working platforms under the PlexClientPlatformExclusions

---- Specifying the clients i know work under PlexClientPlatforms and not even bothering with PlexClientPlatformExclusions

Thanks!

Quick update:

The problem turned out to be that i did not have the MetadataObjectForURL(url) section in my ServiceCode.pys. When i originally wrote the URL service i didn't see the need for it. In my mind it duplicated work that my plugin code was already doing. However, as i just found out, Plex apparently uses the data from that function for many of the plex clients such as iOS, Roku, and Windows 8. I went ahead and coded the function correctly, loaded it up, and everything magically started working. The errors from my original post are gone. I have also discovered that my plugin now works with many more clients than it did before. (Win 8, /Web, iOS, etc) 

So, there you go. If you're seeing weird 404 errors in your logs or anything above, make sure your MetadataObjectForURL() function is working properly. Also, while i'm at it, (and i'm sure many of you know this) i found that debugging the ServiceCode was easiest by calling it directly like such: http://127.0.0.1:32400/system/services/url/lookup?url=[ENCODED URL HERE]. You can see the XML output and any errors that it may produce. 

That said, i still am curious about my two questions above. (How to play different streams to different clients & how to prevent my plugin from being used on certain platforms)

I got started writing a reply yesterday but kept getting distracted/called-away.

IIRC, the "PlexClientPlatforms" and "PlexClientPlatformExclusions" keys in the Info.plist are more involved in determining what shows up in the Channel Directory when accessed via a given client. I *think* that they are supposed to limit what shows up on the client after install as well but I'm not sure if that is actually still enforced or not. Even if it is, so many people have "Disabled Capability Checking" that it's not totally reliable anyway.

As far as using the client platform to determine what type of media stream to return goes, that is becoming a more common application. The plugin framework includes a variable to return the "identity" of the client making requests; "Client.Platform". An example is in the MediaObjectsForURL() of the TouTV URL Service, here. In that case we define a list of EHLS compatible clients at the top of the ServiceCode.pys and reference it later but, there's no reason you can't just do it in place.

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