cretueusebiu / laravel-spark-google2fa

Google Authenticator support for Laravel Spark
https://packagist.org/packages/eusebiu/laravel-spark-google2fa
MIT License
87 stars 25 forks source link

Service Provider Not Found #23

Closed j3py closed 5 years ago

j3py commented 5 years ago

I recently upgraded to Spark to spark-aurelius v9.1.0 and now I run into the following error message:

In ProviderRepository.php line 208:

  Class 'Laravel\Spark\Providers\Google2FAServiceProvider' not found

However, I have laravel-spark-google2fa v2.0.2 installed and the service provider in question exists where it has for quite some time in: /www/laravel/spark/src/Http/Providers/Google2FAServiceProvider.php

I've tried a lot of simple things like clearing the cache and running composer dump-autoload to no avail.

Anyway, has anyone run into a similar issue? I'm not sure where to go from here.

j3py commented 5 years ago

Looks like this pull request might be related: https://github.com/cretueusebiu/laravel-spark-google2fa/pull/22 However, the team I work on won't use ImageMagick for security reasons so I'm hoping installing that won't be necessary.

j3py commented 5 years ago

Does anyone know if this package is still updated? Ever since upgrading to spark-aurelius v9.1.0 I can't run the application because of the error I outlined above.

j3py commented 5 years ago

I was unaware of the bootstrap cache. The bootstrap cache file contained a reference to the Google2FAServiceProvider service provider class which after various package updates and what not was no longer present.

Running commands like php artisan config:clear, php artisan cache:clear, and composer dump-autoload did not clear this cache. In the end, I simply removed the offending file:

filename: services.php

location: /laravel/bootstrap/cache/services.php

Here's a Stack Overflow post about it: https://stackoverflow.com/questions/58192052/laravel-spark-google2fa-provider-class-not-found-after-spark-update-to-v9-0