akaunting / docker

Docker Image for Akaunting
https://github.com/akaunting/akaunting
GNU General Public License v3.0
182 stars 85 forks source link

App launched but there are a lot of php errors #99

Open nithrous opened 11 months ago

nithrous commented 11 months ago

Os: Ubuntu 18

Hi, went through installation steps, but did not made any changes in environments, just set 12600 port in docker-compose.yml. Two containers appeared: akaunting and akaunting-db

When I open an app using {ip_address}:12600 I see such output:


Deprecated: Return type of Illuminate\Container\Container::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/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1159

Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1170

Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1182

Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1195

Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 788

Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 862

Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 788

Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 862

Deprecated: Return type of Illuminate\Routing\RouteCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php on line 343

Deprecated: Return type of Illuminate\Routing\RouteCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php on line 333

Deprecated: Return type of Illuminate\Http\Request::offsetExists($offset) 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/vendor/laravel/framework/src/Illuminate/Http/Request.php on line 552

Deprecated: Return type of Illuminate\Http\Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Request.php on line 563

Deprecated: Return type of Illuminate\Http\Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Request.php on line 575

Deprecated: Return type of Illuminate\Http\Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Request.php on line 586

Deprecated: Return type of Symfony\Component\HttpFoundation\ParameterBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/http-foundation/ParameterBag.php on line 220

Deprecated: Return type of Symfony\Component\HttpFoundation\ParameterBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/http-foundation/ParameterBag.php on line 230

Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/http-foundation/HeaderBag.php on line 280

Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/http-foundation/HeaderBag.php on line 290

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/vendor/symfony/http-foundation/Request.php on line 316

Deprecated: mb_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Str.php on line 94

Deprecated: mb_strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Str.php on line 94

Deprecated: auto_detect_line_endings is deprecated in /var/www/html/vendor/vlucas/phpdotenv/src/Loader.php on line 167

Deprecated: Return type of Illuminate\Config\Repository::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/vendor/laravel/framework/src/Illuminate/Config/Repository.php on line 116

Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Config/Repository.php on line 127

Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Config/Repository.php on line 139

Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Config/Repository.php on line 150

Deprecated: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Finder.php on line 565

Deprecated: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Finder.php on line 636

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with FilterIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/FilterIterator.php on line 32

Deprecated: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php on line 42

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 85

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 113

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 65

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 55

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 71

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 76

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/FilterIterator.php on line 32

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28

Deprecated: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27

Deprecated: Return type of Illuminate\Database\Eloquent\Model::offsetExists($offset) 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/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 1300

Deprecated: Return type of Illuminate\Database\Eloquent\Model::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 1311

Deprecated: Return type of Illuminate\Database\Eloquent\Model::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 1323

Deprecated: Return type of Illuminate\Database\Eloquent\Model::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 1334

Deprecated: Return type of Illuminate\Database\Eloquent\Model::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 927

How to fix it?

nithrous commented 11 months ago

Also tried a solution from here: https://akaunting.com/forum/discussion/general/laravel-deprication-errors-docker-container

UPDATE: with image version 3.0.15 it works again.

The solution is to use fixed image verison in your docker-compose.yml "image: akaunting/akaunting:3.0.15" until the latest image will be fixed.

But get

E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'

Do you know how to fix it?

vitis586 commented 11 months ago

I do not recall if I run the v3.0.15 but I had similar issues with v3.0.16. The later version was working and it broke over night even though I was locked to it. The thing is that the images are changing almost every day, so locking to a version tag is not enough. You have to lock to specific digest. One of the users had to rollback to v3.0.13 to get everything working so that might also be worth trying. More information in here https://github.com/akaunting/docker/issues/95 BTW yesterday I managed to finally run the latest 3.1 version which was not working for quite some time again (PHP errors). I even managed to fulfill the requirements for the number of users but any change that requires database throws errors so I might be migrating back to 3.0.17 today.