Laravel with App Engine Standard Class 'Facade\Ignition\IgnitionServiceProvider' not found
Asked Answered
H

12

23

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:

  1. Created new Laravel project

  2. Checked that Laravel is working on local host with php artisan serve

  3. Generated new key with php artisan key:generate --show

  4. Created app.yaml file with:

runtime: php72

env_variables:
  APP_KEY: iktbUa2quYPV2av3zDx0XAuEVjwzVQY/oMfyI2PQNKk=
  APP_STORAGE: /tmp
  VIEW_COMPILED_PATH: /tmp
  SESSION_DRIVER: cookie
  1. Modified bootstrap/app.php by adding $app->useStoragePath(env('APP_STORAGE', base_path() . '/storage'));

  2. Rancomposer remove --dev beyondcode/laravel-dump-server

  3. Also ran: php artisan cache:clear, php artisan route:cache, php artisan config:clear, php artisan view:clear (as other tutorials suggested)

  4. And gcloud app deploy

And I get error: "Class 'Facade\Ignition\IgnitionServiceProvider' not found"

enter image description here

Hayott answered 24/9, 2019 at 19:39 Comment(1)
Did you registered your provider inside config/app.php [provider & alias] ?Palenque
Q
52

If you're facing this issue after upgrading composer 1.0 to 2.0. Then you can follow this step:

  1. Go to the project directory
  2. Run composer install
  3. Run composer dump-autoload
  4. Try to run php artisan serve It solved for me
Quarles answered 5/6, 2021 at 7:13 Comment(3)
I upgraded from composer 1.x to composer 2.x so this issue was reported. your answer helped me. Thanks :)Fdic
It even works without step 3. Thank youUnit
I have updated the PHP version and then got this error but it's solve after composer installControversy
R
11

Please Try

composer dump-autoload

It solved for me

Roche answered 23/11, 2019 at 6:44 Comment(3)
This broke my all application.Melena
@KrishnaKarki This just ensures that your dependency files are properly getting discovered and loaded. It def shouldn't break your application, unless the dependencies themselves correctly break your application, or unless you have a discrepancy in your composer versions (i.e. installed the initial deps with composer v1, and installed new deps with v2, etc.)Bonesetter
This helped out! Thank you so much. Any idea what just happened to understand this more technically?Buroker
A
8

App 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

Afteryears answered 17/12, 2019 at 7:30 Comment(0)
H
5

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.

Hayott answered 25/9, 2019 at 18:24 Comment(0)
I
4

I try composer update and its working fine

Intarsia answered 10/9, 2021 at 4:36 Comment(0)
H
3

Try

php artisan route:clear

and you're good to go.

Hypothesize answered 8/11, 2019 at 13:7 Comment(0)
R
3

Try running

composer update

or

composer dump-autoload
Rumen answered 28/9, 2021 at 12:51 Comment(0)
H
2

Go to your project terminal and run :

  1. composer install

  2. composer dump-autoload

  3. php artisan serve

And your problem will go away.

Haematoid answered 28/5, 2022 at 10:49 Comment(0)
P
1

I am also new to Laravel and I have experienced with this issue, and I searched solution which was

  • first run this command on your terminal

composer update

  • second run the command on below

composer dump-autoload

and then see the result :)

Priscillaprise answered 28/4, 2022 at 13:9 Comment(1)
In my case, I need run composer dump-autoload to use my helpers. It works for me… and update my laravel project from v7.28 to v7.30 !Crocked
B
0

just uncomment soduim line from your ini file

before

;extension=sodium

after

extension=sodium
Bein answered 30/7, 2022 at 9:37 Comment(0)
H
0

just remove cache contents in bootstrap folder and problem will be fixed!

Hyperphagia answered 15/10, 2023 at 13:14 Comment(0)
R
-1

If you are facing this issue while running phpUnit tests then try to clear cache of bootstrap folder.

Rashida answered 16/4, 2021 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.