Error 500 when try to update some settings

Hello

I have a error after latest update when i try to update any settings from my Company,

This is when i try to modify Footer from Invoice, do you know in what log to watch? Because in laravel.log is nothing

Thanks

Hi,

You may also want to check the web server error logs.

@david do you have any suggestions?

Web server Log:

2023/05/02 13:26:46 [error] 301645#301645: *104115 FastCGI sent in stderr: “PHP message: PHP Deprecated: Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja_v5/vendor/league/fractal/src/ParamBag.php on line 108” while reading response header from upstream, client: 172.71.182.141, server: orasys-it-solutions.net, request: “PUT /api/v1/companies/VolejRejNm? HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php8.1-fpm.sock:”, host: “orasys-it-solutions.net”, referrer: “https://orasys-it-solutions.net/

And i saw now when i send Invoice, don’t want to send mail to client with invoice

Thanks

Another log from laravel.log when i try force upgrade:

[2023-05-02 10:47:55] production.ERROR: Undefined property: stdClass::$enable_e_invoice {“exception”:"[object] (ErrorException(code: 0): Undefined property: stdClass::$enable_e_invoice at /var/www/html/invoiceninja_v5/app/Services/Email/EmailDefaults.php:302)
[stacktrace]
#0 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(266): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/html/invoiceninja_v5/app/Services/Email/EmailDefaults.php(302): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /var/www/html/invoiceninja_v5/app/Services/Email/EmailDefaults.php(81): App\Services\Email\EmailDefaults->setAttachments()
#3 /var/www/html/invoiceninja_v5/app/Services/Email/Email.php(205): App\Services\Email\EmailDefaults->run()
#4 /var/www/html/invoiceninja_v5/app/Services/Email/Email.php(87): App\Services\Email\Email->setDefaults()
#5 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Services\Email\Email->handle()
#6 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#7 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#8 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#9 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\Container\BoundMethod::call()
#10 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call()
#11 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#12 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#14 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\Bus\Dispatcher->dispatchNow()
#15 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}()
#16 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\Pipeline\Pipeline->then()
#18 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware()
#19 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call()
#20 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(425): Illuminate\Queue\Jobs\Job->fire()
#21 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(375): Illuminate\Queue\Worker->process()
#22 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\Queue\Worker->runJob()
#23 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(148): Illuminate\Queue\Worker->daemon()
#24 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(131): Illuminate\Queue\Console\WorkCommand->runWorker()
#25 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#26 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#27 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#28 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#29 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\Container\BoundMethod::call()
#30 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call()
#31 /var/www/html/invoiceninja_v5/vendor/symfony/console/Command/Command.php(312): Illuminate\Console\Command->execute()
#32 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Console/Command.php(153): Symfony\Component\Console\Command\Command->run()
#33 /var/www/html/invoiceninja_v5/vendor/symfony/console/Application.php(1022): Illuminate\Console\Command->run()
#34 /var/www/html/invoiceninja_v5/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#35 /var/www/html/invoiceninja_v5/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun()
#36 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#37 /var/www/html/invoiceninja_v5/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#38 /var/www/html/invoiceninja_v5/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#39 {main}
"}

Something is very strange because on Iphone App everything work like a charm

Maybe my cache is broken?

Other users have been able to resolve this error by saving their settings.

@david do you have any ideas?

Yes , i have this problem only in web interface, but i think i will migrate to another server to see if error persist.

Only if you have a hint on what to do i ask :smiley:

5.5.14 should have this issue resolved now.

is same error but this is only from browser i told you, in Linux App or iOS everything work good

For me its not working any where, on browser, on iPhone app, no where, I get the 500 server error and nothing has helped

after reinstall php and OS is the same problem

@Lionboy

Do you have command line access?

If yes, run

php artisan migrate

@david

I have this error:

sudo -u www-data php8.1 artisan migrate
[sudo] password for adrian:

                                                                                    APPLICATION IN PRODUCTION.                                                                                        

Do you really wish to run this command? (yes/no) [no]
❯ yes

INFO Running migrations.

2023_01_31_191407_create_jobs_table … 3ms FAIL

In Connection.php line 760:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘jobs’ already exists (SQL: create table jobs (id bigint unsigned not null auto_increment primary key, queue varchar(191) not nu
ll, payload longtext not null, attempts tinyint unsigned not null, reserved_at int unsigned null, available_at int unsigned not null, created_at int unsigned not null) default character s
et utf8mb4 collate ‘utf8mb4_unicode_ci’ engine = InnoDB)

In Connection.php line 545:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘jobs’ already exists

Need to drop that table from database?

Thanks

and this i am running on a PROD env where i have all my invoice, this will delete data from table?

@Lionboy

This is strange as we dont have that particular date in the migrations table.

Can you move the file

database/migrations/2023_01_31_191407_create_jobs_table…

out of that directory temporarily and then reattempt the migrations.

Now everything run normal.

sudo -u www-data php8.1 artisan migrate

                                                                                    APPLICATION IN PRODUCTION.                                                                                        

Do you really wish to run this command? (yes/no) [no]
❯ yes

INFO Running migrations.

2023_02_02_062938_add_additional_required_fields_gateways … 49ms DONE
2023_02_05_042351_add_foreign_key_for_vendors … 0ms DONE
2023_02_07_114011_add_additional_product_fields … 36ms DONE
2023_02_14_064135_create_react_settings_column_company_user_table … 62ms DONE
2023_02_28_064453_update_designs … 8ms DONE
2023_02_28_200056_add_visible_prop_to_companies_table … 4ms DONE
2023_03_09_121033_add_payment_balance_to_clients_table … 23ms DONE
2023_03_10_100629_add_currencies … 2ms DONE
2023_03_13_156872_add_e_invoice_type_to_clients_table … 53ms DONE
2023_03_17_012309_add_proforma_flag_for_recurring_invoices … 26ms DONE
2023_03_21_053933_tax_calculations_for_invoices … 224ms DONE
2023_03_24_054758_add_client_is_exempt_from_taxes … 364ms DONE
2023_04_20_215159_drop_e_invoice_type_column … 32ms DONE
2023_04_27_045639_add_kmher_language … 50ms DONE
2023_05_03_023956_add_shopify_user_id … 143ms DONE
2023_05_15_103212_e_invoice_ssl_storage … 32ms DONE

And save button work again.

Thanks