invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
411 stars 267 forks source link

Error 500 on logo upload #445

Closed P6g9YHK6 closed 1 year ago

P6g9YHK6 commented 2 years ago

Setup information

docker-compose

Describe the bug When i try to upload a logo on a fresh install i am getting a 500-server error

To reproduce Steps to reproduce the behavior: Upload a logo.

Screenshots/logs image


No error in the logs that i could find

**Docker/Kubernetes/Helm**:
- Output of `docker version`:

Client: Version: 20.10.14 API version: 1.41 Go version: go1.16.15 Git commit: a224086 Built: Thu Mar 24 01:45:09 2022 OS/Arch: linux/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.14 API version: 1.41 (minimum version 1.12) Go version: go1.16.15 Git commit: 87a90dc Built: Thu Mar 24 01:49:54 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.5.11 GitCommit: 3df54a852345ae127d1fa3092b95168e4a88e2f8 runc: Version: 1.0.3 GitCommit: v1.0.3-0-gf46b6ba2 docker-init: Version: 0.19.0 GitCommit: de40ad0

turbo124 commented 2 years ago

the error here will be located in settings/logs/laravel.log

Surgical71 commented 2 years ago

Error in my Log file:

imagecreatefromstring(): gd-png: libpng warning: iCCP: known incorrect sRGB profile at /var/www/app/app/Jobs/Util/UploadAvatar.php:40)

turbo124 commented 2 years ago

Does it fail if you try a different logo at all? What kind of file type are you attempting to upload?

Surgical71 commented 2 years ago

Does it fail if you try a different logo at all? What kind of file type are you attempting to upload?

This happens with .png images and .jpg. STill happening after latest update

This is the only log entry i can find:

172.24.0.4 - 20/Aug/2022:09:09:47 +0000 "POST /index.php" 500

brendanpetty commented 2 years ago

Hardly an ideal solution, but I've made it work by editing app/Jobs/Util/UploadAvatar.php at line 40, using @ to suppress the error, like so: $im = @imagecreatefromstring(file_get_contents($this->file));

P6g9YHK6 commented 1 year ago

The issue is for some reason fixed on my side you can close it if you wish.