Options

Bug in the Smug API

jfriendjfriend Registered Users Posts: 8,097 Major grins
edited October 16, 2011 in Bug Reporting
I don't know if this is a bug in the Smugmug API or some sort of data corruption in a gallery. The issue leading to this bug report comes from a Smugmug user using the JFriend HTML5 slideshow.

The API is returning some image URLs for a gallery that do not work. I don't know if they are malformed URLs of if they are just bad objects in the gallery. Here are the details. The gallery is:
http://www.photosbyadamlee.com/Landscapes/Darwin/15626057_3cw28t

The slideshow makes this API request:
/services/api/json/1.3.0/?method=smugmug.images.get&APIKey=m3fjH1x4QjX6N10RsaVUeWr0dgg2oQoZ&AlbumID=9691876&AlbumKey=CAiev&Heavy=true&CustomSize=195x127&Extras=Origin&rnd=1318780258709

Among the data received from the API response is this item:
{
                        "id": 1530319432,
                        "Key": "LPVLk7K",
                        "Album": {
                            "id": 15626057,
                            "Key": "3cw28t",
                            "URL": "http://www.photosbyadamlee.com/Landscapes/Darwin/15626057_3cw28t#1530319432_LPVLk7K"
                        },
                        "Caption": "",
                        "CustomURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/195x127/IMG0720-195x127.jpg",
                        "FileName": "IMG_0720.jpg",
                        "Format": "JPG",
                        "Height": 708,
                        "Keywords": "",
                        "LargeURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/L/IMG0720-L.jpg",
                        "LastUpdated": "2011-10-15 17:05:13",
                        "LightboxURL": "http://www.photosbyadamlee.com/Other/slideshow/9691876_hfzjmK#1530319432_LPVLk7K-A-LB",
                        "MediumURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/M/IMG0720-M.jpg",
                        "OriginalURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/O/IMG0720.jpg",
                        "Position": 37,
                        "Serial": 0,
                        "Size": 107452,
                        "SmallURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/S/IMG0720-S.jpg",
                        "ThumbURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/Th/IMG0720-Th.jpg",
                        "TinyURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/Ti/IMG0720-Ti.jpg",
                        "Type": "Collected",
                        "URL": "http://www.photosbyadamlee.com/Other/slideshow/9691876_hfzjmK#1530319432_LPVLk7K",
                        "Width": 1500,
                        "X2LargeURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/X2/IMG0720-X2.jpg",
                        "XLargeURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/XL/IMG0720-XL.jpg"
                    }

The images URLs in that part of the response all return 404 and do not work.

There are two items before that in the response whose image URLs return 200, but don't return any image data. Note: all three of the images that have issues are "Type": "Collected", though there are other collected images in the gallery that do not have issues in case that's a relevant clue.

So, the net result is that we get an API reponse for a list of images in a gallery and three of the images in the response have URLs that do not work. Two return 200, but no image data. One returns 404. This causes the slideshow to "stall" for a short time while these bad images timeout before it finally advances to the next images.
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • Options
    rnrjoshrnrjosh Registered Users Posts: 266 Major grins
    edited October 16, 2011
    Hi John,

    I've passed along your findings to our bug team, and we'll investigate more into the issue. I'm seeing the same issue you're reporting as well in the slideshow. We appreciate the detailed report!
    Josh
    SmugMug Support Hero
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 16, 2011
    G'day John,

    I couldn't reproduce the issue that lead to the collected image not being deleted from the album, but I've added extra logic in the API to handle this case....which is live.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited October 16, 2011
    devbobo wrote: »
    G'day John,

    I couldn't reproduce the issue that lead to the collected image not being deleted from the album, but I've added extra logic in the API to handle this case....which is live.

    Cheers,

    David
    The 404 appears to be gone (thanks for that quick fix), but there are still two images being returned in the API that when they are requested, they return 200, but no image data. Those images are:
    http://www.photosbyadamlee.com/Landscapes/Darwin/i-GJdRX7S/0/1284x999/IMG0631HDR-1284x999.jpg
    http://www.photosbyadamlee.com/Landscapes/Darwin/i-mGg8gG5/0/1284x999/IMG0237HDR-1284x999.jpg
    
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 16, 2011
    John,

    That appears to be more of an image serving issue rather than an API issue. I'll do a bit of digging to see what I can turn up but it might not be as easy as resolving the other issue.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.