[BUG] CCurlFile::Stat - Failed
#1
for a couple of weeks now, FilmAffinity metadata addon's users have experienced issues to display movie posters on Kodi from FilmAffinity website. although the scraper seems to work fine (images' urls are located and retrieved perfectly), there seems to be a problem with Kodi displaying it. a quick look to the log file explains what's happening:
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
23:06:11.702 T:7996   DEBUG: CTextureCacheJob::GetImageHash - unable to stat url https://pics.filmaffinity.com/unknown-930984351-large.jpg
it seems like Kodi is trying to stat the remote file, but it can't, therefore it's not able to cache the image texture and ultimately it's not able to display the image.

this is a Kodi problem, isn't it? wouldn't it be a way to cache the texture even if the stat step fails? like a fallback mode or so.

could it be that the image content is being served by https? looking to a command line's curl response it looks like even if the image is called through http it is still being served through https

tested on Windows 10 64 bit, Kodi v17.6, FilmAffinity addon v1.7.6
Reply
#2
A couple of things...

- If you are already so sure your problem is a bug in Kodi, please report it with full information at trac.kodi.tv .
- A quoted 'code' of only 2 lines of is not considered a log file at all. Either submit the FULL, unedited/unredacted and debug enabled kodi.log file via pastebin.com or similar text upload website, or try your luck at a different forum.

(2017-11-25, 15:17)pancheto Wrote: this is a Kodi problem, isn't it?
If an external webserver is responding with error codes, how is this a problem by Kodi?
Reply
#3
Quote:CURLE_HTTP_RETURNED_ERROR (22)
This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400.
Nothing else can be said without a full debug log as Klojum already requested.
Maybe site api changed and the scraper needs an update, maybe their server is experiencing issues.
Ask "FilmAffinity metadata addon" author.
Reply
#4
there's one other post on this forum, back in 2015, related to this issue (https://forum.kodi.tv/showthread.php?tid...pid1941329), which pointed out that the problem could be inside Kodi's code at that time (https://github.com/xbmc/xbmc/blob/Helix/...b.cpp#L198), although I understand from one of the user Montellese's answers that it was going to be already addressed on Helix. yes, I did some research before posting this issue here, so sorry if I didn't explain the issue as a whole.
 
(2017-11-25, 16:14)Klojum Wrote: - If you are already so sure your problem is a bug in Kodi, please report it with full information at trac.kodi.tv
I've been using XBMC/Kodi for several years and never had the need to report what it seems to me an internal issue, so please forgive the lack of experience. in fact, if I posted this issue on this forum is not because I'm sure it's a Kodi issue, but because I just presume it is, therefore I need some advice to be sure. after all the debugging efforts I've already done without success, any help would be very much appreciated.
 
(2017-11-25, 16:14)Klojum Wrote: - A quoted 'code' of only 2 lines of is not considered a log file at all. Either submit the FULL, unedited/unredacted and debug enabled kodi.log file via pastebin.com or similar text upload website, or try your luck at a different forum.
those 2 lines of the log file are the only erroneus ones on the entire log file. I was just trying to be succint and to save time to anyone that wanted to help by focusing just on them. I've just uploaded the whole log file here in pastebin as requested.
 
(2017-11-25, 22:33)asavah Wrote: Maybe site api changed and the scraper needs an update, maybe their server is experiencing issues.
Ask "FilmAffinity metadata addon" author.
in fact, I'm one of the addon's authors, doing his best to understand why it works flawlessly on an Android TV 32bit / Kodi v17.1 / addon latest v1.7.6, but when it comes to Windows 10 64bit / Kodi both v17.5 and v17.6 / addon latest v1.7.6 it fails to display this posters. the posters are being located and retrieved, the poster urls are being perfectly stored in Kodi's internal db, but the posters are not being displayed depending on which machine and Kodi version I'm running the addon on.

although I can't be completely sure about it, these are all the reasons why I think there must be something wrong in Kodi's image handling code. maybe only in Windows, maybe only in Windows 10, maybe only in Windows 10 64bit,... I don't have the expertise nor the testing capabilities to describe the problem deeper, so I really hope someone may be able to tell me why the CCurlFile::Stat function could be failing, and how it could be solved. if I have to post this in the Kodi issue tracking system then let me know, but before doing so I'd like to have some expert opinion. thank you for it in advance.
Reply
#5
@pancheto

Not my forte, but your mention of ccurl and scrapers leads me to believe this might be a related thread... https://forum.kodi.tv/showthread.php?tid=324043
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#6
@Karellen

thank you for your answer. the thread you pointed me to was very promising indeed. I did try different versions of libcurl.dll (the one in Krypton 32bit for Windows is v7.48, and the latest one I tried was v7.56.1 from https://skanthak.homepage.t-online.de/do...7.56.1.cab), but unfortunately the error persisted.

I'm too convinced that the problem is something related to how Kodi is accesing an encrypted image. let me know if there is anything else I can do on my side to debug this issue. should I try Kodi v18alpha? 32 o 64 bits? any other suggestion?
Reply
#7
This isn't related to any curl issue and doesn't happen because the image is served via https.

https://pics.filmaffinity.com/unknown-93...-large.jpg is just blocked for the default Kodi user agent.
Reply
#8
Eek oh my! you mean on the server side? so if the website of origin is blocking Kodi's default user agent there's nothing we can do from the Kodi side? although I understand that Kodi team would ultimately look for protecting Kodi's code, wouldn't it be easy to change that agent as a fallback just in case that's the reason why an image is not being accesible? so the only alternative left is to retrieve posters from other source?
Reply
#9
The provider probably has a reason to block it so we shouldn't bypass that
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#10
nice "meeting" you @Martijn. what a great effort all of you are doing. thank you for it.

now that I know the reason why the addon was failing to display posters, I will proceed with the addon update by finding some other source for posters. thank you all for your advice.
Reply

Logout Mark Read Team Forum Stats Members Help
[BUG] CCurlFile::Stat - Failed0