4

I'm getting the

Whoops, looks like something went wrong.

on my production server.

All the sudden, no artisan commands are working. I was getting an error on /bootstrap/compiled.php:4496.

After removing compiled.php, I'm getting the same message

"array_merge(): Argument #2 is not an array" in /vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository".php:188.

My services.json files is empty, and when I try to PHP artisan cache:clear, I receive the same error message.

Does anyone know what I can try next? Thanks in advance

marian0
  • 3,336
  • 3
  • 27
  • 37
Erin
  • 5,315
  • 2
  • 20
  • 36
  • If `services.json` is important then try putting `[]` into it – Inurosen Oct 20 '15 at 13:55
  • What code is at `ProviderRepository.php line 188` ? – Will Sheppard Oct 20 '15 at 14:00
  • It reads in services.json. If services.json does not exist, then it should create it. However, it fails to create it and leaves an empty file. – Erin Oct 20 '15 at 14:11
  • If I put [] in services.json, then it throws errors for "Undefined index". The problem is that the services.json file is not being created correctly. – Erin Oct 20 '15 at 14:16
  • This is a ridiculous issue in Laravel. We installed our app in hundreds of devices and it cause the issue in all single device. Do any one know the reason for this issue so that we can prevent in future? – Muneer Apr 18 '16 at 05:48

3 Answers3

2

It looks like we ran out of space on the server. That's why it couldn't write to the file.

Erin
  • 5,315
  • 2
  • 20
  • 36
1

When Laravel is on production without debug option this message is shown "Whoops, looks like something went wrong.", you can edit you .env line

APP_DEBUG=false

to

APP_DEBUG=true

and then you will see error(have more info about error) you will know how to fix.

Removing services.json from bootstrap/cache fixed the issue. Source: https://laracasts.com/discuss/channels/laravel/update-to-51-and-array-merge-argument-2-is-not-an-array

fico7489
  • 7,931
  • 7
  • 55
  • 89
  • I gave the error. "array_merge(): Argument #2 is not an array" in /vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository".php:188. – Erin Oct 20 '15 at 14:11
  • 1
    It's laravel 4.2, not 5.1. If I delete services.json in /app/storage/meta, it just rebuilds the empty file (0 bytes). The errors remain. – Erin Oct 20 '15 at 14:18
  • Did you re run composer after deletion? composer dump-autoload and composer update. Answer on link is also about laravel 4. – fico7489 Oct 20 '15 at 14:20
  • Yep. I did all that. Thanks – Erin Oct 20 '15 at 14:23
  • When I call 'php composer.phar update', the update runs, but as soon as it calls an artisan command, I get the ProviderRepository.php error (artisan clear-compiled, artisan optimize). Same error if I try to clear the cache (with or without force). I'm banging my head against the wall! – Erin Oct 20 '15 at 14:28
0

have you tried to delete your vender + /bootstrap/compiled.php and your service.json and then tried to reinstall laravel again using composer install ?

Zaher
  • 1,120
  • 7
  • 18