Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AlokDev's avatar

php artisan route:list -v through errors

Hello Everyone,

I am trying to run PHP artisan route:list command which though a errors.

LogicException

Key path "file:///var/www/html/materialize-admin/materialize-html-laravel-template/storage/oauth-private.key" does not exist or is not readable

at vendor/league/oauth2-server/src/CryptKey.php:48

       $keyPath = 'file://' . $keyPath;
       }

         if (!file_exists($keyPath) || !is_readable($keyPath)) {
           throw new LogicException(sprintf('Key path "%s" does not exist or is not readable', $keyPath));
         }
 
         if ($keyPermissionsCheck === true) {
             // Verify the permissions of the key

1 vendor/laravel/passport/src/PassportServiceProvider.php:249 League\OAuth2\Server\CryptKey::__construct("file:///var/www/html/materialize-admin/materialize-html-laravel-template/storage/oauth-private.key")

2 vendor/laravel/passport/src/PassportServiceProvider.php:215 Laravel\Passport\PassportServiceProvider::makeCryptKey("private")

3 vendor/laravel/passport/src/PassportServiceProvider.php:105 Laravel\Passport\PassportServiceProvider::makeAuthorizationServer()

4 vendor/laravel/framework/src/Illuminate/Container/Container.php:803 Laravel\Passport\PassportServiceProvider::Laravel\Passport{closure}(Object(Illuminate\Foundation\Application), [])

5 vendor/laravel/framework/src/Illuminate/Container/Container.php:685 Illuminate\Container\Container::build(Object(Closure))

6 vendor/laravel/framework/src/Illuminate/Foundation/Application.php:794 Illuminate\Container\Container::resolve("League\OAuth2\Server\AuthorizationServer", [])

7 vendor/laravel/framework/src/Illuminate/Container/Container.php:633

Please help me to solve this.

0 likes
2 replies
deepu07's avatar
deepu07
Best Answer
Level 11

@alokdev it seems like you're missing the passport oauth keys in your storage direc. make sure you do have both OAuth public and private key.

2 likes

Please or to participate in this conversation.