Error after update to ver2.5.2.2

Hi, currently I am using Invoice Ninja ver2.5.0.4, and I would like to update to ver2.5.2.2, but my dashboard will show error after I update, this is the error message:

Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php:1336 Stack trace: #0 /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php(1336): ReflectionClass->__construct('log') #1 /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php(1290): Illuminate\Container\Container->build('log', Array) #2 /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php(1848): Illuminate\Container\Container->make('log', Array) #3 /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php(1391): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...') #4 /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php(1368): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5 /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php(1354): Illuminate\Container\Container->getDependencies(Array, Array) #6 /h in /homepages/21/d600835848/htdocs/InvoiceNinja/bootstrap/cache/compiled.php on line 1336

May I know what’s going wrong, I tried to do several times also same… Hopefully can get some expect at here to tell me what’s going wrong on the setting or any other part.

Thank you in advance! :slight_smile:

The problem is most likely caused by a blank space in the .env file

You’d need to change

KEY=some value


KEY=‘some value’

Is it just change all with “KEY”? i tried d, but same, if i replace back with old files (backup files), it can work, only cant work if i update to ver2.5.2.2 with copy and paste the new files to current folder. This is the only way to update the version, right?

Thank you.

You need to search the entire file for spaces.

Hi I would like to check, for update, is it I have to download the zip files and copy the entire unzipped files to my hosting server (replace and update), or actually I just have to copy code (i don know what is the code it means on Invoice Ninja website) or some folders only?

In the past, I always update the app by copy the files and replace, not sure is it correct or not? Thank you. :slight_smile:

You need to copy over all of the files, it’s faster to copy it to the server as a zip and then extract it on the server itself.