DiamondLightSource/SynchWeb

Fatal error when downloading or viewing autoproc attachments

Closed this issue · 3 comments

I've upserted several auto processing results for a particular dataset. Now when I attempt to view or download any of the attachment files I get this error:

Fatal error: Uncaught Error: Class 'Symfony\Component\Filesystem\Filesystem' not found in /var/www/sites/synchweb/api/src/Page/Download.php:379 Stack trace: #0 /var/www/sites/synchweb/api/src/Page/Download.php(280): SynchWeb\Page\Download->_get_file('56986688', Array) #1 [internal function]: SynchWeb\Page\Download->_get_autoproc_attachments('1037218', '1') #2 /var/www/sites/synchweb/api/vendor/slim/slim/Slim/Route.php(462): call_user_func_array(Array, Array) #3 /var/www/sites/synchweb/api/vendor/slim/slim/Slim/Slim.php(1326): Slim\Route->dispatch() #4 /var/www/sites/synchweb/api/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #5 /var/www/sites/synchweb/api/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #6 /var/www/sites/synchweb/api/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call() #7 /var/www/sites/synchweb/api/vendor/slim/slim/Slim/Slim.php(1271): Slim\Middleware\PrettyExceptions->call() #8 /var/www/sites/synchweb/a in /var/www/sites/synchweb/api/src/Page/Download.php on line 379

Hi Scott,
Looks like your install can't find the symfony component. Check that there is a line "symfony/filesystem": "^2.8" in your package.json file. If the line is not there then you are using an old version. If the line is there, then its possible upgrading did not properly update the dependencies. Try removing your api/package-lock.json file and re installing the api dependencies using composer (see README).

Neil meant to write “composer.json” file rather than “package.json” in his comment as the Symfony Filesystem component is a PHP library. Check it is listed under the “require” key in the “composer.json” file and run “composer install” in the api directory. If you modify the “composer.json” file, run “composer update” to resolve dependencies, update the “composer.lock” file, and install packages. For clean install, delete both “composer.lock” file and “vendor” directory and run “composer install”.

That did the trick. Thank you.