Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I/O error when activating re-caching option #114

Open
steyrs opened this issue Dec 30, 2024 · 15 comments
Open

I/O error when activating re-caching option #114

steyrs opened this issue Dec 30, 2024 · 15 comments

Comments

@steyrs
Copy link

steyrs commented Dec 30, 2024

Running latest version of the Kodi add-on DR TV.
When I enable re-caching in settings - I get this error (se screen dump)

IMG_20241230_103133

Running Kodi on a Vero 4K+
If log files are needed - give me a holler

@TermeHansen
Copy link
Member

Weird, I guess it is on osmc then, which I also use but on a raspberry pi. I will make a debug build for you, so we can learn why this happens for you.

@steyrs
Copy link
Author

steyrs commented Dec 30, 2024

Correct Vero 4K+ is running OSMC with Kodi on top.
Sounds cool with a debug build!

@TermeHansen
Copy link
Member

could you try this zip, and just share the last lines up to the error (remember to enable debug to log in settings):
https://github.com/xbmc-danish-addons/plugin.video.drnu/archive/refs/heads/IOexception.zip

in the log output your error should happen when writing an info line starting with "IO exception"

@steyrs
Copy link
Author

steyrs commented Dec 31, 2024

Thank you for this.
I will try it, and see if I can trigger an error.
It doesn't happen every time unfortunately.

Will get back to you when I have something for you to decipher

@steyrs
Copy link
Author

steyrs commented Dec 31, 2024

Provided zip installed.
Opened the add-on - and triggered the error immediately.
Unfortunately this was without debugging enabled.

Enabled debug logging - and tried the add-on again.
This time it would of course not trigger the error.

Nonetheless - I have attached a snippet of the kodi.log file @ the time the error occurred.
Let me know if there is something useful there for you.

I will keep running the debug version - and have also enabled re-caching to see if it has failed tomorrow.

kodi-error-at-2024-12-31 14.42.06.525.log

@steyrs
Copy link
Author

steyrs commented Jan 7, 2025

An update on this issue.
Re-caching is enabled (running default schedule @ 3 o'clock at night)

When checking Kodi in the morning - it sits here:

screenshot00000

When I navigate away (back out from this location) - I get this:

screenshot00001

Opening the add-on - and choosing "Programmer A-Å" - then e.g. D - it takes ages to load the next page - so it seems that caching failed.
How do I validate if cache has been updated or not?

I forgot to enable debugging - but will leave it on tonight - and check on results tomorrow morning.

@TermeHansen
Copy link
Member

There are two issues here.

  1. Crash of api because of bad response from dr.dk.

I'm not sure why dr.dk sometimes fails, but I can reproduce somewhat here, and will see if I can make a retry that works ok for the most part.

  1. Caching seems not to work so well anymore...
    I have found the cornerstone of this, which is back to an issue I saw that sometimes dr would give back an empty "Description" field for some items when returned in a long list of items, asking for the specific item gives back it all... This seems to be even more common now, which is why the caching of an item for many items is not so useful when building the actual list in kodi :(. I have a local fix for this now that I will put up tonight for you to test as well.

@steyrs
Copy link
Author

steyrs commented Jan 7, 2025

Thx @TermeHansen for elaborating on the two issues.

I am looking forward to testing your local fix when it's ready :)

@TermeHansen
Copy link
Member

OK now I have pushed an update to

https://github.com/xbmc-danish-addons/plugin.video.drnu/archive/refs/heads/IOexception.zip

you can force a rerun of caching of all items like the cron job, from settings by pushing the "recache all".
in this version I write to log output every time we query an item from dr that is not already cached locally.

with this update I have also added a retry of 3 times before it will crash if dr does not respond correctly.

@steyrs
Copy link
Author

steyrs commented Jan 7, 2025

Thank you for that.

Steps:

  • New zip installed
  • Debug log enabled
  • Restarted Vero to get a clean log
  • Manually running "recache all" from the add-on

Kodi.log attached - along with a screenshot.

screenshot00003
kodi.log

@TermeHansen
Copy link
Member

so no crash for now?

@steyrs
Copy link
Author

steyrs commented Jan 7, 2025

No crash for now.
Lets see if it keeps behaving nicely over the next few days with cron job enabled.

@steyrs
Copy link
Author

steyrs commented Jan 8, 2025

Check this morning - Kodi sits here:

screenshot00000

Backing out - results in DR Addon failed - check the log - repeated several times - before I successfully manage to exit from that screen.
When I open Add-on again - DR Addon has disappeared.

Log attached
kodi.log

@TermeHansen
Copy link
Member

TermeHansen commented Jan 8, 2025

Not sure what you mean by "DR Addon has disappeared" ?

As far as I can see the cron "re-cache" job finished successfully last night. Because you had run a full re-cache job the the evening before and you probably have left the expire time at 24 hours, the job didn't update anything in the cache database. I have set the re-cache job to go to home screen when called from the cron job, so not sure why you didn't see it there this morning - I don't see anything in the log about this.

In the morning the addon crashed in getting a new token from dr. I actually had an incident some hours ago where the login didn't work (see my new issue #115), but somehow dr reverted back to the old and the login flow worked again some hours later.

Does the addon work now for you now (are you logged in) ?

Can you make a test where you go to the cron addon (it is in the program addons) and set the cron value to something a few minutes in front of you and see what it does?

I just did it here (changed for "25 21 * * *", so it ran at 21:25), all good and ended at home screen when it finished.

@steyrs
Copy link
Author

steyrs commented Jan 9, 2025

Disappeared = Could not find the add-on afterwards - and it seems like it got uninstalled (never seen that before).

Anyways - I made a fresh install (not preserving settings) - so lets have another go.

This morning Kodi is again sitting @ the "Videoer" screen (as shown in the reply above)
When I back out - I get the overlay (video.drnu) - where it quickly iterates the letters from "A-Å - dr-ramasjang and whatnot) before it exits.

Returning to the add-on - it seems like cache is updated as I can browse "Programmer - A-Å" without waiting for ages.

Tonight I will try your suggestion with setting the cron job - just a few minutes ahead and observe what's going on.
(I'm running a tail -f kodi.log on another computer out of curiosity)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants