In app update error messages

Hello, I am trying to use the feature in app update. But first I wanted to solve the error messages (See picture).

In the env.example file is already snappdf stored. After that I did a sudo u- www-data php artisan optimize. Unfortunately this did not help.

Furthermore the crontab job * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 is running. This would also be missing

Last but not least, the memory_limit is at 512M:

cat -b /etc/php/8.1/apache2/php.ini | grep memory_limit
361 memory_limit = 512M

edit: browser view

edit2: Okay, that is crazy. I got from the browser and the app two difference error messages. After a couple of minutes i try it again from the app and now it is updated.

But the queue and the pdf gen. warning is still remaining. So the memory_limit is correct now

It looks like the queue is set to sync in the env file, this disables the queue. There’s more info here:

To remove the PDF warning you’d need to run SnapPDF locally.

Hey @hillel,

thank you. I could fix the queue warning :slight_smile: . Im not sure how to install snapPDF correctly. i have downloaded composer and install snappdf. When i create a pdf i get an empty one

@Pallaroid from the command line can you test snappdf by running

./vendor/bin/snappdf convert --url google.pdf

then inspect the PDF and ensure it is rendering as expected.

1 Like

Hello, thank you david. I will try it today or tomorrow. I had a lot of work the days.

Hey @david, i was able to test it now. That is the output:

In Snappdf.php line 260:
  The command "'/var/www/invoiceninja/vendor/beganovich/snappdf/versions/-Linux_x64/chrome-linux/chrome' '--headles  
  s' '--disable-gpu' '--disable-translate' '--disable-extensions' '--disable-sync' '--disable-background-networking  
  ' '--disable-software-rasterizer' '--disable-default-apps' '--disable-dev-shm-usage' '--safebrowsing-disable-auto  
  -update' '--run-all-compositor-stages-before-draw' '--no-first-run' '--no-margins' '--no-sandbox' '--print-to-pdf  
  -no-header' '--hide-scrollbars' '--ignore-certificate-errors' '--print-to-pdf=/tmp/pdf_8fCUlU.pdf' 'https://githu'" failed.                                                                                                    
  Exit Code: 127(Command not found)                                                                                  
  Working directory: /var/www/invoiceninja/vendor/bin                                                                
  Error Output:                                                                                                      
  /var/www/invoiceninja/vendor/beganovich/snappdf/versions/-Linux_x64/chrome-linux/chrome: error while loading shar  
  ed libraries: cannot open shared object file: No such file or directory

Hello @david, finally i created pdf with snappdf. i had to install and the rest.

For those who also have the problem. Whenever you have installed the correct lib which is in the error message, the next one is missing. Repeat this until there is no error message. Then download e.g. github as google.pdf. This worked for me, it was also displayed in the pdf. Then change the .env in the invoiceninja folder to snappdf and sudo -u www-data php artisan optimize. After that it worked for me.

Big thanks @david and @hillel

1 Like

Glad to hear it’s working, thanks for sharing the solution!

1 Like