Friday, July 16th, 2021, 00:56 UTC | ||
[00:56:49] | SteveGoodey (SteveGoodey!~steve@2a00:23c5:7d83:6501:fa68:6631:5ed6:d871) has joined #mythtv | |
[02:12:18] | SteveGoodey (SteveGoodey!~steve@2a00:23c5:7d83:6501:fa68:6631:5ed6:d871) has quit (Quit: Konversation terminated!) | |
[03:52:29] | amessina (amessina!~amessina@user/amessina) has quit (Quit: Konversation terminated!) | |
[05:07:19] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has joined #mythtv | |
[06:56:03] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has quit (Quit: Konversation terminated!) | |
[07:51:00] | Warped (Warped!~Warped@user/warped) has joined #mythtv | |
[08:08:07] | stuarta: | morning |
[10:04:11] | warpme_ (warpme_!uid391875@id-391875.brockwell.irccloud.com) has joined #mythtv | |
[10:26:06] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has joined #mythtv | |
[11:55:27] | hampton: | buenos días |
[12:39:04] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has quit (Quit: Konversation terminated!) | |
[12:47:35] | SteveGoodey (SteveGoodey!~steve@2a00:23c5:7d83:6501:fa68:6631:5ed6:d871) has joined #mythtv | |
[13:03:15] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[13:03:15] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[13:04:35] | peterbennett: | stuarta: Any idea how to test the methods that take a json object? |
[13:05:02] | peterbennett: | stuarta: e.g. AddRecordedCredits |
[13:12:43] | ijc_ (ijc_!~ijc@benson.default.arb33.bv.iomart.io) has joined #mythtv | |
[13:18:49] | ijc (ijc!~ijc@benson.default.arb33.bv.iomart.io) has quit (*.net *.split) | |
[13:19:32] | stuarta: | peterbennett: i've not actually looked |
[13:20:03] | stuarta: | peterbennett: i believe you said the new code crashes and the old code doesn't function? |
[13:20:31] | stuarta: | in theory it potentially just needs some code to handle application/json payloads |
[13:25:50] | peterbennett: | stuarta: I tried using curl with -d and it just said invalid json |
[13:26:26] | stuarta: | was that curl or the backend saying invalid json? |
[13:26:44] | peterbennett: | backend |
[13:26:47] | peterbennett: | https://www.mythtv.org/wiki/DVR_Service#AddRecordedCredits |
[13:27:27] | peterbennett: | I used this |
[13:27:29] | peterbennett: | curl -X POST "http://rocinante:6544/Dvr/AddRecordedCredits?RecordedId=48" -d ' |
[13:27:52] | stuarta: | jq doesn't like it either |
[13:27:59] | peterbennett: | followed by the sample json in that wiki article and another apostrophe |
[13:28:02] | stuarta: | parse error: Objects must consist of key:value pairs at line 27, column 5 |
[13:28:50] | stuarta: | i see it |
[13:29:39] | stuarta: | the example it wrong. lemme update it |
[13:29:41] | stuarta: | *is |
[13:30:26] | peterbennett: | It seems to want the data as the json= input instead of in the body, because if you put json= something it reports something as invalid |
[13:31:05] | peterbennett: | It seems inconsistent to use the body for the json because the body could be used for soap xml. |
[13:31:16] | stuarta: | try the updated json |
[13:31:31] | stuarta: | json bodies are normal for 'application/json' |
[13:31:43] | stuarta: | they shouldn't be in the url at all |
[13:31:55] | stuarta: | useful tools if you aren't already using them |
[13:32:04] | peterbennett: | did you update the wiki page? It looks the same.. |
[13:32:23] | stuarta: | - jq, command line tool for parse and pretty printing json. eg. `cat data.json | jq .` |
[13:32:48] | stuarta: | peterbennett: looks can be deceiving with json, there was a missing ']' |
[13:32:54] | peterbennett: | WHat is the easy way to test it with curl? |
[13:33:26] | stuarta: | - postman, <- good web based api tester |
[13:33:28] | peterbennett: | oh I see at the end of CastMembers |
[13:33:30] | stuarta: | yup |
[13:33:59] | stuarta: | should just be curl -d @data.json -H 'Content-Type: application/json' <endpoint> |
[13:34:06] | stuarta: | iirc |
[13:35:04] | peterbennett: | still same error <detail><errorCode>501</errorCode><errorDescription>Inva lid JSON: </errorDescription></detail> |
[13:36:04] | peterbennett: | if i put curl -X POST "http://rocinante:6544/Dvr/AddRecordedCredits? . . . on=xyz" |
[13:36:27] | peterbennett: | then it says errorDescription>Invalid JSON: xyz</errorDescriptio |
[13:36:38] | stuarta: | peterbennett: is this code commited yet to be able to test? |
[13:36:51] | peterbennett: | so it seems to be expecting the json in the json=parameter |
[13:36:58] | peterbennett: | yep |
[13:37:06] | stuarta: | lemme pull and test |
[13:37:13] | peterbennett: | I am still trying with the old 6544 port. |
[13:37:21] | peterbennett: | The new 6744 port just crashes |
[13:37:48] | peterbennett: | so I expect the current master will also do the same |
[13:40:10] | peterbennett: | If I try to put the json sample into json=' ' then curl complains about nested braces |
[13:40:25] | stuarta: | that can't be right. json belongs in the body |
[13:40:28] | peterbennett: | I guess I need to url encode it |
[13:40:48] | stuarta: | other wise you would have to compact and url encode it, which is plain wrong |
[13:44:50] | peterbennett: | OK it seems to work that way, url encode the entire json and include it in json= |
[13:45:00] | stuarta: | ugg |
[13:45:16] | peterbennett: | I got reponse <bool>true</bool> |
[13:45:40] | stuarta: | i have to make a recording to test :-p |
[13:46:53] | peterbennett: | Yes it got updated with those actors in the sample |
[13:47:07] | peterbennett: | curl -X POST "http://rocinante:6544/Dvr/AddRecordedCredits? . . . 20%20%22Name |
[13:47:07] | peterbennett: | %22%3A%20%22Caroline%20Quentin%22%2C%0A%20%20%20%20%20%20%22CharacterName%22%3A% 20%22Maddy%20Magellan%22%2C%0A%20%20%20%20%20%20%22Role%22%3A%20%22actor%22%2C%0 A%20%20%20%20%20%20%22TranslatedRole%22%3A%20%22Actors%22%0A%20%20%20%20%7D%2C%0 A%20%20%20%20%7B%0A%20%20%20%20%20%20%22Name%22%3A%20%22Julia%20Sawalha%22%2C%0A %20%20%20%20%20%20%22CharacterName%22%3A%20%22Carla%20Borrego%22%2C%0A%20%20%20% 20%20%20%22Role%22%3A%20%22actor%22%2C%0A |
[13:47:07] | peterbennett: | %20%20%20%20%20%20%22TranslatedRole%22%3A%20%22Actors%22%0A%20%20%20%20%7D%2C%0A %20%20%20%20%7B%0A%20%20%20%20%20%20%22Name%22%3A%20%22Stuart%20Milligan%22%2C%0 A%20%20%20%20%20%20%22CharacterName%22%3A%20%22Adam%20Klaus%22%2C%0A%20%20%20%20 %20%20%22Role%22%3A%20%22actor%22%2C%0A%20%20%20%20%20%20%22TranslatedRole%22%3A %20%22Actors%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A" |
[13:47:41] | stuarta: | can you try it with json as a body, i expect you need to set the content type header |
[13:53:41] | peterbennett: | actually that works |
[13:53:53] | peterbennett: | -H "Content-Type: application/json" |
[13:54:56] | peterbennett: | And it even works with the new port 6744 :) |
[13:56:38] | peterbennett: | Note that the url encoded one fails with 6744 saying the http header is too long. I don't know if that is a problem |
[13:57:42] | peterbennett: | I will update the wiki to include the curl command for testing, that will help a bit. |
[14:02:12] | peterbennett: | If you run it without the content-type header, the backend crashes with an error from QT. That is not good.... |
[14:02:22] | peterbennett: | 2021-07–16 10:01:09.505919 I Qt: Qt has caught an exception thrown from an event handler. Throwing |
[14:02:22] | peterbennett: | exceptions from an event handler is not supported in Qt. |
[14:02:22] | peterbennett: | You must not let any exception whatsoever propagate through Qt code. |
[14:02:22] | peterbennett: | If that is not possible, in Qt 5 you must at least reimplement |
[14:02:22] | peterbennett: | QCoreApplication::notify() and catch all exceptions there. |
[14:02:22] | peterbennett: | 2021-07–16 10:01:09.506211 C Received Aborted: Code -6, PID 65933, UID 1000, Value 0x00000000 |
[14:02:23] | peterbennett: | Aborted |
[14:03:59] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[14:26:30] | hampton: | That was some abort. Knocked Peter offline entirely. |
[14:30:11] | stuarta: | :-p |
[14:30:19] | stuarta: | i can definitely reproduce it |
[14:30:42] | stuarta: | no idea when i'll have time to dig more deeply tho |
[14:32:06] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[14:32:06] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[14:33:23] | peterbennett: | hampton: It was breakfast that knocked me offline entirely :) |
[14:33:35] | hampton: | :-) |
[14:34:34] | peterbennett: | stuarta: It looks like the http code throws an exception if it does not like the content type and unfortunately qt then aborts mythbackend |
[14:36:23] | stuarta: | that sounds more like a "TODO" |
[14:36:51] | peterbennett: | stuarta: I will take a look at it. |
[14:36:59] | stuarta: | peterbennett: thanks |
[14:43:38] | stuarta: | definitely need to convert the exception to a log and continue |
[14:43:51] | stuarta: | can't have bad api input taking down the backend |
[14:51:35] | peterbennett: | yes |
[14:54:29] | stuarta: | progress++ |
[15:02:36] | SteveGoodey (SteveGoodey!~steve@2a00:23c5:7d83:6501:fa68:6631:5ed6:d871) has quit (Remote host closed the connection) | |
[15:30:26] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[15:32:37] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[15:32:37] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[16:04:50] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[16:06:24] | amessina (amessina!~amessina@user/amessina) has joined #mythtv | |
[16:12:12] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[16:12:12] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[16:13:03] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Client Quit) | |
[16:55:54] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[16:55:54] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[16:58:05] | amessina (amessina!~amessina@user/amessina) has quit (Quit: Konversation terminated!) | |
[17:02:15] | SteveJGoodey (SteveJGoodey!~quassel@2a00:23c5:7d83:6501:61e8:a103:2b8c:b705) has joined #mythtv | |
[17:08:03] | amessina (amessina!~amessina@user/amessina) has joined #mythtv | |
[17:25:23] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[18:20:22] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[18:20:22] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[18:20:51] | SteveJGoodey (SteveJGoodey!~quassel@2a00:23c5:7d83:6501:61e8:a103:2b8c:b705) has quit (Ping timeout: 255 seconds) | |
[18:35:54] | warpme_ (warpme_!uid391875@id-391875.brockwell.irccloud.com) has quit (Quit: Connection closed for inactivity) | |
[18:49:14] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[19:17:19] | cbovy (cbovy!~cbovy@2001:9e0:8704:1b02:3634:dbc7:5cd1:a192) has joined #mythtv | |
[19:41:08] | cbovy (cbovy!~cbovy@2001:9e0:8704:1b02:3634:dbc7:5cd1:a192) has quit (Ping timeout: 255 seconds) | |
[19:56:07] | SteveJGoodey (SteveJGoodey!~quassel@2a00:23c5:7d83:6501:e5f5:dcf6:8816:afb9) has joined #mythtv | |
[19:56:22] | SteveJGoodey (SteveJGoodey!~quassel@2a00:23c5:7d83:6501:e5f5:dcf6:8816:afb9) has quit (Read error: Connection reset by peer) | |
[21:14:24] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[21:14:24] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[21:45:33] | DevMythNotifyBot: | COMMIT: linuxdude42 pushed 5 commit(s) to branch master: https://github.com/MythTV/mythtv/compare/4d21 . . . 65ac18afcecb |
[21:51:34] | MythBuild: | Build [#1069](https://code.mythtv.org/buildbot/#builders/123/builds/1069) of `master-centos8–64bit` 4failed. |
[21:51:40] | MythBuild: | Build [#707](https://code.mythtv.org/buildbot/#builders/160/builds/707) of `master-ubuntu-20_04–64bit` 4failed. |
[21:51:44] | MythBuild: | Build [#1281](https://code.mythtv.org/buildbot/#builders/24/builds/1281) of `master-fedora-aarch64` 4failed. |
[21:52:48] | MythBuild: | Build [#1276](https://code.mythtv.org/buildbot/#builders/30/builds/1276) of `master-ubuntu-lts-64bit` 4failed. |
[21:53:05] | hampton: | Some of the builders will need libzip-dev(el) installed... |
[21:53:13] | MythBuild: | Build [#1304](https://code.mythtv.org/buildbot/#builders/12/builds/1304) of `master-fedora-armv7hl` 4failed. |
[21:53:37] | MythBuild: | Build [#1061](https://code.mythtv.org/buildbot/#builders/112/builds/1061) of `master-debian-buster-rpi2-armv7l` 4failed. |
[21:53:46] | MythBuild: | Build [#1357](https://code.mythtv.org/buildbot/#builders/45/builds/1357) of `master-freebsd12–64bit` 4failed. |
[21:54:04] | MythBuild: | Build [#1051](https://code.mythtv.org/buildbot/#builders/117/builds/1051) of `master-debian-bullseye-64bit` 4failed. |
[21:56:53] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[23:35:30] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[23:35:30] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[23:46:24] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[23:50:05] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[23:50:05] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[23:51:16] | DevMythNotifyBot (DevMythNotifyBot!~nodebot@cust32-dsl91-135-4.idnet.net) has quit (Remote host closed the connection) | |
[23:51:32] | DevMythNotifyBot (DevMythNotifyBot!~nodebot@cust32-dsl91-135-4.idnet.net) has joined #mythtv |
IRC Logs collected by
BeirdoBot.
Please use the above link to report any bugs.