invoiceninja / dockerfiles

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

Invoice Design preview - Promise rejected undefined #501

Closed maejok-xx closed 1 year ago

maejok-xx commented 1 year ago

docker-compose

Describe the bug When editing the Invoice Design, the preview only shows "Promise was rejected with value of undefined"

To reproduce Steps to reproduce the behavior:

  1. Go to Settings > Invoice Design
  2. Click on Show Preview
  3. See error

Expected behavior A preview of my invoice design

Screenshots/logs No Logs. image

Docker:

Server: Docker Engine - Community Engine: Version: 23.0.1 API version: 1.42 (minimum version 1.12) Go version: go1.19.5 Git commit: bc3805a Built: Thu Feb 9 19:46:54 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.18 GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0



**Additional context**
Using PDF_GENERATOR=snappdf
PDF generation works when editing/viewing invoices.
turbo124 commented 1 year ago

@maejok-xx

Not sure on this one, on my test platform with docker, I am unable to reproduce this particular error.

Can you advise if there are any errors in storage/logs/laravel.log

maejok-xx commented 1 year ago

Nope, nothing at all in storage/logs/laravel.log. I'm also using Traefik. Not sure if that might be causing the issue, but I suspect not, since the PDF generation works properly everywhere else?

turbo124 commented 1 year ago

@maejok-xx

I don't think traefik would be the issue on this.

I think the best way to debug would be to take down the container, and temporarily set APP_DEBUG=true

then boot up the container, and inspect the error message in the browser console, it should give us more information.

maejok-xx commented 1 year ago

I've been trying to get error messages with APP_DEBUG enabled, but nothing shows, aside from the red "Debug mode is enabled" notice.

I recall in a previou versions of IN (v4?) that I used to run a few years ago, there was a Laravel Debug bar... I don't know if that's removed now or something, but I can't get it to show up.

So, no errors anywhere and no debug information. I'm at a loss.

maejok-xx commented 1 year ago

Well now I even more confused. It just started working.

Settings I changed prior to it starting to work...

Client Portal settings:

That's it. I toggled the options off to see if it happened again, but it kept working. Perhaps a default value for one of those options breaks invoice design preview?

This has been an issue for about 2 weeks, since spinning up this container, and I've tried everything to get it to work right....then it just starts working. Typical... 😂

Debug bar still doesn't show up with APP_DEBUG=true, however. If it even should?

turbo124 commented 1 year ago

Which env file are you updating? The one in the container or the plain env file in the docker compose directory?

maejok-xx commented 1 year ago

The plain env file in the docker compose directory

turbo124 commented 1 year ago

So most likely the debug bar is not showing as the dev packages are not installed on the docker image.

I'll close this issue as resolved.