Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Invoice Ninja
  3. Invoice ninja server 500 internal error

Invoice ninja server 500 internal error

Scheduled Pinned Locked Moved Solved Invoice Ninja
51 Posts 9 Posters 4.2k Views 11 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG girish

    @AartJansen so you are seeing the same error message in the logs as the upstream forum one ? @humptydumpty is showing some other error though.

    humptydumptyH Offline
    humptydumptyH Offline
    humptydumpty
    wrote on last edited by
    #5

    @girish the pdf generation issue resurfaced I guess? old thread where solution was found: https://forum.invoiceninja.com/t/platformexception-error-promise-was-rejected-with-a-value-of-undefined-null-null/8124/44

    1 Reply Last reply
    0
    • humptydumptyH Offline
      humptydumptyH Offline
      humptydumpty
      wrote on last edited by
      #6

      I created this thread upstream: https://forum.invoiceninja.com/t/in-not-sending-emails-pdf-generation-not-working-either/16317

      1 Reply Last reply
      0
      • humptydumptyH Offline
        humptydumptyH Offline
        humptydumpty
        wrote on last edited by humptydumpty
        #7

        Per upstream recommendation, in the .env file I've changed from FALSE to hosted_ninja:

        PHANTOMJS_PDF_GENERATION=hosted_ninja
        

        Now, PDF's are being generated edit: it's a hit or miss, but my emails are being sent correctly 😲

        This leaves the permission issue but I'm also getting a new warning: snappdf not enabled

        image.png

        A 1 Reply Last reply
        0
        • humptydumptyH Offline
          humptydumptyH Offline
          humptydumpty
          wrote on last edited by
          #8

          @girish upstream shared this link about permissions: https://invoiceninja.github.io/en/self-host-installation/#file-permissions

          1 Reply Last reply
          0
          • humptydumptyH Offline
            humptydumptyH Offline
            humptydumpty
            wrote on last edited by humptydumpty
            #9

            @AartJansen try the env workaround mention above and see if that helps. The PDF preview might not get generated when attempting to view it from the first try. Simply go back and retry and it should open on the second attempt. I have the PDF attached to my client emails and can confirm that the PDF is displaying correctly now. Hopefully, this works for you too.

            Edit: Spoke too soon. It's a hit or miss. Tried sending a quote and the PDF isn't displaying.

            1 Reply Last reply
            0
            • girishG girish referenced this topic on
            • humptydumptyH Offline
              humptydumptyH Offline
              humptydumpty
              wrote on last edited by humptydumpty
              #10

              I tried this instead in the .env file and it seems to work perfectly:

              PHANTOMJS_PDF_GENERATION=false
              PDF_GENERATOR=hosted_ninja
              

              Emails are being delivered with the PDF attached and generated properly. PDF works each time in the dashboard too.

              1 Reply Last reply
              1
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by nebulon
                #11

                Just tried to reproduce this, but our company instance renders PDFs just fine. Not sure if this makes any difference, but do you use the flutter or the react version of the webui?

                humptydumptyH 2 Replies Last reply
                0
                • nebulonN nebulon

                  Just tried to reproduce this, but our company instance renders PDFs just fine. Not sure if this makes any difference, but do you use the flutter or the react version of the webui?

                  humptydumptyH Offline
                  humptydumptyH Offline
                  humptydumpty
                  wrote on last edited by humptydumpty
                  #12

                  @nebulon I'm not sure as I can't seem to find the icon for it anymore in the web ui.

                  screenshot for reference
                  def86811-b6f5-4a8d-92bf-34466e01d526-image.png

                  1 Reply Last reply
                  0
                  • nebulonN nebulon

                    Just tried to reproduce this, but our company instance renders PDFs just fine. Not sure if this makes any difference, but do you use the flutter or the react version of the webui?

                    humptydumptyH Offline
                    humptydumptyH Offline
                    humptydumpty
                    wrote on last edited by
                    #13

                    @nebulon I checked the IN app in the Cloudron demo and in the env file you have it as:

                    NINJA_ENVIRONMENT=selfhost
                    PDF_GENERATOR=snappdf
                    

                    However, PDF's are not being generated in the demo.

                    On my instance it was (before I messed around with it today):

                    NINJA_ENVIRONMENT=selfhost
                    PHANTOMJS_PDF_GENERATION=false
                    

                    Now, I have it as:

                    NINJA_ENVIRONMENT=selfhost
                    
                    PHANTOMJS_PDF_GENERATION=false
                    PDF_GENERATOR=hosted_ninja
                    

                    It's working fine this way. I'm pretty sure I'm going to bite my tongue again. This issue seems to reappear every few updates and I can't remember how we're getting it fixed/patched.

                    1 Reply Last reply
                    1
                    • girishG girish

                      @AartJansen so you are seeing the same error message in the logs as the upstream forum one ? @humptydumpty is showing some other error though.

                      A Offline
                      A Offline
                      AartJansen
                      wrote on last edited by
                      #14

                      @girish these are the logs I see when attempting to view or generate a pdf

                      Jun 20 08:09:54 172.18.0.1 - - [19/Jun/2024:20:09:54 +0000] "GET /storage/wy7367YjZKJ1MeibNz7hWcqVUuzfvlYV/RE1ZVEX72zOe7y3YneTYcG4Y9oae9HMlDUOZg95d.png HTTP/1.1" 200 9907 "-" "-"
                      Jun 20 08:09:55 172.18.0.1 - - [19/Jun/2024:20:09:54 +0000] "GET /client/invoice/ZZ0cyw1hzyF4YLY5afg89hOIWKLCrkM5/download?t=1718827794306 HTTP/1.1" 500 1781 "-" "Dart/3.3 (dart:io)"
                      Jun 20 08:10:00 172.18.0.1 - - [19/Jun/2024:20:10:00 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:10:00 2024-06-19 20:10:00 Running [queue-size-job] ..................... 12ms DONE <30>1 2024-06-19T20:10:00Z cloudron 484b2dd6-7856-4a2f-a637-cac90510d702 1285 484b2dd6-7856-4a2f-a637-cac90510d702 - 2024-06-19 20:10:00 Running [task-scheduler-job] .................. 2ms DONE <30>1 2024-06-19T20:10:00Z cloudron 484b2dd6-7856-4a2f-a637-cac90510d702 1285 484b2dd6-7856-4a2f-a637-cac90510d702 - 2024-06-19 20:10:00 Running [Callback] ............................ 7ms DONE
                      Jun 20 08:10:00 2024-06-19T20:10:00.000Z
                      Jun 20 08:10:01 2024-06-19 20:10:01 App\Jobs\Ninja\QueueSize ....................... RUNNING
                      Jun 20 08:10:01 2024-06-19 20:10:01 App\Jobs\Ninja\QueueSize ................... 3.26ms DONE
                      Jun 20 08:10:01 2024-06-19 20:10:01 App\Jobs\Ninja\TaskScheduler ................... RUNNING
                      Jun 20 08:10:01 2024-06-19 20:10:01 App\Jobs\Ninja\TaskScheduler ............... 3.24ms DONE
                      Jun 20 08:10:10 172.18.0.1 - - [19/Jun/2024:20:10:10 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:10:20 172.18.0.1 - - [19/Jun/2024:20:10:20 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:10:30 172.18.0.1 - - [19/Jun/2024:20:10:30 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:10:40 172.18.0.1 - - [19/Jun/2024:20:10:40 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:10:50 172.18.0.1 - - [19/Jun/2024:20:10:50 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:11:00 172.18.0.1 - - [19/Jun/2024:20:11:00 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:11:00 INFO No scheduled commands are ready to run. <30>1 2024-06-19T20:11:00Z cloudron 484b2dd6-7856-4a2f-a637-cac90510d702 1285 484b2dd6-7856-4a2f-a637-cac90510d702 -
                      Jun 20 08:11:00 172.18.0.1 - - [19/Jun/2024:20:11:00 +0000] "GET /storage/wy7367YjZKJ1MeibNz7hWcqVUuzfvlYV/RE1ZVEX72zOe7y3YneTYcG4Y9oae9HMlDUOZg95d.png HTTP/1.1" 200 9907 "-" "-"
                      Jun 20 08:11:01 172.18.0.1 - - [19/Jun/2024:20:10:59 +0000] "GET /client/quote/ZiFMzl5VdAaixCswv6S62SyUYfzRBenm/download?t=1718827860001 HTTP/1.1" 500 1781 "-" "Dart/3.3 (dart:io)"
                      Jun 20 08:11:10 172.18.0.1 - - [19/Jun/2024:20:11:10 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      Jun 20 08:11:20 172.18.0.1 - - [19/Jun/2024:20:11:20 +0000] "GET / HTTP/1.1" 302 2041 "-" "Mozilla (CloudronHealth)"
                      
                      1 Reply Last reply
                      0
                      • humptydumptyH humptydumpty

                        Per upstream recommendation, in the .env file I've changed from FALSE to hosted_ninja:

                        PHANTOMJS_PDF_GENERATION=hosted_ninja
                        

                        Now, PDF's are being generated edit: it's a hit or miss, but my emails are being sent correctly 😲

                        This leaves the permission issue but I'm also getting a new warning: snappdf not enabled

                        image.png

                        A Offline
                        A Offline
                        AartJansen
                        wrote on last edited by
                        #15

                        @humptydumpty How do I find the health check ?

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          AartJansen
                          wrote on last edited by
                          #16

                          OK, I added the
                          PDF_GENERATOR=hosted_ninja
                          line to the env file, restarted the app and its working again.
                          Thanks humptydumpty.

                          humptydumptyH 1 Reply Last reply
                          1
                          • A AartJansen

                            OK, I added the
                            PDF_GENERATOR=hosted_ninja
                            line to the env file, restarted the app and its working again.
                            Thanks humptydumpty.

                            humptydumptyH Offline
                            humptydumptyH Offline
                            humptydumpty
                            wrote on last edited by humptydumpty
                            #17

                            @AartJansen No problem. The health check can be found in the bottom left corner by clicking on the i icon.

                            85a7d9a1-feae-4ec7-a3ff-6f65bdda58b1-image.png

                            1 Reply Last reply
                            1
                            • girishG Do not disturb
                              girishG Do not disturb
                              girish
                              Staff
                              wrote on last edited by
                              #18

                              I could reproduce the problem in my test instance. Debugging as to what has changed.

                              1 Reply Last reply
                              1
                              • luckowL Offline
                                luckowL Offline
                                luckow
                                translator
                                wrote on last edited by
                                #19

                                Hmpf. PDF_GENERATOR=hosted_ninja works, but it feels wrong to add a third-party provider to my invoicing app. An app where the creation of PDFs at the end of the month does not work is also a problem. 🙂

                                Pronouns: he/him | Primary language: German

                                1 Reply Last reply
                                1
                                • girishG Do not disturb
                                  girishG Do not disturb
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #20

                                  This should be fixed now in the latest package.

                                  humptydumptyH 1 Reply Last reply
                                  2
                                  • girishG girish

                                    This should be fixed now in the latest package.

                                    humptydumptyH Offline
                                    humptydumptyH Offline
                                    humptydumpty
                                    wrote on last edited by
                                    #21

                                    @girish Do I need to undo my temp fix that I did above after updating?

                                    luckowL 1 Reply Last reply
                                    0
                                    • humptydumptyH humptydumpty

                                      @girish Do I need to undo my temp fix that I did above after updating?

                                      luckowL Offline
                                      luckowL Offline
                                      luckow
                                      translator
                                      wrote on last edited by
                                      #22

                                      @humptydumpty I have removed PDF_GENERATOR=hosted_ninja and can confirm that the PDF creation works.
                                      Thank you Cloudron team.

                                      Pronouns: he/him | Primary language: German

                                      1 Reply Last reply
                                      3
                                      • humptydumptyH Offline
                                        humptydumptyH Offline
                                        humptydumpty
                                        wrote on last edited by
                                        #23

                                        @luckow Invoices/quotes emails are not being sent to the client when I remove PDF_GENERATOR=hosted_ninja

                                        Create a fake client & invoice and send it to yourself. Is it working?

                                        A tip I received from the upstream dev is to BCC yourself by going to:

                                        IN dashboard > settings > Advanced Settings > Email Settings >BCC Email

                                        1 Reply Last reply
                                        0
                                        • humptydumptyH Offline
                                          humptydumptyH Offline
                                          humptydumpty
                                          wrote on last edited by
                                          #24

                                          @girish email delivery doesn't work for me unless I keep PDF_GENERATOR=hosted_ninja in the env file. PDF generation works fine with or without that line now. Should I report this upstream as a new/separate issue?

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search