dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

Uploaded Logo doesn't show up

Open markhaehnel opened this issue 4 years ago • 7 comments

What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30 5.3.39

What environment are you running? Docker

Have you checked log files (storage/logs/) Please provide redacted output Yes, nothing suspicious.

Have you searched existing issues? Yes, there was issue invoiceninja/invoiceninja#5073. But maybe that's not relevant.

Have you reported this to Slack/forum before posting? Yes, this was something i checked, but it didn't work. https://forum.invoiceninja.com/t/uploaded-logo-not-found/8522/2

Describe the bug When uploading a company logo, after uploading the browser tries to fetch the image from localhost instead of the configured domain.

Steps To Reproduce Run invoiceninja in docker and upload company logo.

Expected behavior Company logo gets fetched from https://example.com and not from localhost. Or embedded as base64? When replacing localhost in the url the browser tries to fetch with the configured domain (example.com) then the image shows up.

Screenshots Screenshot 2021-12-27 at 09 10 34

Additional context I'm running Invoice Ninja in Docker behind a traefik reverse proxy. Here are my redacted docker-compose and env files. https://gist.github.com/markhaehnel/71d4978391deb4cb87a426bb61ed60ba https://gist.github.com/markhaehnel/51d9e153161e2aacc17cf867b8d0f515

(v5) Can you replicate the issue on our demo site? https://demo.invoiceninja.com No, not really. There is another error on the demo site.

markhaehnel avatar Dec 27 '21 08:12 markhaehnel

@markhaehnel

Is it only the company logo which is the issue? does the company logo appear correctly in the client portal? Finally, it looks like the rest of the application works? ie API endpoints are correctly referencing the https:// endpoint

turbo124 avatar Dec 27 '21 22:12 turbo124

The rest of the application and all other API endpoints seem to work fine and are referencing https://. The company logo also doesn't work in the PDF invoice. Is there another place in Invoice Ninja where i can upload files and test what happens there?

markhaehnel avatar Dec 28 '21 06:12 markhaehnel

@markhaehnel

Can you try re-uploading your company logo please.

turbo124 avatar Dec 28 '21 09:12 turbo124

Same issue as before. Doesn't matter if re-uploading or removing and uploading again.

markhaehnel avatar Dec 28 '21 13:12 markhaehnel

I think somewhere in your system, you still have a http:// reference which is what the system is resolving when attempting to display the company logo.. most like in a .env file.

turbo124 avatar Dec 28 '21 22:12 turbo124

I don't think so. As you can see in the two gist links in my initial post, thats all configuration i have.

Is there maybe another way for me to debug the issue and give some more information on that?

markhaehnel avatar Dec 29 '21 08:12 markhaehnel

I have a similar issue when I tried installing using the Helm chart in my private k8s

My complete values.yaml file used as configuration:

global:
  storageClass: "local-path"

persistence:
  public:
    storageClass: "local-path"
    size: 1Gi

ingress:
  annotations:
    cert-manager.io/cluster-issuer: digify-clusterissuer
  ingressClassName: nginx
  hostname: invoiceninja.digify
  tls: true
  secrets:
    - invoiceninja-tls-secret

The error I received was that the logo still used the reference to: http://invoiceninja.local instead of the one I specified as the ingress path https://invoiceninja.digify.

image

Chart version: invoiceninja-0.10.2
App version: 5.6.24
k8s: 1.26

Newex avatar Nov 25 '23 02:11 Newex