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

RiekMedia's avatar

Laravel error : Driver [apn] not supported

Hello everyone,

I have a small problem and have been stuck for a few hours. I have done everything as described in the documentation.

laravel-notification-channels

Package installed, then installed in laravel broadcasting

php artisan install:broadcasting in the file board casting the entered as it is in the documentation

'apn' => [
                'app_bundle_id' => env('APN_BUNDLE_ID'),
                'certificate_path' => env('APN_CERTIFICATE_PATH'),
                'certificate_secret' => env('APN_CERTIFICATE_SECRET'),
                'production' => env('APN_PRODUCTION', true),
            ],

Of course, the whole thing is also created in the end as intended. Certificates created and everything added and set up at apple. Every time I now create an album from my app, which triggers a notification, I have this in the database for failed jobs and in the Laravel log file

[2024-05-30 16:32:15] local.ERROR: Driver [apn] not supported. {“exception”:"[object] (InvalidArgumentException(code: 0): Driver [apn] not supported.

I don't know what to do and hope that someone here might be able to help me. LG Sascha

Translated with DeepL.com (free version)

0 likes
4 replies
Snapey's avatar

did you restart queue worker(s)?

RiekMedia's avatar

@Snapey Ja, habe ich, mehrmals

broadcasting.php

'connections' => [
            'apn' => [
                'app_bundle_id' => env('APN_BUNDLE_ID'),
                'certificate_path' => env('APN_CERTIFICATE_PATH'),
                'certificate_secret' => env('APN_CERTIFICATE_SECRET'),
                'production' => env('APN_PRODUCTION', true),
            ],

.env file

APN_BUNDLE_ID=XXXXXXXXXX my ID
APN_CERTIFICATE_PATH=storage/mypath/aps.cer
APN_CERTIFICATE_SECRET=
APN_PRODUCTION=true
Snapey's avatar

open tinker and check what Laravel sees with config('broadcasting')

RiekMedia's avatar

@Snapey

Psy Shell v0.12.3 (PHP 8.3.7 — cli) by Justin Hileman

> config('broadcasting')
= [
    "default" => "reverb",
    "connections" => [
      "reverb" => [
        "driver" => "reverb",
        "key" => "q3rblviack2oser0wfq0",
        "secret" => "6goxhh9h5nrq5v9w5bjb",
        "app_id" => "434246",
        "options" => [
          "host" => "localhost",
          "port" => "8080",
          "scheme" => "http",
          "useTLS" => false,
        ],
        "client_options" => [],
      ],
      "pusher" => [
        "driver" => "pusher",
        "key" => null,
        "secret" => null,
        "app_id" => null,
        "options" => [
          "cluster" => null,
          "host" => "api-mt1.pusher.com",
          "port" => 443,
          "scheme" => "https",
          "encrypted" => true,
          "useTLS" => true,
        ],
        "client_options" => [],
      ],
      "ably" => [
        "driver" => "ably",
        "key" => null,
      ],
      "log" => [
        "driver" => "log",
      ],
      "null" => [
        "driver" => "null",
      ],
      "apn" => [
        "app_bundle_id" => "XXXXXXXXX",
        "certificate_path" => "storage/app/aps.cer",
        "certificate_secret" => "",
        "production" => true,
      ],
    ],
  ]

Please or to participate in this conversation.