Proposal Render PDF

[2021-03-19 10:22:19] production.ERROR: PhantomJS - Failed to load http://localhost/invoiceninja/public/proposal/nkzunsnuxebd4evyr5rbrygxyafkklka?phantomjs=true&phantomjs_secret=qe0bpbsyl5yqbzqlpjrvgcum4am5nfwb: file_get_contents(C:\wamp64\www\invoiceninja/storage/app/t97fskrqvkdd7ezhyrye8tmghanl6u7n.pdf): failed to open stream: No such file or directory {"context":"PHP","user_id":1,"account_id":1,"user_name":"My Name","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","locale":"en","ip":"::1","count":2,"is_console":"no","is_api":"no","db_server":"mysql","url":"proposals/1/download"} []

I seem to get this error when downloading a Proposal. Using local phantomjs

Things I’ve tried:

  1. The test setting in email settings work.
  2. I created created a test.pdf in storage/app and then changed the code to stop it from creating a randomly generated filename, it works but it downloads what is inside the test.pdf .

This is how I configured my .env file:
APP_ENV=production
APP_DEBUG=false
APP_LOCALE=en
APP_URL=http://localhost/invoiceninja/public
APP_KEY=u5paws4mmxad91pxcw2nq7yjxbfkgjyk
APP_CIPHER=AES-256-CBC
REQUIRE_HTTPS=false
DB_TYPE=mysql
DB_HOST=localhost
DB_DATABASE=ninja
DB_USERNAME=root
DB_PASSWORD=
MAIL_DRIVER=smtp
MAIL_PORT=587
MAIL_ENCRYPTION=tls
MAIL_HOST=
MAIL_USERNAME=
MAIL_FROM_NAME=
MAIL_FROM_ADDRESS=
MAIL_PASSWORD=
PHANTOMJS_SECRET=qe0bpbsyl5yqbzqlpjrvgcum4am5nfwb
PHANTOMJS_BIN_PATH=C:\phantomjs\bin\phantomjs.exe
MAILGUN_DOMAIN=

I think the code doesn’t generate the pdf file locally so that is why it cannot locate it, but I do not know how to fix this.

Running test.pjs using the the link " http://localhost/invoiceninja/public/proposal/nkzunsnuxebd4evyr5rbrygxyafkklka?phantomjs=true&phantomjs_secret=qe0bpbsyl5yqbzqlpjrvgcum4am5nfwb "

Hi,

It looks like you’re using v4, not v5.

There is some troubleshooting info here:

https://invoice-ninja.readthedocs.io/en/latest/configure.html#troubleshooting

hmm okay, I’ll try to use the v5
Thanks

Ok, note proposals aren’t currently supported in v5

oh I see, with my current v4 problem, do you think this is an SSL error with cURL?

It’s possible, we recommend using Let’s Encrypt