MediaTracker icon indicating copy to clipboard operation
MediaTracker copied to clipboard

MediaItem is locked / Failed to update 1 item

Open zero-thermo opened this issue 2 years ago • 6 comments

I see the following errors in logs:

error: Error: MediaItem 1017 is locked
error: Failed to update 1 item

I also cannot access MediaItem 1017 via the Web UI so am also unable to delete/re-add the TV show. When I click on it, MediaTracker shows "loading" then eventually just a blank screen with grey background.

How do I troubleshoot this issue?

zero-thermo avatar Nov 23 '22 02:11 zero-thermo

Do you remember of version were you using?

In the latest version, it should unlock itself, after a day.

MediaItem is locked for the duration of an update, to prevent creation of duplicate episodes.

bonukai avatar Dec 20 '22 13:12 bonukai

How can I check versions? I don't see any via the MediaTracker web UI front-end, but think it is v.0.0.8. docker-compose is pulling from bonukai/mediatracker:latest

Stopping/starting the container seems to have helped. Instead of the above errors, I now see the following error for 3 different items (all TV shows):

error: TypeError: Cannot read properties of undefined (reading 'map')

What's causing it, and what should I try to fix?

zero-thermo avatar Dec 20 '22 19:12 zero-thermo

If the locked items persist, as they did for me, clearing the locks manually helped.

(Beware, I am a stranger from the internet and not associated with this project.)

Only (!) continue if you have a backup of your data.db and if no services are actively accessing the database (not even MediaTracker, turn it off before):

# sqlite3 data.db
sqlite> UPDATE mediaItem SET lockedAt = NULL where lockedAt is not null;

This clears the timestamp for when the items were locked, which is also used as marker if an item is locked.


Also, you might want to follow #453 for the TypeError thing.

Wyrrrd avatar Dec 26 '22 22:12 Wyrrrd

Failed to update issue has been fixed in mediatracker:unstable version. unstable tag also has fixes for locked items, and the are automatically unlocked after 24 hours.

bonukai avatar Dec 28 '22 13:12 bonukai

If I upgrade to unstable to fix, can I then downgrade back down to the latest stable version? If not, when you do think these fixes will roll out to latest? It would be great to resolve this bug, but I also want to retain a stable build.

Thank you for all the hard work in maintaining this useful app.

zero-thermo avatar Jan 10 '23 00:01 zero-thermo

I would suggest updating to unstable, then wait for the next latest release (make sure to turn off auto-updates, such as Watchtower, if enabled). You can use Diun to notify you about new releases, for example.

filcuk avatar Jan 14 '23 16:01 filcuk