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. InvoiceNinja PDF Downloads - Route Does Not Exist

InvoiceNinja PDF Downloads - Route Does Not Exist

Scheduled Pinned Locked Moved Solved Invoice Ninja
invoiceninja
9 Posts 3 Posters 1.8k Views 3 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.
    • R Offline
      R Offline
      ryantrunorth
      wrote on last edited by
      #1

      After switching to Cloudron, we've run into an issue with our instance of Invoice Ninja.

      Using the API instructions here:
      https://invoice-ninja.readthedocs.io/en/latest/api.html

      We use to be able to use download a PDF using the below url structure
      https://account.website.com/api/v1/download/6488

      But after switching to Cloudron, we now receive a response of:
      "error": {
      "message": "Route does not exist"
      }

      Other GET requests we use continue to function fine. For example, we're still able to do a GET request and get JSON for the invoice using the below url structure:
      https://account.website.com/api/v1/invoices/6488

      It's just the download url that's not working after our server switch.

      Any ideas on how to troubleshoot this would be helpful.

      Thank you!

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @ryantrunorth Looking into this issue now. There was a invoiceninja patch release yesterday, so it could be related.

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #3

          In our invoice ninja installation, both of the calls work. @ryantrunorth is there anything in the logs? Also, does the PDF download work in the browser and not just with curl?

          curl -X GET https://invoices.ninja/api/v1/invoices/5 -H 'X-Ninja-Token: sometoken'
          

          If the curl download is getting stuck, it's because you have to pass the -o option.

          curl -X GET https://invoices.ninja/api/v1/download/5 -H 'X-Ninja-Token: asfd' -o foo.pdf
          
          1 Reply Last reply
          0
          • T Offline
            T Offline
            tamayers
            wrote on last edited by
            #4

            @girish I work with @ryantrunorth. I believe this is an issue with PhantomJSCloud. I am trying to use PhantomJSCloud but it keeps getting commented out of the .env file on restart.

            #PHANTOMJS_CLOUD_KEY=XXXX

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @tamayers Ah, the package is commenting it out for some reason. I think it's a bug in the package. I will push an update shortly.

              1 Reply Last reply
              1
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @tamayers The package comes bundled with phantomjs at /usr/local/bin/phantomjs (this is set as PHANTOMJS_BIN_PATH). Is there a reason why you disable this and use PhantomJSCloud ?

                T 1 Reply Last reply
                0
                • girishG girish

                  @tamayers The package comes bundled with phantomjs at /usr/local/bin/phantomjs (this is set as PHANTOMJS_BIN_PATH). Is there a reason why you disable this and use PhantomJSCloud ?

                  T Offline
                  T Offline
                  tamayers
                  wrote on last edited by
                  #7

                  @girish We have seen issues with PDF generation and downloading when we use the onboard PhantomJS. The github issues from InvoiceNinja have stated that using PhantomJSCloud have fixed that.

                  Everything was working with PDF downloading with PhantomJSCloud on our old server (non-cloudron). Moved this install to Cloudron and it was fine until 2-3 updates ago.

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #8

                    @ryantrunorth @tamayers I have pushed an update to invoice ninja. After update, uncomment out the PHANTOMJS_CLOUD_KEY line and restart the app. Let me know if that works.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tamayers
                      wrote on last edited by
                      #9

                      This worked for us! Thank you so much!

                      1 Reply Last reply
                      0
                      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