This is driving me crazy second day. I'm new to Laravel and trying to get Laravel 6 work on Google App Engine Standard. Tried: This tutorial and other ones, but it still fails to load Laravel index page
What I have done:
Created new Laravel project
Checked that Laravel is working on local host with php artisan serve
Generated new key with php artisan key:generate --show
Created app.yaml file with:
runtime: php72
env_variables:
APP_KEY: iktbUa2quYPV2av3zDx0XAuEVjwzVQY/oMfyI2PQNKk=
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
SESSION_DRIVER: cookie
Modified bootstrap/app.php by adding $app->useStoragePath(env('APP_STORAGE', base_path() . '/storage'));
Rancomposer remove --dev beyondcode/laravel-dump-server
Also ran:
php artisan cache:clear
,
php artisan route:cache
,
php artisan config:clear
,
php artisan view:clear
(as other tutorials suggested)
And gcloud app deploy
And I get error: "Class 'Facade\Ignition\IgnitionServiceProvider' not found"
In my case i have found error Class 'Facade\Ignition\IgnitionServiceProvider' not found in my project and I found solution by executing composer command and it works.
It is the default error page for all Laravel 6 applications. It also allows to publicly share your errors on Flare. If configured with a valid Flare API key, your errors in production applications will be tracked, and you'll get notified when they happen.
If you're facing this issue after upgrading composer 1.0 to 2.0. Then you can follow this step:
php artisan serve
It solved for meApp engine install dependency with "--no-dev" flag. If your application is debug mode and there is an error application is try to render error page by "facade/ignition" packages.
Solve-1: You can move "facade/ignition" dependency from "require-dev" to "dev" in composer.json file
Solve-2: You can run as production environment and with false APP_DEBUG flag
Please Try
composer dump-autoload
It solved for me
I have experienced other errors as well, most of them gave me Error 500 and
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /tmp/google-config/nginx.conf:3
in Stackdriver Logger
Also I was not aware that App Engine was executing composer.json on build (see Specifying Dependencies). And it seems the issue was that it cached that.
Everything was resolved by replacing command in step 7. :
gcloud app deploy
with gcloud beta app deploy --no-cache
It seems that if I would have done all steps as in tutorial from the start I would not have any issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With