laravel/framework · error · RuntimeException

The failed job provider does not have a configured queue

Error message

The failed job provider does not have a configured queue

What it means

Thrown by Foundation\Cloud\FailedJobProvider::log() when a job on the 'cloud' connection fails but the provider's injected Queue instance (the configured cloud queue) is null. The provider needs the cloud Queue to read processingJobDetails (queue name, started_at, attempts) before emitting the failed_job event; without it, it cannot record the failure correctly. This is a wiring/configuration defect rather than a transient runtime issue.

Source

Thrown at src/Illuminate/Foundation/Cloud/FailedJobProvider.php:59

    }

    /**
     * Log a failed job into storage.
     *
     * @param  string  $connection
     * @param  string  $queue
     * @param  string  $payload
     * @param  \Throwable  $exception
     * @return string|null
     */
    public function log($connection, $queue, $payload, $exception)
    {
        if ($connection !== 'cloud') {
            return $this->failer->log(...func_get_args());
        }

        if ($this->queue === null) {
            throw new RuntimeException('The failed job provider does not have a configured queue');
        }

        $timestamp = CarbonImmutable::now('UTC');
        $processingJobDetails = $this->queue->processingJobDetails();

        $this->events->emit([
            '_cloud_event' => 'failed_job',
            'id' => $id = Str::uuid7($timestamp)->toString(),
            'queue' => $processingJobDetails['queue'],
            'started_at' => $processingJobDetails['started_at']->toDateTimeString('microsecond'),
            'attempts' => $processingJobDetails['attempts'],
            'payload' => $payload,
            'exception' => (string) mb_convert_encoding($exception, 'UTF-8'),
        ]);

        $this->queue->finishProcessingJob(timestamp: $timestamp);

        return $id;

View on GitHub (pinned to bd6b5437e6)

Solutions

  1. Ensure the cloud failed-job provider is constructed with the cloud Queue instance (don't override queue.failer without re-wiring Cloud dependencies).
  2. Verify config/queue.php has a correctly configured 'cloud' connection and that the Cloud service provider is registered.
  3. If running outside Laravel Cloud, do not use the 'cloud' connection — switch the queue connection to database/redis/sync.
  4. Re-publish or restore the Cloud integration config: php artisan vendor:publish (for the Cloud package).

Example fix

// before — service provider overrides failer without cloud queue
$this->app->extend('queue.failer', fn () => new \Illuminate\Foundation\Cloud\FailedJobProvider($baseFailer, $events, $encrypter));

// after — inject the cloud queue
$this->app->extend('queue.failer', function ($_, $app) {
    return new \Illuminate\Foundation\Cloud\FailedJobProvider(
        $app->make('queue.failer.base'),
        $app->make(\Illuminate\Foundation\Cloud\Events::class),
        $app->make(\Illuminate\Contracts\Encryption\StringEncrypter::class),
    );
});
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the cloud failed-job provider has its Queue before any job fails.
$provider = app('queue.failer');
if ($provider instanceof \Illuminate\Foundation\Cloud\FailedJobProvider) {
    $reflect = new \ReflectionProperty($provider, 'queue');
    $reflect->setAccessible(true);
    if ($reflect->getValue($provider) === null) {
        throw new \RuntimeException('Cloud failed-job provider is missing its Queue dependency.');
    }
}

Type guard

function isCloudFailedJobProviderWired(): bool
{
    $provider = app('queue.failer');
    if (! $provider instanceof \Illuminate\Foundation\Cloud\FailedJobProvider) {
        return false;
    }
    $r = new \ReflectionProperty($provider, 'queue');
    $r->setAccessible(true);
    return $r->getValue($provider) !== null;
}

Try / catch

try {
    app('queue.failer')->log('cloud', $queue, $payload, $e);
} catch (\RuntimeException $ex) {
    if (str_contains($ex->getMessage(), 'does not have a configured queue')) {
        // log to a fallback store and alert — cloud failed-job wiring is broken
        report($ex);
    } else {
        throw $ex;
    }
}

Prevention

When it happens

Trigger: A job dispatched on the cloud connection failing, triggering FailedJobProvider::log('cloud', ...). Reached when the cloud failed-job provider was constructed/injected without its Queue dependency (e.g. custom service provider binding, partial Cloud config, or queue.failer override missing the cloud queue).

Common situations: Overriding the queue.failer binding in a service provider without supplying the Cloud Queue. Running cloud connection locally without the Cloud agent present. Misconfigured config/queue.php connections.cloud. Upgrading Laravel Cloud integration and forgetting to republish config.

Related errors


AI-assisted analysis of laravel/framework@bd6b5437e6 (2026-08-06). Data as JSON: /data/errors/990cee08705e4079.json. Report an issue: GitHub.