V5 (latest docker version - Ubuntu) - Logo not visible in dashboard or invoice

G’day folks,

I’m new to Invoice Ninja, and having difficulty with uploading logo and having it show both in dashboard and in the invoice preview. I have read several posts and followed instructions on similar problems, however, have not been able to resolve. How do i run php artisan, is that within a container?

When I upload the logo.png file the page reports success, however, I am unable to click save button top right-hand corner (using either firefox or brave). After upload, the window is blank however, has delete logo or upload logo buttons. If press on delete, “successfully delete logo” message appears. (see screen shot)

environment details: (had to remove links in the env file because i am a new user and server would not let me post)

Server: Ubuntu 20.04.03
Docker: latest release
Invoice Ninja: v5.3.58-C76
PHP Ver: 7.4.26

ENV**********

IN application vars

APP_URL=hxxp://in.localhost:8003
APP_KEY=base64:REMOVEDFORPOSTINGONFORUM
APP_DEBUG=true
REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
PDF_GENERATOR=snappdf
LOG_PDF_HTML=true
QUEUE_CONNECTION=database
LOCAL_DOWNLOAD=true

DB connection

DB_HOST=db
DB_PORT=3306
DB_DATABASE=ninja
DB_USERNAME=ninja
DB_PASSWORD=ninja

Create initial user

Default to these values if empty

IN_USER_EMAIL=

IN_PASSWORD=

IN_USER_EMAIL=test@protonmail.com
IN_PASSWORD=invoice

Mail options

MAIL_MAILER=log
MAIL_HOST=
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=‘user@example.com’
MAIL_FROM_NAME=‘Self Hosted User’

MySQL

MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
MYSQL_USER=ninja
MYSQL_PASSWORD=ninja
MYSQL_DATABASE=ninja

V4 env vars

DB_STRICT=false

APP_CIPHER=AES-256-CBC


The composer file is default.

**server host file
127.0.0.1 localhost
127.0.1.1 bongoserver
127.0.0.1 in.localhost


Thank you in advance

Hi,

@david any ideas, could localhost in the APP_URL be an issue?

Hi,

I couldn’t post the URL because server wouldn’t let me due to being a new user and a URL limit of 2 per post.

APP_URL=http://in.localhost.8003

Thank you.

Additional troubleshooting performed:

  • sudo docker-compose exec app php artisan storage:link
    The [/var/www/app/public/storage] link already exists.
    The links have been created.

  • sudo docker-compose exec app php artisan optimize
    Configuration cache cleared!
    Configuration cached successfully!
    Route cache cleared!
    Routes cached successfully!
    Files cached successfully!

  • shut down docker container and rebooted, however, problem still exists

Thank you.

Further troubleshooting:

  • Container List
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    ecab946d1d7e nginx “/docker-entrypoint.…” 3 minutes ago Up 3 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp dockerfiles_server_1
    c063f632a906 invoiceninja/invoiceninja:5 “docker-entrypoint s…” 3 minutes ago Up 3 minutes 9000/tcp dockerfiles_app_1
    24337c0d3750 mysql:5 “docker-entrypoint.s…” 3 minutes ago Up 3 minutes 33060/tcp, 0.0.0.0:3305->3306/tcp, :::3305->3306/tcp dockerfiles_db_1

  • Installed iputils-ping within container dockerfiles_server_1 (nginx image)

  • pinged in.localhost (APP_URL)
    64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.023 ms

  • sudo docker network ls
    NETWORK ID NAME DRIVER SCOPE
    9bb5b3e229c9 bridge bridge local
    458edbbffdd5 dockerfiles_invoiceninja bridge local
    d2bb540af450 host host local
    f316b9ffbca0 none null local

  • Installed graphical on Ubuntu Server (VM), launched web browser, and same problem exists.

Question, is there anyway to hardcode the company logo just as a workaround for now?

Thank you

Have you tried uploading the logo using a different version of the app (ie, web, mobile or desktop).

@david do you have any other suggestions?

Hi @hillel ,

Have installed android app, connected to server, and performed the same process of uploading logo file.

However, this time, distinct differences, but resulted in same issue.

Upon uploading image using android app, a small icon (invoice ninja icon) place holder appears in the window and I am able to press save in the top right hand corner.

I then create a mock invoice and review via the PDF tab, however, the company logo is not present, rather it is an icon place holder for a broken image (see attached image file broken image link .

this broken image icon is visible through the web dashboard invoice preview too.

Thank you

It may help to add LOCAL_DOWNLOAD=true to the .env file

https://invoiceninja.github.io/docs/env-variables/

@hillel ,

Thanks, but in my first post it shows that variable already present in the env file.

thank you.

would changing the domain within the .env file to, for example, ‘localhost.test’ , be worth trying?
I’ve read different things on this particular matter, however, nothing is conclusive.

@david any thoughts?

Hi again,

Is there any troubleshooting steps i can take?

  • how to output error logs;
  • how to capture specific function (such as elements to do with logo) and output that to a log ;
  • is there any docker/php/nginx specific bug-bears ; and
  • can this issue be related to pdf handing? (PhantomJS or snappdf)

Also,
I thought I would check if logo is present in client portal (i’m not going to use this feature, Just basic record keeping though invoice creation hence why in docker/self hosted within a VM)
and the browser gets connection refused.

See screen shot attached

thank you.

Kind regards,

Hi,

Additional troubleshooting steps I have taken:

  • changed variable in env file to APP_URL=in.localhost.test
  • made changes in server hosts file
  • performed sudo docker-compose exec app php artisan optimize

navigated to in.localhost.test via browser. re-uploaded company logo, and problem still exists;

went into invoice design, changed to HTML view, found URL link to company logo
http://in.localhost.test:8003/storage/Y9iuKGrnL6AuQN55FHbLkXZej6FSo6zc/P1BkLXGbEegO6OkSMX8qnCmZh5IK5aDM3340fJUq.png"

However browser reports connection refused

Make sure DNS is working and resolving correctly. I suspect the localhost.test stuff ain’t resolving properly.

Then: Can you check for error messages in storage/logs/laravel.log and your nginx log files?

@xoo ,

If DNS wasn’t working I wouldn’t be able to access the dashboard, I would of thought?
Furthermore, when pinging (as per several posts up) the domain name resolves the the IP.

I’m accessing the dashboard locally on the host via web browser.

Thank you.

Hi everyone, [@hillel ]

Can some one tell me where config.php file is located?

I wish to try the following troubleshoot step in this post:

The standard way to configure the app is to adjust the settings in the .env file.

It’s possible to adjust the files in the config/ folder but any changes will be overwritten when you next update the app.

@hillel ,

Is there a variable i need to add to simulate the troubleshooting step in the following post?

It may be LOGO_PATH

@davd any thoughts?

@hillel ,

I have found the problem :slight_smile:

The APP_URL=http://in.localhost.test:8003 is the culprit
So, I removed the port 8003, and now able to navigate to the company logo URL and it now appears normal within the dashboard and on the invoice.

I used Brave browser inspect feature, and removed the port number, then made neccessary adjustments in the env, along with running artisan commannd.

All working

1 Like