These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

"Mojo::Reactor::Poll: I/O watcher failed: Can't open file" during cache update

user-1732

When GiP updates the cache I get the error message:

Mojo::Reactor::Poll: 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

user-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.

user-1732

(22-05-2017, 07:17 PM)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.

These forums are archived

See this post for further info