<p>I try to deploy the web-app <a href="https://akauntuing.com" rel="nofollow noreferrer">akaunting</a> to a k8s cluster.</p>
<p>Therefore, I converted the given (and working!) <a href="https://github.com/akaunting/docker" rel="nofollow noreferrer">docker-compose script</a> using <a href="https://kompose.io" rel="nofollow noreferrer">kompose</a> to k8s yaml files.</p>
<p>When I try to apply these files (given <code>AKAUNTING_SETUP=true</code>), I get the following error; I have no clue how to fix it...</p>
<pre><code>Call to a member function get() on null
Setting locale en-US
Creating database tables
Connecting to database akaunting@akaunting-db:3306
Creating company
[2021-11-22 13:14:32] production.ERROR: Call to a member function get() on null {&quot;exception&quot;:&quot;[object] (Error(code: 0): Call to a member function get() on null at /var/www/html/app/Abstracts/Commands/Module.php:59)
[stacktrace]
#0 /var/www/html/overrides/akaunting/laravel-module/Commands/InstallCommand.php(50): App\\Abstracts\\Commands\\Module-&gt;createHistory('installed')
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Akaunting\\Module\\Commands\\InstallCommand-&gt;handle()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container-&gt;call(Array)
#7 /var/www/html/vendor/symfony/console/Command/Command.php(299): Illuminate\\Console\\Command-&gt;execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#9 /var/www/html/vendor/symfony/console/Application.php(978): Illuminate\\Console\\Command-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#10 /var/www/html/vendor/symfony/console/Application.php(295): Symfony\\Component\\Console\\Application-&gt;doRunCommand(Object(Akaunting\\Module\\Commands\\InstallCommand), Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#11 /var/www/html/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application-&gt;doRun(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(186): Illuminate\\Console\\Application-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(263): Illuminate\\Console\\Application-&gt;call('module:install', Array, NULL)
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Foundation\\Console\\Kernel-&gt;call('module:install', Array)
#16 /var/www/html/database/seeds/Modules.php(32): Illuminate\\Support\\Facades\\Facade::__callStatic('call', Array)
#17 /var/www/html/database/seeds/Modules.php(20): Database\\Seeds\\Modules-&gt;create()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Database\\Seeds\\Modules-&gt;run()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(149): Illuminate\\Container\\Container-&gt;call(Array, Array)
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(49): Illuminate\\Database\\Seeder-&gt;__invoke(Array)
#25 /var/www/html/database/seeds/Company.php(20): Illuminate\\Database\\Seeder-&gt;call('Database\\\\Seeds\\\\...')
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Database\\Seeds\\Company-&gt;run()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(149): Illuminate\\Container\\Container-&gt;call(Array, Array)
#32 /var/www/html/app/Console/Commands/CompanySeed.php(36): Illuminate\\Database\\Seeder-&gt;__invoke()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\CompanySeed-&gt;handle()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container-&gt;call(Array)
#39 /var/www/html/vendor/symfony/console/Command/Command.php(299): Illuminate\\Console\\Command-&gt;execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#41 /var/www/html/vendor/symfony/console/Application.php(978): Illuminate\\Console\\Command-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#42 /var/www/html/vendor/symfony/console/Application.php(295): Symfony\\Component\\Console\\Application-&gt;doRunCommand(Object(App\\Console\\Commands\\CompanySeed), Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#43 /var/www/html/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application-&gt;doRun(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(186): Illuminate\\Console\\Application-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(263): Illuminate\\Console\\Application-&gt;call('company:seed', Array, NULL)
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Foundation\\Console\\Kernel-&gt;call('company:seed', Array)
#48 /var/www/html/app/Jobs/Common/CreateCompany.php(50): Illuminate\\Support\\Facades\\Facade::__callStatic('call', Array)
#49 /var/www/html/app/Jobs/Common/CreateCompany.php(27): App\\Jobs\\Common\\CreateCompany-&gt;callSeeds()
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(29): App\\Jobs\\Common\\CreateCompany-&gt;App\\Jobs\\Common\\{closure}(Object(Illuminate\\Database\\MySqlConnection))
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(388): Illuminate\\Database\\Connection-&gt;transaction(Object(Closure))
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Database\\DatabaseManager-&gt;__call('transaction', Array)
#53 /var/www/html/app/Jobs/Common/CreateCompany.php(30): Illuminate\\Support\\Facades\\Facade::__callStatic('transaction', Array)
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Common\\CreateCompany-&gt;handle()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container-&gt;call(Array)
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Bus\\Dispatcher-&gt;Illuminate\\Bus\\{closure}(Object(App\\Jobs\\Common\\CreateCompany))
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(App\\Jobs\\Common\\CreateCompany))
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline-&gt;then(Object(Closure))
#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\\Bus\\Dispatcher-&gt;dispatchNow(Object(App\\Jobs\\Common\\CreateCompany), false)
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(405): Illuminate\\Bus\\Dispatcher-&gt;dispatchSync(Object(App\\Jobs\\Common\\CreateCompany), NULL)
#65 /var/www/html/app/Utilities/Installer.php(241): dispatch_sync(Object(App\\Jobs\\Common\\CreateCompany))
#66 /var/www/html/app/Console/Commands/Install.php(82): App\\Utilities\\Installer::createCompany('Schokoladensouf...', 'finance@schokol...', 'en-US')
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\Install-&gt;handle()
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#69 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#71 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#72 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container-&gt;call(Array)
#73 /var/www/html/vendor/symfony/console/Command/Command.php(299): Illuminate\\Console\\Command-&gt;execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#74 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#75 /var/www/html/vendor/symfony/console/Application.php(978): Illuminate\\Console\\Command-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#76 /var/www/html/vendor/symfony/console/Application.php(295): Symfony\\Component\\Console\\Application-&gt;doRunCommand(Object(App\\Console\\Commands\\Install), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#77 /var/www/html/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application-&gt;doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#78 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#79 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application-&gt;run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#80 /var/www/html/artisan(22): Illuminate\\Foundation\\Console\\Kernel-&gt;handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#81 {main}
&quot;}
In Module.php line 59:
Call to a member function get() on null
</code></pre>
<p>If you need more information to answer, feel free to ask.
Any help is appreciated.</p>
<p><em>Moved from <a href="https://serverfault.com/q/1084263/940982">ServerFault</a></em></p>

caylee
<h2>Workaround</h2>
<p>Hi - I found the root cause of the problem - and answered the question yesterday night - but my post was deleted - not sure why (possibly since I hadn't finished registration???)</p>
<p>Turns out that the root of the problem is because the default Dockerfile image does NOT have the modules included. These modules seem to be downloaded after the first successful login (which interestingly requires the setup to finish - catch-22)!!!</p>
<p>Fix:</p>
<ul>
<li>Download the following 3 modules from their Github - offline-payments, paypal-standard and bc21.</li>
<li>Extract the contents of these to 3 folders to the akaunting-modules volume - folder names need to be OfflinePayments, PaypalStandard and BC21 (guessing case sensitive).</li>
<li>Restart the containers.</li>
</ul>
<p>Let me know if that helps. I've got to the Wizard steps by doing the above.
After you pass the Wizard steps remember to restart with AKAUNTING_SETUP=false (checks for existing records don't seem to be great)
R. Saravanan</p>
