Bug CTextureCacheJob::GetImageHash - unable to stat url ... - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Bug CTextureCacheJob::GetImageHash - unable to stat url ... (/showthread.php?tid=219802) |
CTextureCacheJob::GetImageHash - unable to stat url ... - bromix - 2015-02-27 Hi, today I noticed that my SoundCloud addon wasn't showing any thumbnails and I was investigating. First I thought I use a false url for the thumb, but all URLs work in the browser. For example this one: https://i1.sndcdn.com/artworks-000071683213-nayj6f-t300x300.jpg After debug-logging I found this: Code: 18:30:01 T:2344 DEBUG: CTextureCacheJob::GetImageHash - unable to stat url https://i1.sndcdn.com/artworks-000071683213-nayj6f-t300x300.jpg I changed the thumbnails to a fix random image on the net and it worked. So it hasn't to do with the addon or the url. It seems that the routine behind this has trouble with Chunked Transfer from a server...because images with closed-transfer work. https://github.com/xbmc/xbmc/blob/Helix/xbmc/TextureCacheJob.cpp#L198 Result from the server for the image. Code: HTTP/1.1 200 OK Can somebody confirm this? For now all thumbnails are missing in this addon. Chunked-Transfer is a common use to speed up data transfer (especially binary) so the caller hasn't to wait for calculated length from the server. Maybe there is a way to overcome this in some way? Can I do something on my side? RE: CTextureCacheJob::GetImageHash - unable to stat url ... - Montellese - 2015-02-28 The problem is that Kodi sends a HTTP HEAD request but and the server answers with a HTTP response without body (which is to be expected) but the response doesn't contain neither the "Content-Length" nor the "Last-Modified" header. The call to CFile::Stat() (which actually calls CCurlFile::Stat()) actually works but then the logic tries to retrieve either the creation/last modified time or the size. Therefore the check at https://github.com/xbmc/xbmc/blob/Helix/xbmc/TextureCacheJob.cpp#L203 fails and it falls through to the error. I'm not sure why the hash relies on the content-length and/or last modified time but I'm guessing it's a good indicator for whether a resource has changed i.e. if either of these two properties change, the generated hash will change and therefore the image needs to be re-fetched because it has changed. I guess we could add a fallback in case the CFile::Stat() call worked but neither of the two mentioned properties is set. For these images we won't be able to detect that they have changed but at least we can cache and display them. I'll consult RFC2616 about whether a chunked transfer should return either of the two properties because then it would actually be an issue of the server (but I'm assuming they aren't mandatory). RE: CTextureCacheJob::GetImageHash - unable to stat url ... - bromix - 2015-02-28 (2015-02-28, 00:50)Montellese Wrote: The problem is that Kodi sends a HTTP HEAD request but and the server answers with a HTTP response without body (which is to be expected) but the response doesn't contain neither the "Content-Length" nor the "Last-Modified" header. The call to CFile::Stat() (which actually calls CCurlFile::Stat()) actually works but then the logic tries to retrieve either the creation/last modified time or the size. Therefore the check at https://github.com/xbmc/xbmc/blob/Helix/xbmc/TextureCacheJob.cpp#L203 fails and it falls through to the error. A fallback would be awesome. The other solution would be to download each thumb (via the addon)...but this will slow things down. Is there anything I can do...or least an issue via GitHub I can follow? Because user will ask why the thumbs are missing and it would be nice if I could direct them. RE: CTextureCacheJob::GetImageHash - unable to stat url ... - Montellese - 2015-02-28 See PR6562. Maybe it can also be backported to Helix. RE: CTextureCacheJob::GetImageHash - unable to stat url ... - bromix - 2015-02-28 Thanks man backport to Helix would be nice RE: CTextureCacheJob::GetImageHash - unable to stat url ... - pancheto - 2017-11-09 this same error has recently started to happen with filmaffinity addon (metadata.filmaffinity.com). is there anything we can do from the scraper side, or is this a problem with Kodi handling incorrect/invalid/incomplete image information? if so, how could we suggest an alternative such as the fallback mentioned above? here is an example that isn't being displayed in Kodi: Code: 23:06:11.702 T:7996 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for https://pics.filmaffinity.com/unknown-930984351-large.jpg #s3gt_translate_tooltip_mini { display: none !important; } RE: CTextureCacheJob::GetImageHash - unable to stat url ... - andy-g - 2017-11-13 I'm getting the same issue, for my RedbullTv addon: Code:
Is there anyway to bypass the check, or just check for a cached copy against the url? RE: CTextureCacheJob::GetImageHash - unable to stat url ... - glennguy - 2017-12-04 Having the same problem here too. HEAD returns 404, whereas GET returns 200. Would be great to be able to signal Kodi to go straight for a GET. RE: CTextureCacheJob::GetImageHash - unable to stat url ... - -Dis - 2022-02-16 Sorry for bumping old thread but I just found out this same problem when trying to get artwork quality limit working in discovery+ add-on. Currently only solution I found was to make proxy for images but I don't like that. Code:
|