Unable to set date of file - Intermittent Problem!

Version: 2.0.0.5344
Mono Version: 5.18.0.240
OS: Ubuntu 19.04
Debug logs: https://drive.google.com/file/d/1JsH0oAl3H9qfe74HoktLnZZ300jN1NFS/view?usp=sharing
Description of issue: Getting intermittent errors about “Unable to set date of file” and the date is not being updated correctly. This does not happen in all cases, and only happens in certain situations. So some episodes will be moved and the date will be set to the air date, but other episodes will be moved and the date does not get set correctly.

I’ve set the permissions on the destination directory to 777, and set sabnzbd to set permissions as 777 on any new files being downloaded, to prevent any kind of permission issue from being at play here.

Bumping this hopefully for some support. Anyone got any ideas?

Is there anything consistent between when it works and when it doesn’t?

System.IO.IOException: Invalid parameter

It’s not clear what leads to this, but in all cases mono is used and complains for some unknown reason.

Unfortunately, nothing that I can find that stands out. Yeah, that Invalid parameter error is painful since it doesn’t really state which param.

I saw a thread from back in 2015 that there was a known issue with mono, but the strange this is that this was working fine for a long time for me and only has recently started becoming an issue. Any idea if the post-processing scripts referenced back then ever came to fruition?

They’ve existed for a long time now, Custom Scripts in Connections.

Thanks, sorry I should have been more clear. I was talking about a post-processing script that would set the airdate correctly. I started writing a bash script to do that with the Custom Scripts feature, and noticed I was getting some errors when trying to touch the file. It was because I was running sabnzbd as a different user than sonarr, which was causing permission issues. I just updated them to run under the same user account, and it appears that the date change issue has been resolved. I also looked closer at why this appeared to be intermittent. It turned out that was related to a sabnzbd post processing script I was using to transcode audio in certain situations. For those situations, the timestamp would be overwritten with the current date/time, versus if the file was just extracted and moved, it would keep the original timestamp from pre-compression (usually closer to the date it was aired, that it was un-noticeable).

Thanks for your help!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.