"Method not found" for updating library via rpc

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
mjtice Offline
Junior Member
Posts: 30
Joined: Oct 2008
Reputation: 0
Post: #1
I'm running a nightly build (dated July 27) on my ATV2. I used to be able to slap the webservice with:

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc

and have my library update. However, it seems with this release (or maybe earlier) it's erring out.

Code:
$ curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}

I tried some other methods (e.g. pulling video file lists) and they worked just fine.

Has something changed? Debugging is turned on but while tailing the log file I don't see any indication of a problem (nothing is noted in the log file).
find quote
Ned Scott Offline
Team-XBMC Wiki Guy
Posts: 18,239
Joined: Jan 2011
Reputation: 219
Location: Arizona, USA
Post: #2
No offense, but most people (myself included) won't be able to see problems in the log file by looking at it ourselves. Post your log on pastebin and link to it in this thread for a dev to see.
find quote
mjtice Offline
Junior Member
Posts: 30
Joined: Oct 2008
Reputation: 0
Post: #3
Haa, no problem - I'll get it posted today, but like I said nothing regarding http calls or json is being placed in the debug logs.
find quote
mjtice Offline
Junior Member
Posts: 30
Joined: Oct 2008
Reputation: 0
Post: #4
I've posted the debug log.

http://pastebin.com/XgZnQMgP

No indication that it was attempted in the logs. I did, however, run:

Code:
/usr/bin/curl -s --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "id": "mybash"}' -H 'content-type: application/json;'  http://192.168.0.3:8080/jsonrpc

Which outputs in the log:

Code:
18:12:44 T:117579776 M:125890560   DEBUG: RunQuery took 105 ms for 27 items query: SELECT * FROM tvshowview
find quote
mjtice Offline
Junior Member
Posts: 30
Joined: Oct 2008
Reputation: 0
Post: #5
I can't imagine this is a configuration problem on my end. Does anyone else have this problem? Does anyone else update their library via json/rpc?
find quote
popcornmix Offline
Team-XBMC Member
Posts: 2,266
Joined: Feb 2011
Reputation: 55
Post: #6
I see the same error with your command. I'm still using this:

Code:
wget -q -O - "http://192.168.4.13:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)"

I believe this is deprecated, but still seems to work.
find quote
mjtice Offline
Junior Member
Posts: 30
Joined: Oct 2008
Reputation: 0
Post: #7
Yup, that works. Thanks, popcornmix. I wonder why that particular method is no longer working/valid . . .?
find quote
topfs2 Offline
Team-XBMC Developer
Posts: 3,962
Joined: Dec 2007
Reputation: 9
Post: #8
mjtice Wrote:I'm running a nightly build (dated July 27) on my ATV2. I used to be able to slap the webservice with:

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc

and have my library update. However, it seems with this release (or maybe earlier) it's erring out.

Code:
$ curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": 1 }' -H 'content-type: text/plain;'  http://192.168.0.3:8080/jsonrpc
{"error":{"code":-32601,"message":"Method not found."},"id":1,"jsonrpc":"2.0"}

I tried some other methods (e.g. pulling video file lists) and they worked just fine.

Has something changed? Debugging is turned on but while tailing the log file I don't see any indication of a problem (nothing is noted in the log file).

ATV2 uses pre-eden where its changed to VideoLibrary.Scan.

Quote: "VideoLibrary.Scan": {
"type": "method",
"description": "Scans the video sources for new library items",
"transport": "Response",
"permission": "UpdateData",
"params": [],
"returns": "string"
}

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote