Invoice Ninja not installing

Bug Report Template

Description

Please provide a clear and concise description of the bug you encountered.

Created a subdomain and tried installing invoice ninja using the Web Apps menu

Steps to Reproduce

Please provide detailed steps to reproduce the bug. Include any necessary code snippets, commands, or configuration files.

  • Step 1

Log in as admin

  • Step 2

Log in at the site as a nexus user, Click Web Apps, Select the site, and click invoice ninja

  • Step 3

Select Application for Invoice Ninja, Empty folder, 5.10.24 for the version
entered email address
Enable SSL, Enable Auto Updates, No Http
major 8.x

Expected Behavior

Expect a welcome or completion email

Actual Behavior

received teh following error:

ERROR: Lararia\Jobs\Job::handle(): Job failed - fatal error: Target file /var/www//app/Constants.php does not exist

i tried looking in the logs but nothing clearly defined

Error_Reporter::report("array (  0 =>   array (    'message' => 'autogenerated password g3sdatU6y7kHoXvt\'',    'severity' => 4,    'caller' => 'Invoiceninja_Module::parseInstallOptions',    'bt' => '         0. Error_Reporter::add_info("autogenerated password %s'", ["g3sdatU6y7kHoXvt"])            [/usr/local/apnscp/lib/log_wrapper.php:108]         1. info("autogenerated password `%s'", "g3sdatU6y7kHoXvt")            [/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Invoiceninja/module.php:207]         2. Invoiceninja_Module->parseInstallOptions([user:"hhfadmin", git:"0", http10:"0", ssl:"1", autoupdate:"1", verlock:"major", fortify:"write", searchtext:"invoiceninja", empty:"1", version:"5.10.19", ])            [/usr/local/apnscp/lib/Module/Support/Webapps/App/Type/Laravel/module.php:73]

Environment

ApisCP version: cpcmd misc:cp-version

revision: dd6024bcb1aa8eafed84173f3f25c00cce226c86
timestamp: 1722360217
ver_maj: 3
ver_min: 2
ver_patch: 44
ver_pre: ‘’
dirty: false
debug: false

update policy is major

Operating System: uname -r

Rocky Linux release 8.10 (Green Obsidian)

4.18.0-553.8.1.el8_10.x86_64

Additional relevant information (e.g., PHP version, database, etc.):

MySQL Version (MariaDB)

10.11.9 (10.11.9)

PostgreSQL Version

14.13

Perl Version

5.26.3

PHP Version

8.1.29

Additional Information

Provide any additional information about the bug, such as error messages, logs, screenshots, or any other relevant details.

Latest Invoice Ninja requires 8.2 minimum. Change pool versions via Web > PHP Pools or add 8.2+ to your server.

Alternatively, PHP may be changed server-wide with cpcmd scope:set php.version 8.2.

i’ve made the change for php and still having no luck here


         7. Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:130]
         8. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:105]
         9. Illuminate\Pipeline\Pipeline->then()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php:98]
        10. Illuminate\Bus\Dispatcher->dispatchNow(Lararia\Jobs\InstallAppJob, false)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:83]
        11. Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:130]
        12. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:105]
        13. Illuminate\Pipeline\Pipeline->then()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:85]
        14. Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Illuminate\Queue\Jobs\RedisJob, Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:59]
        15. Illuminate\Queue\CallQueuedHandler->call(Illuminate\Queue\Jobs\RedisJob, [commandName:"Lararia\Jobs\InstallAppJob", command:"O:26:"Lararia\Jobs\InstallAppJob":21:{s:12:"*logBuffer";N;s:20:"*creationLogBuffer";a:0:{}s:9:"*return";N;s:8:"*email";s:25:"myemailaddress@gmail.com";s:8:"*jobId";N;s:7:"*tags";a:0:{}s:25:"Lararia\Jobs\Jobfilters";a:0:{}s:10:"connection";N;s:5:"queue";s:7:"default";s:15:"chainConnection";N;s:10:"chainQueue";N;s:5:"delay";N;s:10:"middleware";a:0:{}s:7:"chained";a:0:{}s:6:"*job";N;s:5:"tries";i:1;s:7:"timeout";i:1800;s:11:"*instance";O:52:"Module\Support\Webapps\App\Type\Invoiceninja\Handler":12:{s:11:"*hostname";s:24:"fin.domaingoeshere.org";s:10:"*docroot";s:33:"/var/www/fin.domainname.org";s:7:"*path";s:0:"";s:10:"*approot";s:8:"/var/www";s:10:"*options";O:42:"Module\Support\Webapps\MetaManager\Options":1:{s:7:"options";s:273:"a:10:{s:4:"user";s:8:"hhfadmin";s:3:"git";s:1:"0";s:6:"http10";s:1:"0";s:3:"ssl";s:1:"1";s:10:"autoupdate";s:1:"1";s:7:"verlock";s:5:"major";s:10:"searchtext";s:12:"invoiceninja";s:5:"empty";s:1:"1";s:7:"version";s:7:"5.10.24";s:5:"email";s:25:"myemailaddress@gmail.com";}";}s:7:"*meta";O:39:"Module\Support\Webapps\MetaManager\Meta":4:{s:10:"*docroot";s:33:"/var/www/fin.domainname.org";s:7:"*meta";a:5:{s:7:"options";R:24;s:8:"hostname";s:24:"fin.domainname.org";s:4:"path";s:0:"";s:7:"version";s:0:"";s:4:"type";s:12:"invoiceninja";}s:10:"*options";R:24;s:10:"*manager";O:34:"Module\Support\Webapps\MetaManager":3:{s:5:"dirty";b:0;s:10:"*aliases";a:1:{s:33:"/var/www/fin.domainname.org";s:33:"/var/www/fin.domainname.org";}s:47:"Module\Support\Webapps\MetaManagerauthContext";O:14:"Auth_Info_User":13:{s:8:"username";s:8:"hhfadmin";s:6:"domain";s:20:"domainname.org";s:7:"*site";s:5:"site5";s:5:"level";i:2;s:7:"site_id";i:5;s:8:"group_id";i:1004;s:7:"user_id";i:9996;s:2:"id";s:32:"8iiOWbu0RSYCjJGqmi1ynZ6aHyfD8cp3";s:6:"rgroup";N;s:9:"hotworker";i:3798;s:8:"language";s:1:"C";s:8:"timezone";N;s:24:"Auth_Info_Uservolatile";b:0;}}}s:10:"*mapping";N;s:11:"*manifest";O:46:"Module\Support\Webapps\App\Type\Adhoc\Manifest":6:{s:7:"*meta";a:0:{}s:6:"*app";r:19;s:54:"Module\Support\Webapps\App\Type\Adhoc\Manifestsigned";b:0;s:28:"*apnscpFunctionInterceptor";O:25:"apnscpFunctionInterceptor":4:{s:37:"apnscpFunctionInterceptorsession_id";s:32:"8iiOWbu0RSYCjJGqmi1ynZ6aHyfD8cp3";s:43:"apnscpFunctionInterceptorpermission_level";i:2;s:31:"apnscpFunctionInterceptorauth";r:37;s:40:"apnscpFunctionInterceptorwebHookBuffer";N;}s:59:"Module\Support\Webapps\App\Type\Adhoc\ManifestauthContext";r:37;s:7:"*site";s:5:"site5";}s:7:"*pane";N;s:28:"*apnscpFunctionInterceptor";r:56;s:60:"Module\Support\Webapps\App\Type\Unknown\HandlerauthContext";r:37;s:5:"depth";i:1;}s:12:"*installer";O:36:"Module\Support\Webapps\App\Installer":13:{s:11:"*hostname";s:24:"fin.domainname.org";s:10:"*docroot";s:33:"/var/www/fin.domainname.org";s:7:"*path";s:0:"";s:10:"*approot";s:33:"/var/www/fin.domainname.org";s:10:"*options";O:42:"Module\Support\Webapps\MetaManager\Options":1:{s:7:"options";s:273:"a:10:{s:4:"user";s:8:"hhfadmin";s:3:"git";s:1:"0";s:6:"http10";s:1:"0";s:3:"ssl";s:1:"1";s:10:"autoupdate";s:1:"1";s:7:"verlock";s:5:"major";s:10:"searchtext";s:12:"invoiceninja";s:5:"empty";s:1:"1";s:7:"version";s:7:"5.10.24";s:5:"email";s:25:"myemailaddress@gmail.com";}";}s:7:"*meta";O:39:"Module\Support\Webapps\MetaManager\Meta":4:{s:10:"*docroot";s:33:"/var/www/fin.domainname.org";s:7:"*meta";a:5:{s:7:"options";O:42:"Module\Support\Webapps\MetaManager\Options":1:{s:7:"options";s:273:"a:10:{s:4:"user";s:8:"hhfadmin";s:3:"git";s:1:"0";s:6:"http10";s:1:"0";s:3:"ssl";s:1:"1";s:10:"autoupdate";s:1:"1";s:7:"verlock";s:5:"major";s:10:"searchtext";s:12:"invoiceninja";s:5:"empty";s:1:"1";s:7:"version";s:7:"5.10.24";s:5:"email";s:25:"myemailaddress@gmail.com";}";}s:8:"hostname";s:24:"fin.domainname.org";s:4:"path";s:0:"";s:7:"version";N;s:4:"type";N;}s:10:"*options";R:77;s:10:"*manager";O:34:"Module\Support\Webapps\MetaManager":3:{s:5:"dirty";b:0;s:10:"*aliases";a:1:{s:33:"/var/www/fin.domainname.org";s:33:"/var/www/fin.domainname.org";}s:47:"Module\Support\Webapps\MetaManagerauthContext";r:37;}}s:10:"*mapping";N;s:11:"*manifest";O:46:"Module\Support\Webapps\App\Type\Adhoc\Manifest":6:{s:7:"*meta";a:0:{}s:6:"*app";r:67;s:54:"Module\Support\Webapps\App\Type\Adhoc\Manifestsigned";b:0;s:28:"*apnscpFunctionInterceptor";r:56;s:59:"Module\Support\Webapps\App\Type\Adhoc\ManifestauthContext";r:37;s:7:"*site";s:5:"site5";}s:7:"*pane";O:42:"Module\Support\Webapps\App\UIPanel\Element":9:{s:11:"*hostname";s:24:"fin.domainname.org";s:7:"*path";s:0:"";s:7:"*meta";O:39:"Module\Support\Webapps\MetaManager\Meta":4:{s:10:"*docroot";s:33:"/var/www/fin.domainname.org";s:7:"*meta";R:28;s:10:"*options";R:24;s:10:"*manager";O:34:"Module\Support\Webapps\MetaManager":4:{s:5:"dirty";b:0;s:10:"*aliases";a:1:{s:33:"/var/www/fin.domainname.org";s:33:"/var/www/fin.domainname.org";}s:49:"Module\Support\Webapps\MetaManagermetaInstances";a:0:{}s:47:"Module\Support\Webapps\MetaManagerauthContext";r:37;}}s:15:"*documentRoot";s:33:"/var/www/fin.domainname.org";s:17:"*classification";s:9:"subdomain";s:11:"*instance";N;s:8:"*panel";O:34:"Module\Support\Webapps\App\UIPanel":4:{s:11:"*hostname";N;s:7:"*path";N;s:7:"*meta";r:101;s:47:"Module\Support\Webapps\App\UIPanelauthContext";r:37;}s:55:"Module\Support\Webapps\App\UIPanel\ElementauthContext";r:37;s:28:"*apnscpFunctionInterceptor";r:56;}s:28:"*apnscpFunctionInterceptor";r:56;s:60:"Module\Support\Webapps\App\Type\Unknown\HandlerauthContext";r:37;s:7:"*type";s:12:"invoiceninja";s:5:"depth";i:0;}s:28:"*apnscpFunctionInterceptor";r:56;s:39:"Lararia\Jobs\InstallAppJobauthContext";r:37;}"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php:88]
        16. Illuminate\Queue\Jobs\Job->fire()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:368]
        17. Illuminate\Queue\Worker->process("redis", Illuminate\Queue\Jobs\RedisJob, Illuminate\Queue\WorkerOptions)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:314]
        18. Illuminate\Queue\Worker->runJob(Illuminate\Queue\Jobs\RedisJob, "redis", Illuminate\Queue\WorkerOptions)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:134]
        19. Illuminate\Queue\Worker->daemon("redis", "high,default", Illuminate\Queue\WorkerOptions)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php:112]
        20. Illuminate\Queue\Console\WorkCommand->runWorker("redis", "high,default")
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php:96]
        21. Illuminate\Queue\Console\WorkCommand->handle()
            [/usr/local/apnscp/vendor/laravel/horizon/src/Console/WorkCommand.php:46]
        22. Laravel\Horizon\Console\WorkCommand->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
        23. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
        24. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
        25. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Laravel\Horizon\Console\WorkCommand, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
        26. Illuminate\Container\BoundMethod::call(Lararia\Application, [Laravel\Horizon\Console\WorkCommand, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
        27. Illuminate\Container\Container->call([Laravel\Horizon\Console\WorkCommand, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
        28. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
        29. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
        30. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
        31. Symfony\Component\Console\Application->doRunCommand(Laravel\Horizon\Console\WorkCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
        32. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
        33. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
        34. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
        35. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
        36. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
            [/usr/local/apnscp/artisan:69]

You’d need more context closer to the error, that’s 7 frames back which doesn’t tell us the specific error.

tail -n 50 /usr/local/apnscp/storage/logs/start.log

That’ll give the last 50 lines. Increase the number as you need. Additionally, app installation errors are sent by email to the email address on the account. This address is configured as siteinfo,email in account metadata. It may be changed by the user within Account > Settings.

If the recipient isn’t receiving a failure notice, then check /var/log/maillog to determine why the mail is rejected. You may need to relay through a smart-host to ensure deliverability if the IP address has poor reputation.

if i got a bunch of lines up i do see this error.

(Lararia\Jobs\JobException) EXCEPTION: Lararia\Jobs\Job::handle(): Job failed - fatal error: Target file /var/www//app/Constants.php does not exist 
[/usr/local/apnscp/lib/Lararia/Jobs/Job.php:219]

         0. Lararia\Jobs\Job->handleErrors(ArgumentError)
            [/usr/local/apnscp/lib/Lararia/Jobs/Job.php:202]
         1. Lararia\Jobs\Job->handle()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
         2. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
         3. Illuminate\Container\Util::unwrapIfClosure()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
         4. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Jobs\InstallAppJob, "handle"], )
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
         5. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Jobs\InstallAppJob, "handle"], null)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
         6. Illuminate\Container\Container->call([Lararia\Jobs\InstallAppJob, "handle"])
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php:94]
         7. Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:130]
         8. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:105]
         9. Illuminate\Pipeline\Pipeline->then()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php:98]
        10. Illuminate\Bus\Dispatcher->dispatchNow(Lararia\Jobs\InstallAppJob, false)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:83]
        11. Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:130]
        12. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:105]
        13. Illuminate\Pipeline\Pipeline->then()
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:85]
        14. Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Illuminate\Queue\Jobs\RedisJob, Lararia\Jobs\InstallAppJob)
            [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:59]

This is what is emailed:

ERROR: Lararia\Jobs\Job::handle(): Job failed - fatal error: Target file /var/www//app/Constants.php does not exist

That message is misleading; It’s unwinding deferred callbacks looking for version. Look at the previous errors. You’re missing a pre-req, such as task scheduling disabled on the account.

Run cpcmd scope:set cp.update-policy edge-major ; upcp, then apply an Invoice Ninja install. Excess noise has been quelled now.