studio icon indicating copy to clipboard operation
studio copied to clipboard

Class botman does not exist resolve(botman) in botman.php from template project when deploying to Heroku

Open carlos-g-anguiano opened this issue 6 years ago • 1 comments

When running php artisan serve on mi local server, I'm able to connect to Facebook with my application without problem, but when deployed to Heroku and accessing the route ...routes/botman.php the Heroku logs show the following error:

2018-10-05T22:12:54.859603+00:00 heroku[web.1]: State changed from starting to up 2018-10-05T22:13:11.016623+00:00 heroku[router]: at=info method=GET path="/routes/botman.php" host=testint-bot-credifintech.herokuapp.com request_id=24f81856-a417-4f89-bc57-5a0ec7dde6f2 fwd="189.216.104.106" dyno=web.1 connect=1ms service=182ms status=500 bytes=169 protocol=https 2018-10-05T22:13:11.019071+00:00 app[web.1]: [05-Oct-2018 22:13:11 UTC] PHP Fatal error: Uncaught ReflectionException: Class botman does not exist in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:767 2018-10-05T22:13:11.019509+00:00 app[web.1]: Stack trace: 2018-10-05T22:13:11.019772+00:00 app[web.1]: #0 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('botman') 2018-10-05T22:13:11.020942+00:00 app[web.1]: #1 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('botman') 2018-10-05T22:13:11.021997+00:00 app[web.1]: #2 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('botman', Array) 2018-10-05T22:13:11.023205+00:00 app[web.1]: #3 /app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(119): Illuminate\Container\Container->make('botman', Array) 2018-10-05T22:13:11.024174+00:00 app[web.1]: #4 /app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(763): app('botman') 2018-10-05T22:13:11.024419+00:00 app[web.1]: #5 /app/routes/botman.php(17): resolve('botman') 2018-10-05T22:13:11.024691+00:00 app[web.1]: #6 {main} 2018-10-05T22:13:11.025843+00:00 app[web.1]: thrown in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 767

I've seen similar problems with other classes such as View in Laravel, but I've tried from clean:cache, update my composer dependencies, adding a Facade BotMan in config/app.php array, again, with every modification it runs without problem in my pc but when accessing the route on Heroku it shows 500 internal server error message.

These are the versions of heroku and laravel I'm using:

  • Laravel Framework 5.6.39
  • PHP 7.2.8 (cli)

carlos-g-anguiano avatar Oct 05 '18 22:10 carlos-g-anguiano

I am experiencing this same issue but on my local development environment.

tinonetic avatar Oct 24 '18 16:10 tinonetic