{"id":"58542fda48d5be93","repo":"laravel/framework","slug":"driver-driver-is-not-supported","errorCode":null,"errorMessage":"Driver [{$driver}] is not supported.","messagePattern":"Driver \\[(.+?)\\] is not supported\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Filesystem/FilesystemManager.php","lineNumber":155,"sourceCode":"     */\n    protected function resolve($name, $config = null)\n    {\n        $config ??= $this->getConfig($name);\n\n        if (empty($config['driver'])) {\n            throw new InvalidArgumentException(\"Disk [{$name}] does not have a configured driver.\");\n        }\n\n        $driver = $config['driver'];\n\n        if (isset($this->customCreators[$driver])) {\n            return $this->callCustomCreator($config);\n        }\n\n        $driverMethod = 'create'.ucfirst($driver).'Driver';\n\n        if (! method_exists($this, $driverMethod)) {\n            throw new InvalidArgumentException(\"Driver [{$driver}] is not supported.\");\n        }\n\n        return $this->{$driverMethod}($config, $name);\n    }\n\n    /**\n     * Call a custom driver creator.\n     *\n     * @param  array  $config\n     * @return \\Illuminate\\Contracts\\Filesystem\\Filesystem\n     */\n    protected function callCustomCreator(array $config)\n    {\n        return $this->customCreators[$config['driver']]($this->app, $config);\n    }\n\n    /**\n     * Create an instance of the local driver.","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/laravel/framework/blob/bd6b5437e6ad87bb49f9b426724f07a9f64e9683/src/Illuminate/Filesystem/FilesystemManager.php#L137-L173","documentation":"Thrown by FilesystemManager::resolve() when the configured 'driver' string has no corresponding create{Driver}Driver method on the manager and no custom creator was registered via extend(). Laravel ships with local, ftp, sftp, s3, and scoped; any other string is unsupported unless you register it.","triggerScenarios":"Calling Storage::disk($name) where the disk config 'driver' is something like 'gcs', 'azure', 'dropbox', or a typo ('locale', 's3v3') and you did not register a custom creator with Storage::extend('gcs', ...).","commonSituations":"Using a third-party driver (Google Cloud, Azure Blob) whose package's service provider wasn't registered; typoing 'local' or 's3'; upgrading Laravel and forgetting to install league/flysystem adapters (e.g. missing league/flysystem-aws-s3-v3 for 's3').","solutions":["Register the custom driver: Storage::extend('gcs', fn($app,$config) => ...).","Install the missing Flysystem adapter package (e.g. league/flysystem-aws-s3-v3).","Correct the driver string typo in config/filesystems.php.","Ensure the third-party provider is in config/app.php providers or discovered via package discovery."],"exampleFix":"// before - 'gcs' driver unknown\nStorage::disk('gcs')->put('x', 'y');\n\n// after - register the custom driver in a service provider's boot\nuse Google\\Cloud\\Storage\\StorageClient;\nuse League\\Flysystem\\GoogleCloudStorage\\GoogleCloudStorageAdapter;\nStorage::extend('gcs', function ($app, $config) {\n    $client = new StorageClient($config);\n    $bucket = $client->bucket($config['bucket']);\n    $adapter = new GoogleCloudStorageAdapter($bucket);\n    return new \\Illuminate\\Filesystem\\FilesystemAdapter(\n        new \\League\\Flysystem\\Filesystem($adapter), $adapter, $config\n    );\n});","handlingStrategy":"validation","validationCode":"use Illuminate\\Filesystem\\FilesystemManager;\n$driver = config(\"filesystems.disks.{$name}.driver\");\nif (! method_exists(FilesystemManager::class, 'create' . ucfirst($driver) . 'Driver')\n    && ! app('filesystem')->getAdapter(/* resolved via extend registry */)) {\n    throw new RuntimeException(\"Driver [{$driver}] not registered\");\n}","typeGuard":"function driverIsRegistered(string $driver): bool\n{\n    $method = 'create' . ucfirst($driver) . 'Driver';\n    return method_exists(\\Illuminate\\Filesystem\\FilesystemManager::class, $method);\n}","tryCatchPattern":"try {\n    return Storage::disk($name);\n} catch (\\InvalidArgumentException $e) {\n    if (str_contains($e->getMessage(), 'is not supported')) {\n        abort(500, \"Storage driver not installed/registered\");\n    }\n    throw $e;\n}","preventionTips":["Install the Flysystem adapter package for each non-built-in driver.","Register custom drivers with Storage::extend() in a service provider.","Check driver string spelling against config."],"tags":["filesystem","configuration","driver","flysystem","dependency"],"analyzedSha":"bd6b5437e6ad87bb49f9b426724f07a9f64e9683","analyzedAt":"2026-08-06T00:28:32.783Z","schemaVersion":2}