PHP Warning: Class 'Google_Service' not found

Hello,

after upgrading to v4.5.46 i get the following php warning if the cron tab " artisan ninja:send-invoices" runs.

PHP Warning:  Class 'Google_Service' not found in /var/www/vhosts/my-domain.de/httpdocs/invoice.my-domain.de/ninja/vendor/google/apiclient-services/autoload.php on line 21 
PHP Warning:  Class 'Google_Service_Resource' not found in /var/www/vhosts/my-domain.de/httpdocs/invoice.my-domain.de/ninja/vendor/google/apiclient-services/autoload.php on line 21 
PHP Warning:  Class 'Google_Model' not found in /var/www/vhosts/my-domain.de/httpdocs/invoice.my-domain.de/ninja/vendor/google/apiclient-services/autoload.php on line 21 
PHP Warning:  Class 'Google_Collection' not found in /var/www/vhosts/my-domain.de/httpdocs/invoice.my-domain.de/ninja/vendor/google/apiclient-services/autoload.php on line 21

My Invoice Ninja runs on Plesk server with debian 8.

Can anybody help? :slight_smile:

Hi,

I’m not sure, are the invoices sending?

@david any thoughts?

I think yes. It seems like only a warning.

Here are the full output. The warning comes also when i run php artisan commands in shell.

Tue, 02 Nov 2021 19:41:30 +0000 Running SendRecurringInvoices...
Tue, 02 Nov 2021 19:41:30 +0000 Recurring invoice(s) found
Tue, 02 Nov 2021 19:41:31 +0000 0 recurring expenses(s) found
Tue, 02 Nov 2021 19:41:31 +0000 Done


PHP Warning: Class 'Google_Service' not found in /var/www/vhosts/my-domain.de/httpdocs/invoice.my-domain.de/ninja/vendor/google/apiclient-services/autoload.php on line 21
PHP Warning: Class 'Google_Service_Resource' not found in /var/www/vhosts/my-domain.de/httpdocs/in...

Not sure, haven’t see this before, they are only warnings, so it seems there is no dependencies on these files.

I have the exact same errors after upgrading to .46.
Now can’t see clients or invoices.

Warning : Class ‘Google_Service_Resource’ not found in /home3/r92479mens/ninja.mensis.ro/vendor/google/apiclient-services/autoload.php on line 21

Warning : Class ‘Google_Model’ not found in /home3/r92479mens/ninja.mensis.ro/vendor/google/apiclient-services/autoload.php on line 21

Warning : Class ‘Google_Collection’ not found in /home3/r92479mens/ninja.mensis.ro/vendor/google/apiclient-services/autoload.php on line 21

Do you maybe have the list filtered?

The warnings can be ignored.

I have the same warnings and nothing on the interface loads properly.
I upgraded a few days ago to .46 and all was well for a couple days.
The warnings just showed up this morning.

Has anything else changed?

Other people who have reported seeing the error haven’t seen it cause any problems.

Nothing as far as I can tell

I’m not sure what other people are experiencing but when I click anything on left none of the tables load data.

I believe for other people the error is only shown in the logs, not on the screen.

This may be caused by the PHP configuration.

I commented out lines 20-22 in the file indicating the error and everything loads now.

2 Likes

Here I have the same issue (php 7.4.0 - v4.5.48). I’ve also commented out the lines 20-22 in autoload.php but I’m wondering if this is fine to do?

@stebentje

If you have command line access can you run

composer install --no-dev

Ensuring that you are using composer v2

Unfortunatelly I don’t have acces to SSH so I transfered manually via FTP the files of version 4.5.48

Hello!

Im having the same issue after upgraded. I disabled show php errors in front to fix this.

Thanks

1 Like

came here to say upgrading from .49 to .50 I had this issue and it would not let me view invoices or clients.

I had to go into /vendor/google/apiclient-services/autoload.php and comment out the foreach starting on line 20.