"Mojo::Reactor::Poll: I/O watcher failed: Can't open file" during cache update
#1
When GiP updates the cache I get the error message:

Mojo::Reactor:Tongueoll: I/O watcher failed: Can't open file "C:\Users\[username]\AppData\Local\Temp\mojo.tmp": Permission denied at Mojo/Asset/Memory.pm line 18.

This occurs twice or more often, but GiP continues, so the error doesn't seem to be fatal.

I have tried deleting the contents of the %temp% folder and have made sure it isn't read-only, but the problem continues. The %temp% folder has full access permissions for SYSTEM, Administrators, and my (admin) user account.

This is livable with, but I'd appreciate help in eliminating this problem in case it causes programmes to be missing from the cache.

Phil Gardner
#2
Try a few tests:

1. Empty your %TEMP% folder, but leave it open in Windows Explorer. Run get_iplayer --refresh at a command prompt. As it runs, watch to see if any "mojo.tmp" files flash in and out of existence. If any do, then it isn't a permissions problem per se, regardless of the error message, so skip to #3. If you don't see any at all, move on to test #2.

2. Create a test folder (e.g., C:\mojo) and make sure it is set for Full Control for Everyone, so there should be no question of writability. Leave that folder open in Windows Explorer. In your command prompt, tell Mojolicious to use the test folder for temporary files by running:
Code:
set MOJO_TMPDIR=C:\mojo
Then run get_iplayer --refresh again. If you see temp files being created and get no error messages, that would point the finger back at your%TEMP% permissions. If you still get errors using the test folder, move on to test #3.

3. Remove the test folder configuration in your command prompt:
Code:
set MOJO_TMPDIR=
Mojolicious will go back to using %TEMP% for temp files. Now run get_iplayer --refresh --index-maxconn=1. If you don't get errors in this scenario, that suggests there may a race condition somewhere, but that is just a guess.
#3
(22-05-2017, 07:17 PM)dinky Wrote: Try a few tests:

1. Empty your %TEMP% folder, but leave it open in Windows Explorer. Run get_iplayer --refresh at a command prompt. As it runs, watch to see if any "mojo.tmp" files flash in and out of existence. If any do, then it isn't a permissions problem per se, regardless of the error message, so skip to #3. If you don't see any at all, move on to test #2.

Thanks very much for your helpful reply. I emptied my %TEMP% folder, but this time I used Unlocker followed by a reboot to delete the files and folders that wouldn't delete normally. After that I ran get_iplayer --refresh without errors. I did see files flashing in and out of existence in the %TEMP% folder, but too quickly to see what they were. So I didn't need to do your tests 2 and 3.

I can't imagine why the existence of some locked files should have caused the problem, so perhaps it was the reboot that fixed it.


Possibly Related Threads...
Thread Author Replies Views Last Post
  PVR can't open cache file + no program found on command interface Yutsa 3 886 29-10-2014, 02:35 PM
Last Post: dinky
  v2.86: "Couldn't open cache file" Surroundedbyforeigners 9 2,274 17-05-2014, 10:45 PM
Last Post: dinky
  Failed to connect to update site stevb 1 1,034 02-08-2013, 10:25 AM
Last Post: dinky