Check your Environment Variables, You need to run php artisan key:generate to set the application key in a .env file; or set a vlaid key in the server's environment.
If using the .env file, make sure you also have one perhaps by copying the .env.example
Cheers for the reply, but tried all that.
It works on localhost and has been working on Forge using DO for the last week, but tried pushing new code to Forge this morning and i get that error.
I then deleted that site and created a new site on Forge i don't get the option to set a new key or the environment in till its been pulled successfully.
Hi, Nothing custom in the post install.
When i set the key in app.php i get another error.
I don't quite understand whats going on! As it all works perfect on the localhost and was working perfect on the test server using forge, but after the last commit it throws all these errors after working for so long.
Ive removed composer.lock and run composer install but nothing. Also run artisan dump-autoload and still nothing.
Many thanks for the input so far :)
Thu Jun 7 06:03:19 UTC 2018
From bitbucket.org:cloudwales/app
* branch master -> FETCH_HEAD
Already up-to-date.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Illuminate\Foundation\Console\ObserverMakeCommand' not found
at /home/forge/testing.expost.uk/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php:614
610| */
611| protected function registerObserverMakeCommand()
612| {
613| $this->app->singleton('command.observer.make', function ($app) {
> 614| return new ObserverMakeCommand($app['files']);
615| });
616| }
617|
618| /**
Exception trace:
1 Illuminate\Foundation\Providers\ArtisanServiceProvider::Illuminate\Foundation\Providers\{closure}(Object(Illuminate\Foundation\Application), [])
/home/forge/testing.expost.uk/vendor/laravel/framework/src/Illuminate/Container/Container.php:764
2 Illuminate\Container\Container::build(Object(Closure))
/home/forge/testing.expost.uk/vendor/laravel/framework/src/Illuminate/Container/Container.php:646
Please use the argument -v to see more details.
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
After a week of trying to get things working, it turned out to be Forge. Logged into server and pulled repository from there and it all worked.
Then after that i tried a different method where I pulled the repository in Forge but unchecked install composer dependancies. This pulled in the project repository. Then logged into the server and updated composer there, and that all worked. Now when i push to git it deploys successfully.