Forum Discussion

wpinkman's avatar
wpinkman
Visitor
11 years ago

roPosterScreen / roSlideshow can't load Instagram images

My channel, Rokagram, started having trouble yesterday. I think I've debugged it down to the fact that the URL's returned from the Instagram API for images are now all HTTPS, but it's not just that. The CDN they are hosted on seems to cause problems for components like roPosterScreen and roSlideShow even if I call SetCertificatesFile and InitClientCertificates on them. The same image URL in question loads fine in a browser. I even tried an experiment of using roUrlTransfer to download the image into "tmp://" and then using the temp file as the posterUrl and that worked! Here's some sample code that demonstrates the problem.

Running the code shows a poster screen with one item, but the cover image never loads. I have a photo.. but I can't figure out how to attach it to a forum post. Trust me.. it doesn't work.


Sub Main()

port = CreateObject("roMessagePort")
screen = CreateObject("roPosterScreen")

screen.SetMessagePort(port)
screen.SetCertificatesFile("common:/certs/ca-bundle.crt")
screen.InitClientCertificates()
screen.SetListStyle("arced-square")

posterUrl = "https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s150x150/e15/11049316_1583549288528575_1352209504_n.jpg"
meta = {}
meta.HdPosterUrl = posterUrl
meta.SdPosterUrl = posterUrl

contentList = []
contentList.Push(meta)

screen.SetContentList(contentList)
screen.Show()

wait(0, port)

End Sub

15 Replies

Replies have been turned off for this discussion
  • Thanks Veeta. Adding the the puzzle is the fact that roPosterScreen does work for some HTTPS images. In my case some of the Instagram photos are hosted on a Akami CDN and those work fine (generally the user profile pics). It looks like the main photo content moved to a different CDN technology and they are the ones having the problem. Maybe a more complicated SSL handshake on one CDN vs. the other?
  • It looks like an HTTPS request using roPosterScreen, roSlideshow, etc. is only negotiated by the Roku to use TLS 1.0, whereas an HTTP request using roUrlTransfer negotiates the use of TLS 1.2. Due to security vulnerabilities discovered in older TLS versions, it's possible that some servers are refusing to allow connections that use the older versions, which might explain why one CDN (Akamai) works and the other one (Instagram) does not.

    It would be helpful if someone from Roku could look into this and verify whether roPosterScreen, etc. erroneously only supports TLS 1.0.
  • Yes.. thanks. I patched up my channel with a hack to convert the URL's from HTTPS to HTTP, but who knows how long that will work.

    Add roImageCanvas to the list of components that has the same bug.
  • Hi guys, I am also linking to my Instagram photos and recently found they wouldn't display in the slideshow anymore.
    Great to see others are working through this issue. This is a nasty bug, crippling even.
    Thanks for your valuable inputs 🙂
    AC