Expired TiVo cookie causes Galleon ToGo transfers to fail

closeHey, just so you know ... this post is now about 11 years and 1 month old. Please keep that in mind as it very well may contain broken links and/or outdated information.

On February 16, 2013, TiVo owners everywhere suddenly found that they were unable to transfer recordings off of their DVRs. Third-party applications like kmttg and even TiVo’s own TiVo Desktop were suddenly broken. The problem was tracked down to an expired server-side cookie which, inexplicably, was hard-coded into the TiVo software to expire on 02/16/13.

TiVo’s workaround was to set your computer’s clock back to before February 16, but obviously that’s not a great solution. TCF user morac found a way to fix TiVo Desktop by making a change to the curl.conf file and other application developers made similar changes to their software to essentially use a “dummy” cookie to get around the expired one … much better than changing your system’s date/time.

When someone filed a bug in SourceForge that Galleon was affected by the same problem, I decided to see if I could fix it. It turned out to be a simple, 1-line addition to ToGo.java. Before the fix, after selecting a recording to transfer, I would see this in the log:

20:47:28,196 DEBUG [DownloadThread] DownloadThread - Picked: org.lnicholls.galleon.database.Video@c1d7d2
20:47:28,746 DEBUG [DownloadThread] ToGo - Status code: 400

And after the fix:

21:08:47,684 DEBUG [DownloadThread] DownloadThread - Picked: org.lnicholls.galleon.database.Video@1e00f69
21:08:51,977 INFO [DownloadThread] ToGo - Downloading: The Tonight Show With Jay Leno (Recorded Wed Feb 27 2013 11 35PM WFLADT).TiVo
21:18:13,890 INFO [DownloadThread] ToGo - Download rate=4372.78033848837 KBps

Galleon development has been dead for some time (the last official release was back in 2009), so although my code change has been checked into CVS on SourceForge there won’t be a new install you can download. If you need the patch, you can grab my revised jar file here. Rename it to galleon.jar and drop it into the lib directory of your Galleon installation (you might want to make a backup of the original and your configure.xml file first). Restart Galleon and your ToGo downloads should work again.

Hopefully TiVo will fix this soon, but initial indications seem to point to them “fixing” it in TiVo Desktop and not in the TiVo codebase itself, which means workarounds like this one will still be necessary for third-party apps.

3 Comments

  1. If you downloaded my patched jar file yesterday, you may have run into a problem where a) Galleon would report a new version was available (“do you want to download it?”) when starting, b) your configure.xml file was overwritten and c) no changes to settings would be saved, saying the server could not be found.

    This turned out to be because I compiled my code change with the unreleased 2.5.6 codeline which, when substituted into an existing 2.5.5 install (which is what most people are using unless they’ve downloaded the 2.5.6 and compiled it themselves, like me) caused those issues. To fix this, I downloaded the 2.5.5 source tree, re-applied my single line change, and re-compiled. So now if you use the link in the above post (or here) you’ll grab the updated version of the file that should work without causing any other problems.

    Thanks to bricktopp on SourceForge for pointing this out!

  2. I wonder if this is related to my current problem of not being able to push a video using pytivo. The error message in the log indicates it is cookie-related:


    INFO:pyTivo.video.video:[28/Sep/2014 16:34:00] Queued "E:\Data\Tivo\pyTivo\Boardwalk Empire S05E03 HDTV x264-KILLERS[ettv]\Boardwalk.Empire.S05E03.HDTV.x264-KILLERS.mp4" for Push to PremTivoDen
    INFO:pyTivo:127.0.0.1 [28/Sep/2014 16:34:00] "POST /TiVoConnect HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [28/Sep/2014 16:34:05] "GET /TiVoConnect?Command=QueryContainer&Container=GarDeb%27s%20Videos/Boardwalk%20Empire%20S05E03%20HDTV%20x264-KILLERS%5Bettv%5D&Format=text/html HTTP/1.1" 200 -
    INFO:pyTivo:127.0.0.1 [28/Sep/2014 16:34:05] "GET /main.css HTTP/1.1" 200 -
    ERROR:pyTivo.video.video: badCookie 1 Session cannot be authenticated; try login again

Leave a Reply

Your email address will not be published. Required fields are marked *