[OJS-3.5.0.5] Argument #1 ($stream) must be of type resource, false given

Describe the issue or problem

After upgrading to OJS-3.5.0.5, an error notification “An unexpected error has occurred. Please reload the page and try again.” is shown when viewing articles in following production stages:

  • copyediting
  • production

The error is shown when loading the detail page for such articles.

Articles in submission or review don’t throw this error.

When checking the logs, following error is logged:

[Wed Jul 08 14:18:04.762836 2026] [php:warn] [pid 11:tid 11] [client 172.20.0.22:55806] PHP Warning:  fopen(/var/www/html/cache/opcache/1f/c3/1fc3c933801590c2aec8331b065c7b6fc15e40d6): Failed to open stream: No such file or directory in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php on line 68, referer: https://my.journal.org/index.php/journal/dashboard/editorial?currentViewId=assigned-to-me&workflowSubmissionId=300
[Wed Jul 08 14:18:04.762886 2026] [php:error] [pid 11:tid 11] [client 172.20.0.22:55806] PHP Fatal error:  Uncaught TypeError: flock(): Argument #1 ($stream) must be of type resource, false given in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php:152\nStack trace:\n#0 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php(152): flock()\n#1 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(119): Illuminate\\Filesystem\\LockableFile->getExclusiveLock()\n#2 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(479): Illuminate\\Cache\\FileStore->add()\n#3 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(558): Illuminate\\Cache\\Repository->add()\n#4 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(363): Illuminate\\Cache\\CacheManager->__call()\n#5 /var/www/html/lib/pkp/classes/core/ScheduleServiceProvider.php(116): Illuminate\\Support\\Facades\\Facade::__callStatic()\n#6 /var/www/html/lib/pkp/classes/core/ScheduleServiceProvider.php(65): PKP\\core\\ScheduleServiceProvider->runWebBasedScheduleTaskRunnerOnShutdown()\n#7 [internal function]: PKP\\core\\ScheduleServiceProvider->{closure:PKP\\core\\ScheduleServiceProvider::boot():59}()\n#8 {main}\n  thrown in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php on line 152, referer: https://my.journal.org/index.php/journal/dashboard/editorial?currentViewId=assigned-to-me&workflowSubmissionId=300

Steps I took leading up to the issue
For example:

  1. Upgrade to OJS-3.5.0.5
  2. Go to the article dashboard
  3. Click “View” for an article in “copyediting” or “production” stages
  4. When the article detail page loads, following error is shown: “An unexpected error has occurred. Please reload the page and try again.”

What application are you using?
OJS 3.5.0-5

When checking for such a logged path in the /var/www/html/cache/opcache/ folder, I notice that they indeed don’t exist.

Could it be a caching issue? I tried following additional steps:

  • delete data caches
  • delete template caches

…but to no avail: the error remains

Ah, further follow-up: next steps seemed to solve the issue:

  • delete data caches
  • delete template caches
  • restart the docker container

Afterwards, the article pages just load without error. So, hopefully solved, apologies for the noise!

Ron