TVMAZESearch Error -> Cannot read property 'medium' of null
Hello,
I just updated to 1.8.3. When I search for a TV show no results show up and the logs say TVMAZESearch Error -> Cannot read property 'medium' of null
Any idea what this could be? Let me know if I need to provide any extra information.
Thanks and great work!
@rigrassm any thoughts? Is this your package or something in PR?
@lokenx Having the same problem in PR. Also the search for Tv Shows is way off, cannot search for instance "Vikings" os "The originals" always gives no results found,
@Cruv tvmaze results send a Medium sized poster and full sized. That error means the particular result doesn't have a Medium size. I'll look into putting a check in for that and to fall back to the original if it's not there.
@HenriqueKunha I'm not able to reproduce the issues with those shows. I'm searching for those exact terms and am getting what I'm assuming should be the correct results.
That said, I have been running the version from my repo that I had submitted as the pull request so I'm guessing something happened when the two were merged. I'm going to start digging into it now and see what's going on.
I think I found the bug and should have a PR submitted soon to fix it in a bit. Tvmaze if pulling the correct results but the way I was enumerating the results was causing it to sometimes skip the first index item thus leaving out the most relevant result(definitely not a good thing lol)
As for the original bug of not finding the medium poster; I'm 99%sure this is not an actual error but rather a byproduct of having the reactive search interface that updates while you type. Essentially, some a new search is performed with each keystroke which occasionally won't have a valid result returned hence not being able to find the poster.
So while that's not an issue itself, the amount of requests being made and the lack of checking for a valid object being returned is and will be addressed.
You guys are quick. Glad it wasn't just me having the issue though since I had tried a fresh install to fix it and the issue was still there. Thanks again @rigrassm & @lokenx
Issues here are resolved in the latest commit. Update to 1.8.5 and you should be good to go.
Thanks @rigrassm, I'll give it a try tonight when I get home.