Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

500 Internal Server Error

Vyasraj Kamalapur   ( User )

Commented 4 years ago

I keep getting a 500 Internal Server Error when i try to view the Reports page. Any help on how to solve this please.

Arjun   ( User )

Commented 4 years ago

Hi, I had a similar issue with my Estimates page when creating a new estimate or viewing an old estimate.

We found this error message in my error logs: "production.ERROR: htmlspecialchars() expects parameter 1 to be string, object given"

I was suggested by the developer to go and "reset" all the fields in the Settings>Invoice. So you will have to just re-initialize all the fields in there, enter Quantity for Quantity, Invoice for Title and so on.

Not sure if this helps, but might be a good try. Besides, you have to see the log files, that will direct you in a better direction.

Denis Dulici   ( Admin )

Commented 4 years ago

Hello,

You can enable debug to see more details about the problem:

https://akaunting.com/docs/developer-manual/debug

Regards

Vyasraj Kamalapur   ( User )

Commented 4 years ago

Thanks a lot guys... but did not solve my issue...

Vyasraj Kamalapur   ( User )

Commented 4 years ago

Hello Denis. I am running akauting online. I don't think I have access to the debug.

Lev Predan   ( User )

Commented 3 years ago

Hello, I know this was a while back, but I recently installed Akaunting and I keep getting the same error trying to access invoices (not the tab, but the actual individual invoices):

htmlspecialchars() expects parameter 1 to be string, object given (View: /var/www/akaunting/resources/views/components/documents/template/default.blade.php)

PHP: 7.4.13
Mysql: 15.1
Akaunting 2.1 (but also had had the problem at 2.0.26)

Any help would be appreciated, if there is some more information I can provide, plese let me know.

Many thanks.


Details:

DEBUG shows 5 exceptions. Highlights these lines:

```

Pipeline->Illuminate\Pipeline\{closure}() in /var/www/akaunting/app/Http/Middleware/Money.php (line 77)

$request->request->set('opening_balance', $opening_balance);
}
}
return $next($request); #line 77
}
}

```

and 3 like this, only the file differs:

```

Factory->renderComponent() in /var/www/akaunting/storage/framework/views/7def87ffc8675a3c31a95bcd8086d20982dcc886.php (line 29)

withAttributes([]); ?>




renderComponent(); ?> #line 29

stopSection(); ?>
startPush('scripts_start'); ?>


```

Here is also one stack trace:

[5/5] ErrorException

ErrorException:
htmlspecialchars() expects parameter 1 to be string, object given (View: /var/www/akaunting/resources/views/components/documents/template/default.blade.php) (View: /var/www/akaunting/resources/views/components/documents/template/default.blade.php) (View: /var/www/akaunting/resources/views/components/documents/template/default.blade.php) (View: /var/www/akaunting/resources/views/components/documents/template/default.blade.php)

at /var/www/akaunting/vendor/laravel/framework/src/Illuminate/Support/helpers.php:118
at Illuminate\View\Engines\CompilerEngine->handleViewException()
(/var/www/akaunting/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php:73)
at Livewire\LivewireViewCompilerEngine->handleViewException()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:60)
at Illuminate\View\Engines\PhpEngine->evaluatePath()
(/var/www/akaunting/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php:37)
at Livewire\LivewireViewCompilerEngine->evaluatePath()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:61)
at Illuminate\View\Engines\CompilerEngine->get()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/View/View.php:139)
at Illuminate\View\View->getContents()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/View/View.php:122)
at Illuminate\View\View->renderContents()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/View/View.php:91)
at Illuminate\View\View->render()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Http/Response.php:62)
at Illuminate\Http\Response->setContent()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Http/Response.php:34)
at Illuminate\Http\Response->__construct()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:780)
at Illuminate\Routing\Router::toResponse()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:752)
at Illuminate\Routing\Router->prepareResponse()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:692)
at Illuminate\Routing\Router->Illuminate\Routing\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/santigarcor/laratrust/src/Middleware/LaratrustPermission.php:25)
at Laratrust\Middleware\LaratrustPermission->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/Money.php:77)
at App\Http\Middleware\Money->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/DateFormat.php:39)
at App\Http\Middleware\DateFormat->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/santigarcor/laratrust/src/Middleware/LaratrustPermission.php:25)
at Laratrust\Middleware\LaratrustPermission->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/AdminMenu.php:30)
at App\Http\Middleware\AdminMenu->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/RedirectIfWizardNotCompleted.php:21)
at App\Http\Middleware\RedirectIfWizardNotCompleted->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/LogoutIfUserDisabled.php:21)
at App\Http\Middleware\LogoutIfUserDisabled->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:29)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:29)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/firewall/src/Abstracts/Middleware.php:36)
at Akaunting\Firewall\Abstracts\Middleware->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/akaunting/language/src/Middleware/SetLocale.php:95)
at Akaunting\Language\Middleware\SetLocale->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/LoadCurrencies.php:27)
at App\Http\Middleware\LoadCurrencies->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/LoadSettings.php:27)
at App\Http\Middleware\LoadSettings->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/AddXHeader.php:18)
at App\Http\Middleware\AddXHeader->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/app/Http/Middleware/RedirectIfNotInstalled.php:21)
at App\Http\Middleware\RedirectIfNotInstalled->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41)
at Illuminate\Routing\Middleware\SubstituteBindings->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:44)
at Illuminate\Auth\Middleware\Authenticate->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:78)
at Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49)
at Illuminate\View\Middleware\ShareErrorsFromSession->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121)
at Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63)
at Illuminate\Session\Middleware\StartSession->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37)
at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67)
at Illuminate\Cookie\Middleware\EncryptCookies->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103)
at Illuminate\Pipeline\Pipeline->then()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:694)
at Illuminate\Routing\Router->runRouteWithinStack()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:669)
at Illuminate\Routing\Router->runRoute()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:635)
at Illuminate\Routing\Router->dispatchToRoute()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Routing/Router.php:624)
at Illuminate\Routing\Router->dispatch()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:166)
at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:67)
at Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27)
at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:86)
at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/fruitcake/laravel-cors/src/HandleCors.php:37)
at Fruitcake\Cors\HandleCors->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/fideloper/proxy/src/TrustProxies.php:57)
at Fideloper\Proxy\TrustProxies->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/dingo/api/src/Http/Middleware/Request.php:111)
at Dingo\Api\Http\Middleware\Request->handle()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167)
at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103)
at Illuminate\Pipeline\Pipeline->then()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:141)
at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
(/var/www/akaunting/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110)
at Illuminate\Foundation\Http\Kernel->handle()
(/var/www/akaunting/index.php:20)


Pratik Jajal   ( User )

Commented 2 years ago

Hello Team,

I am still facing issue. I have tried all following ways but no luck:

1) Tried to install using downloading zip from Akaunting website
2) Tried to install using Softaculous
3) Tried to install through GitHub.

In all above cases, installation is getting successful and first time login is working but when we try to login second time, it throws below error:

[05:28:17] LOG.error: Constructor failed {"view":{"view":"\/var\/www\/vhosts\/akaunting.hostnee.com\/httpdocs\/resources\/views\/common\/dashboards\/show.blade.php","data":[]},"userId":1,"exception":{}}

Constructor failed (View: /var/www/vhosts/akaunting.hostnee.com/httpdocs/resources/views/common/dashboards/show.blade.php)
/var/www/vhosts/akaunting.hostnee.com/httpdocs/vendor/akaunting/laravel-money/src/Money.php#594
Illuminate\View\ViewException
Constructor failed
/var/www/vhosts/akaunting.hostnee.com/httpdocs/vendor/akaunting/laravel-money/src/Money.php#594



[05:28:17] LOG.debug: Console command:: '/opt/plesk/php/8.0/bin/php' 'artisan' help

Regards,
Pratik

Scott Carson   ( User )

Commented 1 year ago

Hey all,

My 500 is not with reports but with viewing Bills (and now, randomly, some transactions). Here's the specific debug error:

Update: I turned on debug, and there seems to be a software problem - here's the error:

Plank\Mediable\Helpers\File::readableSize(): Argument #1 ($bytes) must be of type int, string given, called in /public_html/akaunting3/vendor/plank/laravel-mediable/src/Media.php on line 308 (View: /public_html/akaunting3/resources/views/components/media/file.blade.php) (View: /public_html/akaunting3/resources/views/components/media/file.blade.php) (View: /public_html/akaunting3/resources/views/components/media/file.blade.php) (View: /public_html/akaunting3/resources/views/components/media/file.blade.php)
/public_html/akaunting3/vendor/plank/laravel-mediable/src/Helpers/File.php#70

Please login or register to leave a response.

Showing 1 to 8 of 8 discussions